[wp-trac] [WordPress Trac] #31373: Revamp Press This
WordPress Trac
noreply at wordpress.org
Wed Dec 23 19:12:19 UTC 2015
#31373: Revamp Press This
-----------------------------+---------------------
Reporter: michael-arestad | Owner: azaozz
Type: task (blessed) | Status: closed
Priority: normal | Milestone: 4.2
Component: Press This | Version: 4.2
Severity: normal | Resolution: fixed
Keywords: | Focuses:
-----------------------------+---------------------
Comment (by azaozz):
Replying to [comment:59 Stagger Lee]:
> Did you reconsider making it easy to change CSS style of Press This
editor...
Not sure what you mean by "make it easy". It is as easy as using a filter
to pass another stylesheet URL. You can use one of the specific Press This
actions and add another URL with `mce_css`. Something like this should
work fine:
{{{
add_action( 'admin_head-press-this.php', 'my_pt_styles' );
function my_pt_styles() {
// Priority > 10 so it loads after the default stylesheet
add_filter( 'mce_css', 'my_press_this_editor_css', 15 );
}
function my_press_this_editor_css( $css ) {
if ( ! empty( $css ) {
$css .= ',';
}
$css .= plugins_url( 'my-subdir/my-pt-style.css', __file__ );
return $css;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31373#comment:60>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list