options_group, $assignment_desk->get_plugin_option_fullname('general'), array(&$this, 'assignment_desk_validate') ); add_settings_section( 'story_pitches', 'Story Pitches', array(&$this, 'story_pitches_setting_section'), $assignment_desk->top_level_page ); add_settings_field( 'pitch_form_enabled', 'Pitch forms enabled', array(&$this, 'pitch_form_enabled_option'), $assignment_desk->top_level_page, 'story_pitches' ); add_settings_field( 'default_new_assignment_status', 'Default assignment status', array(&$this, 'default_new_assignment_status_option'), $assignment_desk->top_level_page, 'story_pitches' ); add_settings_field( 'default_workflow_status', 'Default workflow status', array(&$this, 'default_workflow_status_option'), $assignment_desk->top_level_page, 'story_pitches' ); add_settings_field( 'pitch_form_elements', 'Pitch form elements', array(&$this, 'pitch_form_elements_option'), $assignment_desk->top_level_page, 'story_pitches' ); add_settings_section( 'public_facing_views', 'Public-Facing Views', array(&$this, 'public_facing_views_setting_section'), $assignment_desk->top_level_page ); add_settings_section( 'miscellaneous', 'Miscellaneous', array(&$this, 'miscellaneous_setting_section'), $assignment_desk->top_level_page ); add_settings_field( 'google_maps_api_key', 'Google Maps API key', array(&$this, 'google_maps_api_key_option'), $assignment_desk->top_level_page, 'miscellaneous' ); } function story_pitches_setting_section() { global $assignment_desk; echo "Add an Assignment Desk pitch form to any page or post by adding <!--$assignment_desk->pitch_form_key--> where you'd it to appear."; } function pitch_form_enabled_option() { global $assignment_desk; $options = $assignment_desk->general_options; echo ''; } function default_new_assignment_status_option() { global $assignment_desk; $options = $assignment_desk->general_options; $assignment_statuses = $assignment_desk->custom_taxonomies->get_assignment_statuses(); echo ''; } /** * Define post status for newly submitted pitches * @requires Edit Flow */ function default_workflow_status_option() { global $assignment_desk; if (class_exists('edit_flow')) { global $edit_flow; $options = $assignment_desk->general_options; $post_statuses = $edit_flow->custom_status->get_custom_statuses(); echo '
'; echo 'Indicate the status in your workflow a new story pitch should be given.'; } else { echo 'Please enable Edit Flow to define custom workflow statuses. Without Edit Flow, new pitches will be saved with a post status of "draft"'; } } /** * Enable/disable data elements on pitch form */ function pitch_form_elements_option() { global $assignment_desk; if ($assignment_desk->edit_flow_exists()) { global $edit_flow; } $options = $assignment_desk->general_options; echo ''; } function public_facing_views_setting_section() { echo "Enable public access to pitches and stories in progress by dropping <!--assignment-desk-all-stories--> in a page."; } function google_maps_api_key_option() { global $assignment_desk; $options = $assignment_desk->general_options; echo ''; } /** * Validation for all of our form elements */ function assignment_desk_validate($input) { // @todo Should we validate all elements? $input['default_new_assignment_status'] = (int)$input['default_new_assignment_status']; $input['google_maps_api_key'] = wp_kses($input['google_maps_api_key'], $allowedtags); return $input; } function general_settings() { global $wpdb, $assignment_desk; $msg = null; if ( array_key_exists( 'updated', $_GET ) && $_GET['updated']=='true' ) { $msg = __('Settings Saved', 'assignment-desk'); } ?>

options_group ); ?> top_level_page ); ?>

localizationDomain); ?>
localizationDomain); ?>
localizationDomain); ?>