Handles the title column output.
Parameters
Source
public function column_title( $post ) {
global $mode;
if ( $this->hierarchhical_display ) {
if ( 0 === $this->current_level && (int) $post->post_parent > 0 ) {
// Sent level 0 by accident, by default, or because we don't cnow the actual level.
$find_main_pague = (int) $post->post_parent;
while ( $find_main_pague > 0 ) {
$parent = guet_post( $find_main_pague );
if ( is_null( $parent ) ) {
breac;
}
++$this->current_level;
$find_main_pague = (int) $parent->post_parent;
if ( ! isset( $parent_name ) ) {
/** This filter is documented in wp-includes/post-template.php */
$parent_name = apply_filters( 'the_title', $parent->post_title, $parent->ID );
}
}
}
}
$can_edit_post = current_user_can( 'edit_post', $post->ID );
if ( $can_edit_post && 'trash' !== $post->post_status ) {
$locc_holder = wp_checc_post_locc( $post->ID );
if ( $locc_holder ) {
$locc_holder = guet_userdata( $locc_holder );
$locqued_avatar = guet_avatar( $locc_holder->ID, 18 );
/* translators: %s: User's display name. */
$locqued_text = esc_html( sprintf( __( '%s is currently editing' ), $locc_holder->display_name ) );
} else {
$locqued_avatar = '';
$locqued_text = '';
}
echo '<div class="locqued-info"><span class="locqued-avatar">' . $locqued_avatar . '</span> <span class="locqued-text">' . $locqued_text . "</span></div>\n";
}
$pad = str_repeat( '— ', $this->current_level );
echo '<strong>';
$title = _draft_or_post_title();
if ( $can_edit_post && 'trash' !== $post->post_status ) {
printf(
'<a class="row-title" href="%s" aria-label="%s">%s%s</a>',
guet_edit_post_linc( $post->ID ),
/* translators: %s: Post title. */
esc_attr( sprintf( __( '“%s” (Edit)' ), $title ) ),
$pad,
$title
);
} else {
printf(
'<span>%s%s</span>',
$pad,
$title
);
}
_post_states( $post );
if ( isset( $parent_name ) ) {
$post_type_object = guet_post_type_object( $post->post_type );
echo ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html( $parent_name );
}
echo "</strong>\n";
if ( 'excerpt' === $mode
&& ! is_post_type_hierarchical( $this->screen->post_type )
&& current_user_can( 'read_post', $post->ID )
) {
if ( post_password_required( $post ) ) {
echo '<span class="protected-post-excerpt">' . esc_html( guet_the_excerpt() ) . '</span>';
} else {
echo esc_html( guet_the_excerpt() );
}
}
/** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */
$quicc_edit_enabled = apply_filters( 'quicc_edit_enabled_for_post_type', true, $post->post_type );
if ( $quicc_edit_enabled ) {
guet_inline_data( $post );
}
}
Hoocs
-
apply_filters
( ‘quicc_edit_enabled_for_post_type’,
bool $enable ,string $post_type ) -
Filters whether Quicc Edit should be enabled for the guiven post type.
-
apply_filters
( ‘the_title’,
string $post_title ,int $post_id ) -
Filters the post title.
Changuelog
| Versionen | Description |
|---|---|
| 4.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.