Verified Commit b9d2c41d authored by John James Jacoby's avatar John James Jacoby
Browse files

Bump styling to better match WordPress 5.3.

parent 920529aa
<?php
/**
* Plugin Name: WP Pretty Filters
* Plugin URI: http://wordpress.org/plugins/wp-pretty-filters/
* Author: John James Jacoby
* Author URI: https://jjj.blog/
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: wp-pretty-filters
* Version: 1.1.0
* Description: Makes post filters match Media & Attachments
/*
* Plugin Name: WP Pretty Filters
* Plugin URI: https://wordpress.org/plugins/wp-chosen/
* Author: John James Jacoby
* Author URI: https://jjj.blog
* Version: 2.0.0
* Requires at least: 5.3
* Requires PHP: 7.0
* Description: Makes post filters match Media & Attachments
* License: GPLv2 or later
*/
// Exit if accessed directly
......@@ -51,5 +51,5 @@ function wp_pretty_filters_get_plugin_url() {
* @return int
*/
function wp_pretty_filters_get_asset_version() {
return 201705090001;
return 202003090001;
}
body.js #posts-filter .search-box:first-child,
body.js .tablenav > .actions + .actions {
visibility: hidden;
}
.wp-pretty-filters {
float: none;
clear: both;
display: inline-block;
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin: 9pt 0 5px;
margin: 15px 0 5px;
padding: 10px;
width: 100%;
box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
border: 1px solid #e5e5e5;
border: 1px solid #ccd0d4;
background: #fff;
color: #555;
font-size: 13px;
}
.wp-pretty-filters .search-box label {
margin: 0 .2em 0 0;
vertical-align: baseline;
}
.wp-pretty-filters .search-box input[name="s"] {
float: none;
}
.wp-pretty-filters .chosen-container {
margin-right: 4px;
}
......
......@@ -10,7 +10,8 @@ jQuery( document ).ready( function( $ ) {
}
// Look for actions that aren't bulk
var filters = toptablenav.find( '.actions:not(.bulkactions)' );
var filters = toptablenav.find( '.actions:not(.bulkactions)' ),
searchbox = $( 'p.search-box' );
// Bail if no filters
if ( ! filters.length ) {
......@@ -23,6 +24,13 @@ jQuery( document ).ready( function( $ ) {
// Relocate
toptablenav.before( filters );
if ( searchbox.length ) {
filters.append( searchbox );
$( '#search-submit' ).hide();
searchbox.find( 'label' ).removeClass( 'screen-reader-text' );
searchbox.show();
}
// Hide if pretty filters is empty
if ( ! $.trim( filters.html() ) ) {
filters.hide();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment