Skip to content

Commit

Permalink
Merge pull request #7225 from Automattic/sync/georgestephanis/r156697…
Browse files Browse the repository at this point in the history
…-wpcom-1495572720

Omnisearch RTL Changeover!
  • Loading branch information
eliorivero authored May 24, 2017
2 parents a27b570 + 008e9fe commit 28ea039
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 32 deletions.
14 changes: 3 additions & 11 deletions modules/omnisearch/omnisearch-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,15 @@ function wp_loaded() {
if ( wp_style_is( 'genericons', 'registered' ) ) {
$deps = array( 'genericons' );
}
if( is_rtl() ) {
wp_register_style( 'omnisearch-admin', plugins_url( 'rtl/omnisearch-rtl.css', __FILE__ ), $deps );
} else {
wp_register_style( 'omnisearch-admin', plugins_url( 'omnisearch.css', __FILE__ ), $deps );
}
wp_register_style( 'omnisearch-admin', plugins_url( 'omnisearch.css', __FILE__ ), $deps );
wp_style_add_data( 'omnisearch-admin', 'rtl', 'replace' );

}

function jetpack_admin_menu() {
remove_submenu_page( 'index.php', 'omnisearch' );
$this->slug = add_submenu_page( null, __( 'Omnisearch', 'jetpack' ), __( 'Omnisearch', 'jetpack' ), 'edit_posts', 'omnisearch', array( $this, 'omnisearch_page' ) );
add_action( "admin_print_styles-{$this->slug}", array( $this, 'admin_print_styles_jetpack' ) );
add_action( "admin_print_styles-{$this->slug}", array( $this, 'admin_print_styles' ) );
}

function admin_menu() {
Expand All @@ -81,11 +78,6 @@ function admin_print_styles() {
wp_enqueue_style( 'omnisearch-admin' );
}

function admin_print_styles_jetpack() {
wp_enqueue_style( 'omnisearch-admin' );
wp_enqueue_style( 'omnisearch-jetpack' );
}

function omnisearch_page() {
$results = array();
$s = isset( $_GET['s'] ) ? $_GET['s'] : '';
Expand Down
10 changes: 0 additions & 10 deletions modules/omnisearch/omnisearch-jetpack.css

This file was deleted.

File renamed without changes.
11 changes: 0 additions & 11 deletions modules/omnisearch/rtl/omnisearch-jetpack-rtl.css

This file was deleted.

0 comments on commit 28ea039

Please sign in to comment.