/** * Save Subtitle * * @since 2.0 * @internal * * @uses WPSubtitle::get_supported_post_types() * * @param int $post_id Post ID or object. */ static function _save_post($post_id) { // Verify if this is an auto save routine. // If it is our form has not been submitted, so we dont want to do anything if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return; } // Verify nonce if (!WPSubtitle_Admin::_verify_posted_nonce('wps_noncename', 'wp-subtitle')) { return; } // Check edit capability if (!WPSubtitle_Admin::_verify_post_edit_capability($post_id)) { return; } // Save data if (isset($_POST['wps_subtitle'])) { update_post_meta($post_id, 'wps_subtitle', wp_kses_post($_POST['wps_subtitle'])); } }
/** * Post Type Pointers. * The add pointers for multiple post types. * * @since 2.2 * @internal * * @param array $pointers Pointers. * @return array Pointers. */ static function _post_type_pointers($pointers) { // Subtitle field moved to below the post title (v.2.2) $pointers['wps_subtitle_field_to_top'] = array('target' => '#subtitlewrap', 'options' => array('content' => sprintf('<h3>%s</h3><p>%s</p>', sprintf(__('%s Field', WPSubtitle::TEXTDOMAIN), WPSubtitle_Admin::get_meta_box_title(get_post_type(get_queried_object_id()))), __('This field has moved from a meta box to below the post title.', WPSubtitle::TEXTDOMAIN)), 'position' => array('edge' => 'top', 'align' => 'middle'))); return $pointers; }