[wp-trac] [WordPress Trac] #30035: Can't put buttons in the Publish meta box
WordPress Trac
noreply at wordpress.org
Sat Oct 18 22:50:47 UTC 2014
#30035: Can't put buttons in the Publish meta box
--------------------------+-----------------------------------------
Reporter: ericlewis | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.1
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses: javascript, administration
--------------------------+-----------------------------------------
Changes (by SergeyBiryukov):
* component: Administration => Editor
* milestone: Awaiting Review => 4.1
Old description:
> {{{!#php
> <?php
> add_action( 'post_submitbox_misc_actions', function() { ?><button
> type='button'>hi</button><?php } );
> }}}
>
> Clicking that button and then preview will break your stuffs.
>
> This is because [https://core.trac.wordpress.org/browser/tags/3.9.1/src
> /wp-admin/js/post.js?annotate=blame#L418 this selector is too greedy]. We
> should remove the :button selector here.
New description:
{{{
<?php
add_action( 'post_submitbox_misc_actions', function() { ?><button
type='button'>hi</button><?php } );
}}}
Clicking that button and then preview will break your stuffs.
This is because [https://core.trac.wordpress.org/browser/tags/3.9.1/src
/wp-admin/js/post.js?annotate=blame#L418 this selector is too greedy]. We
should remove the :button selector here.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30035#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list