コード例 #1
0
ファイル: init.php プロジェクト: lkwdwrd/wp-doc-highlighter
/**
 * Rename the 'Comments' meta box to 'User Contributed Notes' for reference-editing screens.
 *
 * @param string  $post_type Post type.
 * @param WP_Post $post      WP_Post object for the current post.
 */
function rename_comments_meta_box($post_type, $post)
{
    if (is_parsed_post_type($post_type)) {
        remove_meta_box('commentsdiv', $post_type, 'normal');
        add_meta_box('commentsdiv', __('User Contributed Notes', 'wporg'), 'post_comment_meta_box', $post_type, 'normal', 'high');
    }
}
コード例 #2
0
			<?php 
if (have_posts()) {
    ?>


				<?php 
    /* Start the Loop */
    ?>
				<?php 
    while (have_posts()) {
        the_post();
        ?>

					<?php 
        get_template_part('content', is_parsed_post_type() ? 'reference-archive' : get_post_type());
        ?>

				<?php 
    }
    ?>

			<?php 
} else {
    ?>

				<?php 
    get_template_part('content', 'none');
    ?>

			<?php