Commit 07e653be authored by John James Jacoby's avatar John James Jacoby
Browse files

Bump to 1.1.0.

parent 8cc0b974
......@@ -2,8 +2,8 @@
Contributors: johnjamesjacoby, stuttter
Tags: jquery, filter, select, filters
Requires at least: 4.3
Tested up to: 4.7
Stable tag: 1.0.0
Tested up to: 4.8
Stable tag: 1.1.0
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9Q4F4EL5YJ62J
== Description ==
......@@ -44,7 +44,7 @@ WP Pretty Filters makes post filters better match what's already in Media & Atta
= What dropdowns does this target? =
`
#posts-filter .tablenav.top .actions:not(.bulkactions)
.tablenav.top .actions:not(.bulkactions)
`
= Where can I get support? =
......@@ -57,6 +57,12 @@ http://github.com/stuttter/wp-pretty-filters/
== Changelog ==
= 1.1.0 - 2017/05/09 =
* Support users, BuddyPress, and more
* Hide secondary user role assignment
* Hide pretty filters if empty
* Load in wp_head to avoid DOM jitter
= 1.0.0 - 2016/09/13 =
* Chosen Support
* Stable release
......
......@@ -8,7 +8,7 @@
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: wp-pretty-filters
* Version: 1.0.0
* Version: 1.1.0
* Description: Makes post filters match Media & Attachments
*/
......@@ -27,8 +27,8 @@ function _wp_pretty_filters() {
$ver = wp_pretty_filters_get_asset_version();
// Styles
wp_enqueue_style( 'wp-pretty-filters', $url . 'assets/css/pretty-filters.css', array(), $ver );
wp_enqueue_script( 'wp-pretty-filters', $url . 'assets/js/pretty-filters.js', array( 'jquery' ), $ver, true );
wp_enqueue_style( 'wp-pretty-filters', $url . 'assets/css/pretty-filters.css', array(), $ver );
wp_enqueue_script( 'wp-pretty-filters', $url . 'assets/js/pretty-filters.js', array( 'jquery' ), $ver );
}
add_action( 'admin_enqueue_scripts', '_wp_pretty_filters', 11 );
......@@ -51,5 +51,5 @@ function wp_pretty_filters_get_plugin_url() {
* @return int
*/
function wp_pretty_filters_get_asset_version() {
return 201609130002;
return 201705090001;
}
.wp-pretty-filters {
float: none;
clear: both;
display: inline-block;
position: relative;
-webkit-box-sizing: border-box;
......@@ -19,5 +17,10 @@
}
.wp-pretty-filters .chosen-container {
margin-right: 4px;
}
.wp-pretty-filters .chosen-container + input,
.wp-pretty-filters .chosen-container + button {
margin-right: 8px;
}
jQuery( document ).ready( function( $ ) {
'use strict';
// Look for posts
var toptablenav = $( '#posts-filter .tablenav.top' );
// Look for top tablenav
var toptablenav = $( '.tablenav.top' );
// Maybe try comments
// Bail if no toptablenav
if ( ! toptablenav.length ) {
toptablenav = $( '#comments-form .tablenav.top' );
return;
}
// Only proceed if toptablenav was found
if ( toptablenav.length ) {
var filters = toptablenav.find( '.actions:not(.bulkactions)' );
// Look for actions that aren't bulk
var filters = toptablenav.find( '.actions:not(.bulkactions)' );
// Add a class for custom styling
filters.addClass( 'wp-pretty-filters' );
// Bail if no filters
if ( ! filters.length ) {
return;
}
// Add a class for custom styling
filters.addClass( 'wp-pretty-filters' );
// Relocate
toptablenav.before( filters );
// Relocate
toptablenav.before( filters );
// Hide if pretty filters is empty
if ( ! $.trim( filters.html() ) ) {
filters.hide();
}
// Maybe hide the users bottom tablenav
$( 'body.users-php .tablenav.bottom' )
.find( '.actions:not(.bulkactions)' )
.hide();
} );
Markdown is supported
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