[wp-trac] [WordPress Trac] #62074: wp_admin_bar_new_content_menu issue
WordPress Trac
noreply at wordpress.org
Wed Sep 18 16:02:24 UTC 2024
#62074: wp_admin_bar_new_content_menu issue
-----------------------------+------------------------------
Reporter: markuscode | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Toolbar | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+------------------------------
Comment (by markuscode):
Same thing with button in title on the table list;
File: "wp-admin/edit-form-advanced.php"
Before:
{{{#!php
<?php
if ( isset( $post_new_file ) && current_user_can(
$post_type_object->cap->create_posts ) ) {
echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '"
class="page-title-action">' . esc_html( $post_type_object->labels->add_new
) . '</a>';
}
}}}
After:
{{{#!php
<?php
<?php
if ( isset( $post_new_file )
&& current_user_can( $post_type_object->cap->create_posts )
&& apply_filters(
"show_new_action_{$post_type_object->name}_in_admin",true,
$post_type_object )
) {
echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '"
class="page-title-action">' . esc_html( $post_type_object->labels->add_new
) . '</a>';
}
?>
}}}
And:
File: "wp-admin/edit.php"
Before:
{{{#!php
<?php
if ( current_user_can( $post_type_object->cap->create_posts ) ) {
echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '"
class="page-title-action">' . esc_html( $post_type_object->labels->add_new
) . '</a>';
}
}}}
After:
{{{#!php
<?php
<?php
if (
current_user_can( $post_type_object->cap->create_posts )
&& apply_filters(
"show_new_action_{$post_type_object->name}_in_admin",true,
$post_type_object )
) {
echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '"
class="page-title-action">' . esc_html( $post_type_object->labels->add_new
) . '</a>';
}
?>
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62074#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list