Merged in feature/81-dev-dev01 (pull request #5)

auto-patch  81-dev-dev01-2023-12-05T22_45_26

* auto-patch  81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
Tony Volpe
2023-12-05 23:05:59 +00:00
parent ba16964e7a
commit 725d3043d5
1463 changed files with 142461 additions and 89421 deletions

View File

@@ -764,7 +764,12 @@ class WP_Posts_List_Table extends WP_List_Table {
$post_type = $this->screen->post_type;
if ( 'page' === $post_type ) {
$title_orderby_text = isset( $_GET['orderby'] ) ? __( 'Table ordered by Title.' ) : __( 'Table ordered by Hierarchical Menu Order and Title.' );
if ( isset( $_GET['orderby'] ) ) {
$title_orderby_text = __( 'Table ordered by Title.' );
} else {
$title_orderby_text = __( 'Table ordered by Hierarchical Menu Order and Title.' );
}
$sortables = array(
'title' => array( 'title', false, __( 'Title' ), $title_orderby_text, 'asc' ),
'parent' => array( 'parent', false ),
@@ -893,7 +898,7 @@ class WP_Posts_List_Table extends WP_List_Table {
$to_display[ $page->ID ] = $level;
}
$count++;
++$count;
if ( isset( $children_pages ) ) {
$this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page, $to_display );
@@ -912,7 +917,7 @@ class WP_Posts_List_Table extends WP_List_Table {
$to_display[ $op->ID ] = 0;
}
$count++;
++$count;
}
}
}
@@ -987,7 +992,7 @@ class WP_Posts_List_Table extends WP_List_Table {
while ( $my_parent = array_pop( $my_parents ) ) {
$to_display[ $my_parent->ID ] = $level - $num_parents;
$num_parents--;
--$num_parents;
}
}
@@ -995,7 +1000,7 @@ class WP_Posts_List_Table extends WP_List_Table {
$to_display[ $page->ID ] = $level;
}
$count++;
++$count;
$this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page, $to_display );
}
@@ -1014,6 +1019,7 @@ class WP_Posts_List_Table extends WP_List_Table {
public function column_cb( $item ) {
// Restores the more descriptive, specific name for use within this method.
$post = $item;
$show = current_user_can( 'edit_post', $post->ID );
/**
@@ -1028,7 +1034,8 @@ class WP_Posts_List_Table extends WP_List_Table {
*/
if ( apply_filters( 'wp_list_table_show_post_checkbox', $show, $post ) ) :
?>
<label class="label-covers-full-cell" for="cb-select-<?php the_ID(); ?>">
<input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
<label for="cb-select-<?php the_ID(); ?>">
<span class="screen-reader-text">
<?php
/* translators: %s: Post title. */
@@ -1036,7 +1043,6 @@ class WP_Posts_List_Table extends WP_List_Table {
?>
</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">
@@ -1092,7 +1098,7 @@ class WP_Posts_List_Table extends WP_List_Table {
break;
}
$this->current_level++;
++$this->current_level;
$find_main_page = (int) $parent->post_parent;
if ( ! isset( $parent_name ) ) {
@@ -1162,7 +1168,12 @@ class WP_Posts_List_Table extends WP_List_Table {
}
}
get_inline_data( $post );
/** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */
$quick_edit_enabled = apply_filters( 'quick_edit_enabled_for_post_type', true, $post->post_type );
if ( $quick_edit_enabled ) {
get_inline_data( $post );
}
}
/**
@@ -1223,7 +1234,7 @@ class WP_Posts_List_Table extends WP_List_Table {
}
/**
* Filters the published time of the post.
* Filters the published, scheduled, or unpublished time of the post.
*
* @since 2.5.1
* @since 5.5.0 Removed the difference between 'excerpt' and 'list' modes.
@@ -1453,7 +1464,8 @@ class WP_Posts_List_Table extends WP_List_Table {
}
// Restores the more descriptive, specific name for use within this method.
$post = $item;
$post = $item;
$post_type_object = get_post_type_object( $post->post_type );
$can_edit_post = current_user_can( 'edit_post', $post->ID );
$actions = array();
@@ -1468,7 +1480,17 @@ class WP_Posts_List_Table extends WP_List_Table {
__( 'Edit' )
);
if ( 'wp_block' !== $post->post_type ) {
/**
* Filters whether Quick Edit should be enabled for the given post type.
*
* @since 6.4.0
*
* @param bool $enable Whether to enable the Quick Edit functionality. Default true.
* @param string $post_type Post type name.
*/
$quick_edit_enabled = apply_filters( 'quick_edit_enabled_for_post_type', true, $post->post_type );
if ( $quick_edit_enabled && 'wp_block' !== $post->post_type ) {
$actions['inline hide-if-no-js'] = sprintf(
'<button type="button" class="button-link editinline" aria-label="%s" aria-expanded="false">%s</button>',
/* translators: %s: Post title. */
@@ -2071,16 +2093,23 @@ class WP_Posts_List_Table extends WP_List_Table {
<input type="hidden" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" />
<?php endif; ?>
<div class="notice notice-error notice-alt inline hidden">
<p class="error"></p>
</div>
<?php
wp_admin_notice(
'<p class="error"></p>',
array(
'type' => 'error',
'additional_classes' => array( 'notice-alt', 'inline', 'hidden' ),
'paragraph_wrap' => false,
)
);
?>
</div>
</div> <!-- end of .inline-edit-wrapper -->
</td></tr>
<?php
$bulk++;
++$bulk;
endwhile;
?>
</tbody></table>