'', // Unused. Messages start at index 1. 1 => sprintf( __('%s updated. View %s'), 'Testimonial', esc_url( get_permalink($post_ID) ), 'Testimonial' ), 2 => __('Custom field updated.'), 3 => __('Custom field deleted.'), 4 => __(strtolower('Testimonial'). ' updated.'), /* translators: %s: date and time of the revision */ 5 => isset($_GET['revision']) ? sprintf( __('%s restored to revision from %s'),'Testimonial', wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => sprintf( __('%s published. View %s'), 'Testimonial', esc_url( get_permalink($post_ID) ), strtolower('Testimonial') ), 7 => __('Testimonial'. ' Saved.'), 8 => sprintf( __('%s submitted. Preview %s'), 'Testimonial', esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ), strtolower('Testimonial') ), 9 => sprintf( __('%s scheduled for: %2$s. Preview %1$s'), 'Testimonial', date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( get_permalink($post_ID) ) ), 10 => sprintf( __('%s draft updated. Preview %s'), 'Testimonial', esc_url( add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ), strtolower('Testimonial') ), ); return $messages; } /** * * Custom Submit Box * * Loop throught custom post types and * replace default submit box * * @since 1.0 * */ public static function alpha_replace_submit_meta_box() { remove_meta_box('submitdiv', 'tf_testimonials', 'core'); add_meta_box('submitdiv', sprintf( __('Save/Update %s'), 'Testimonial' ), array( 'Alpha_Interface', 'alpha_submit_meta_box' ), 'tf_testimonials', 'side', 'low'); } /** * Custom edit of default wordpress publish box callback * loop through each custom post type and remove default * submit box, replacing it with custom one that has * only submit button with custom text on it (add/update) * * @global $action, $post * @see wordpress/includes/metaboxes.php * @since 1.0 * */ public static function alpha_submit_meta_box() { global $action, $post; $post_type = $post->post_type; $post_type_object = get_post_type_object($post_type); $can_publish = current_user_can($post_type_object->cap->publish_posts); ?>