function largo_move_author_to_publish_metabox() { global $post_ID; $post = get_post($post_ID); printf('<div id="author" class="misc-pub-section" style="padding: 8px 10px;">%s: ', __('Author', 'largo')); post_author_meta_box($post); echo '</div>'; }
/** * Move Author meta box into Publish * * @global type $post_ID */ public function autor_metabox_move() { global $post; if (!post_type_supports($post->post_type, 'author')) { return; } echo '<div id="author" class="misc-pub-section" style="border-top-style:solid; border-top-width:1px; border-top-color:#EEEEEE; border-bottom-width:0px;">Author: '; post_author_meta_box($post); echo '</div>'; }
function post_author_custom_box() { global $post, $post_author_meta_boxes, $pagenow; foreach ($post_author_meta_boxes as $post_author_box) { $post_author_box_value = get_post_meta($post->ID, $post_author_box['name'] . '_value', true); if ($post_author_box_value == '') { $post_author_box_value = $post_author_box['std']; } } /* if ( ('page' == get_post_type($post)) || ($pagenow == 'page-new.php') ) { $original_wp_author_box = page_author_meta_box($post); } else { $original_wp_author_box = post_author_meta_box($post); } */ if (function_exists('page_author_meta_box')) { if ('page' == get_post_type($post) || $pagenow == 'page-new.php') { $original_wp_author_box = page_author_meta_box($post); } else { $original_wp_author_box = post_author_meta_box($post); } } else { $original_wp_author_box = post_author_meta_box($post); } $post_author_custom = '<span style="margin-left:50px">'; $post_author_custom .= '<input type="hidden" name="' . $post_author_box['name'] . '_noncename" id="' . $post_author_box['name'] . '_noncename" value="' . wp_create_nonce(plugin_basename(__FILE__)) . '" />'; $post_author_custom .= '<input type="checkbox" name="' . $post_author_box['name'] . '_value" id="' . $post_author_box['name'] . '_value"'; if ($post_author_box_value == 'on') { $post_author_custom .= 'checked="checked"'; } $post_author_custom .= '/> <label for="' . $post_author_box['name'] . '_value">' . __("Hide author for this article (<i>Post Author plugin</i>)", "post_author") . '</label>'; $post_author_custom .= '</span>'; echo $original_wp_author_box . $post_author_custom; }
function author_in_publish() { global $post_ID; $post = get_post($post_ID); echo '<div class="misc-pub-section">Author: '; post_author_meta_box($post); echo '</div>'; }