[wp-trac] [WordPress Trac] #24013: Hide "Add Media" for some post formats
WordPress Trac
noreply at wordpress.org
Fri Apr 19 06:52:39 UTC 2013
#24013: Hide "Add Media" for some post formats
-------------------------------------+--------------------
Reporter: markjaquith | Owner:
Type: task (blessed) | Status: new
Priority: high | Milestone: 3.6
Component: Post Formats | Version: trunk
Severity: normal | Resolution:
Keywords: needs-testing has-patch |
-------------------------------------+--------------------
Comment (by aniketpant):
[http://core.trac.wordpress.org/attachment/ticket/24013/24013.2.diff
24013.2.diff] introduces a new array like `noUIFormats` called
`noInsertMediaButtonFormats`. Currently, `noInsertMediaButtonFormats` is
only used to remove `#insert-media-button` from the `Add New Post` page.
In the future, if there were the need to make more changes to these ''no
media button'' formats, it can be easily carried out by making changes to
the following code -
{{{
if ( -1 < $.inArray( format, noInsertMediaButtonFormats ) ) {
$('#insert-media-button').hide();
} else {
$('#insert-media-button').show();
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24013#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list