post_comment_status_meta_box()

 

File: wp-admin/includes/meta-boxes.php

function post_comment_status_meta_box( $post ) {
	?>
<input name="advanced_view" type="hidden" value="1" />
<p class="meta-options">
	<label for="comment_status" class="selectit"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked( $post->comment_status, 'open' ); ?> /> <?php _e( 'Allow comments' ); ?></label><br />
	<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked( $post->ping_status, 'open' ); ?> />
		<?php
		printf(
			/* translators: %s: Codex URL */
			__( 'Allow <a href="%s">trackbacks and pingbacks</a> on this page' ),
			__( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' )
		);
		?>
	</label>
	<?php
	/**
	 * Fires at the end of the Discussion meta box on the post editing screen.
	 *
	 * @since 3.1.0
	 *
	 * @param WP_Post $post WP_Post object of the current post.
	 */
	do_action( 'post_comment_status_meta_box-options', $post );
	?>
</p>
	<?php
}

参数:post_comment_status_meta_box( object $post )

$post

(object)
(Required)

{acontent3}

You must log in before being able to contribute a note or feedback.

33.33% (2) 次Baidu访问
16.67% (1) 次Google访问
50.00% (3) 次Sogou访问
  • 蜘蛛:Baidu,2次,更新时间:2019-05-20 18:51:05
  • 蜘蛛:Google,1次,更新时间:2019-05-17 12:24:25
  • 蜘蛛:Sogou,3次,更新时间:2019-04-23 07:12:48

参与评论