wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
post_author_meta_box › WordPress Function
Seit2.6.0
Veraltetn/v
› post_author_meta_box ( $post )
| Parameter: |
|
| Definiert in: |
|
| Codex: |
Displays form field with list of authors.
Ähnliche Funktionen: post_custom_meta_box, post_categories_meta_box, post_format_meta_box, post_submit_meta_box, post_slug_meta_box
Quellcode
function post_author_meta_box( $post ) {
global $user_ID;
$post_type_object = get_post_type_object( $post->post_type );
?>
<label class="screen-reader-text" for="post_author_override">
<?php
/* translators: Hidden accessibility text. */
_e( 'Author' );
?>
</label>
<?php
wp_dropdown_users(
array(
'capability' => array( $post_type_object->cap->edit_posts ),
'name' => 'post_author_override',
'selected' => empty( $post->ID ) ? $user_ID : $post->post_author,
'include_selected' => true,
'show' => 'display_name_with_login',
)
);
}