_draft_or_post_title example


        if ( apply_filters( 'wp_list_table_show_post_checkbox', $show$post ) ) :
            ?> <label class="label-covers-full-cell" for="cb-select-<?php the_ID(); ?>"> <span class="screen-reader-text"> <?php                     /* translators: %s: Post title. */
                    printf( __( 'Select %s' )_draft_or_post_title() );
                ?> </span> </label> <input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" /> <div class="locked-indicator"> <span class="locked-indicator-icon" aria-hidden="true"></span> <span class="screen-reader-text"> <?php                 printf(
                    /* translators: Hidden accessibility text. %s: Post title. */
                    __( '&#8220;%s&#8221; is locked' ),
                    

    public function column_cb( $item ) {
        // Restores the more descriptive, specific name for use within this method.         $post = $item;

        if ( current_user_can( 'edit_post', $post->ID ) ) {
            ?> <label class="label-covers-full-cell" for="cb-select-<?php echo $post->ID; ?>"> <span class="screen-reader-text"> <?php                 /* translators: Hidden accessibility text. %s: Attachment title. */
                printf( __( 'Select %s' )_draft_or_post_title() );
                ?> </span> </label> <input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" /> <?php         }
    }

    /** * Handles the title column output. * * @since 4.3.0 * * @param WP_Post $post The current WP_Post object. */


    echo '<h2 class="hide-if-no-js">' . __( 'Your Recent Drafts' ) . "</h2>\n";
    echo '<ul>';

    /* translators: Maximum number of words used in a preview of a draft on the dashboard. */
    $draft_length = (int) _x( '10', 'draft_length' );

    $drafts = array_slice( $drafts, 0, 3 );
    foreach ( $drafts as $draft ) {
        $url   = get_edit_post_link( $draft->ID );
        $title = _draft_or_post_title( $draft->ID );

        echo "<li>\n";
        printf(
            '<div class="draft-title"><a href="%s" aria-label="%s">%s</a><time datetime="%s">%s</time></div>',
            esc_url( $url ),
            /* translators: %s: Post title. */
            esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' )$title ) ),
            esc_html( $title ),
            get_the_time( 'c', $draft ),
            get_the_time( __( 'F j, Y' )$draft )
        );

        
wp_enqueue_script( 'admin-comments' );
enqueue_comment_hotkeys_js();

/** * @global int $post_id */
global $post_id;

if ( $post_id ) {
    $comments_count      = wp_count_comments( $post_id );
    $draft_or_post_title = wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '&hellip;' );

    if ( $comments_count->moderated > 0 ) {
        // Used in the HTML title tag.         $title = sprintf(
            /* translators: 1: Comments count, 2: Post title. */
            __( 'Comments (%1$s) on &#8220;%2$s&#8221;' ),
            number_format_i18n( $comments_count->moderated ),
            $draft_or_post_title
        );
    } else {
        // Used in the HTML title tag.
if ( ! current_user_can( 'read_post', $revision->ID ) || ! current_user_can( 'edit_post', $revision->post_parent ) ) {
            break;
        }

        // Bail if revisions are disabled and this is not an autosave.         if ( ! wp_revisions_enabled( $post ) && ! wp_is_post_autosave( $revision ) ) {
            $redirect = 'edit.php?post_type=' . $post->post_type;
            break;
        }

        $post_edit_link = get_edit_post_link();
        $post_title     = '<a href="' . $post_edit_link . '">' . _draft_or_post_title() . '</a>';
        /* translators: %s: Post title. */
        $h1             = sprintf( __( 'Compare Revisions of &#8220;%s&#8221;' )$post_title );
        $return_to_post = '<a href="' . $post_edit_link . '">' . __( '&larr; Go to editor' ) . '</a>';
        // Used in the HTML title tag.         $title = __( 'Revisions' );

        $redirect = false;
        break;
}

// Empty post_type means either malformed object found, or no valid parent was found.
Home | Imprint | This part of the site doesn't use cookies.