From 964ba03e9715ee9f91ffbe689c51226d030166dd Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Fri, 27 Feb 2015 19:43:33 +0000 Subject: [PATCH] Press This: RTL improvements. * Load the RTL version of press-this-editor.css. * Use more semantic class names for the arrows, Makes it easier to swap the arrows in RTL, see #31478. see #31474. git-svn-id: https://develop.svn.wordpress.org/trunk@31577 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/press-this.css | 7 ++++++- src/wp-admin/includes/class-wp-press-this.php | 20 ++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/wp-admin/css/press-this.css b/src/wp-admin/css/press-this.css index b272be9331..66bf5c0637 100644 --- a/src/wp-admin/css/press-this.css +++ b/src/wp-admin/css/press-this.css @@ -1858,11 +1858,16 @@ html { color: #333; } -.post-options .dashicons-arrow-right-alt2 { +.post-option-forward:before { position: absolute; top: 50%; right: 8px; margin-top: -10px; + content: "\f345" +} + +.post-option-back:before { + content: "\f341"; } .lt-ie9 .options-panel, diff --git a/src/wp-admin/includes/class-wp-press-this.php b/src/wp-admin/includes/class-wp-press-this.php index 2da5d55dc7..5a2a54c654 100644 --- a/src/wp-admin/includes/class-wp-press-this.php +++ b/src/wp-admin/includes/class-wp-press-this.php @@ -508,7 +508,13 @@ class WP_Press_This { if ( ! empty( $styles ) ) { $styles .= ','; } - return $styles . admin_url( 'css/press-this-editor.css' ); + + $press_this = admin_url( 'css/press-this-editor.css' ); + if ( is_rtl() ) { + $press_this = str_replace( '.css', '-rtl.css', $press_this ); + } + + return $styles . $press_this; } /** @@ -821,7 +827,7 @@ class WP_Press_This { - + @@ -829,21 +835,21 @@ class WP_Press_This { - +