• OK

    I have built a new custom post type called events and am building in the input forms for the start and end dates into the custom admin page.

    I’ve built the page as I need to it to look and work apart from a few details.

    I have the date input to be a simple select for month and text inputs for day, year, etc.

    Each of these values is sent via ‘get_post_custom( $post -> ID )’ so I can retrieve the values easily.

    My problem is that i need to sanitise and process these values rather than sending them raw.

    Currently it sends a value for year, month, etc. but I’d like to run a check to make sure that all of the inputted variables are in fact numbers and then turn them into a timestamp so I’m actually only sending one value each for Start Date and End Date.

    I hope I’m being clear as I’ve been staring at this for a while and I’m getting nowhere.

    Any help would be greatly appreciated.

The topic ‘Admin menu, custom post types and input values.’ is closed to new replies.