Compare commits
8 Commits
97b5595aca
...
ac3379da25
Author | SHA1 | Date | |
---|---|---|---|
ac3379da25 | |||
9a59b58013 | |||
|
a6f6ce3c1f | ||
|
8ebc5f6d4e | ||
|
2010ad58f0 | ||
|
ff165a4a94 | ||
|
1030504f92 | ||
|
0c0ed76009 |
BIN
assets/banner-1544x500.jpg
Normal file
BIN
assets/banner-1544x500.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 144 KiB |
BIN
assets/banner-772x250.jpg
Normal file
BIN
assets/banner-772x250.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
BIN
assets/icon-128x128.png
Normal file
BIN
assets/icon-128x128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.5 KiB |
BIN
assets/icon-256x256.png
Normal file
BIN
assets/icon-256x256.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
assets/screenshot-1.jpg
Normal file
BIN
assets/screenshot-1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 193 KiB |
9
js/obvious-post-states.js
Normal file
9
js/obvious-post-states.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
jQuery(document).ready(function( $ ) {
|
||||||
|
|
||||||
|
if (($('span.post-state').length != 0) && ($('span.post-state').parent().is('td') == false)) {
|
||||||
|
$('span.post-state').each(function() {
|
||||||
|
$(this).insertBefore($(this).parent());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
38
obvious-post-states.css
Normal file
38
obvious-post-states.css
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
.post-state {
|
||||||
|
background: #999999;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: #ffffff;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: -1px 10px 5px 10px;
|
||||||
|
padding: 1px 5px;
|
||||||
|
vertical-align: top;
|
||||||
|
float: right;
|
||||||
|
width: 120px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-future .post-state {
|
||||||
|
background: #2a8991;
|
||||||
|
}
|
||||||
|
.status-private .post-state {
|
||||||
|
background: #667;
|
||||||
|
}
|
||||||
|
.post-password-required .post-state {
|
||||||
|
background: #912a46;
|
||||||
|
}
|
||||||
|
.status-draft .post-state {
|
||||||
|
background: #999;
|
||||||
|
}
|
||||||
|
.status-sticky .post-state {
|
||||||
|
background: #2a3491;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row-actions {
|
||||||
|
padding: 4px 0 0 0;
|
||||||
|
}
|
||||||
|
td.post-title strong,
|
||||||
|
td.page-title strong {
|
||||||
|
display: inline;
|
||||||
|
}
|
33
obvious-post-states.php
Normal file
33
obvious-post-states.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
Plugin Name: Obvious Post States
|
||||||
|
Plugin URI: http://sevenbold.com/wordpress/
|
||||||
|
Description: Make your WordPress post state text (draft, pending, sticky, etc) stand out.
|
||||||
|
Author: Ryan Sommers
|
||||||
|
Version: 1.0.3
|
||||||
|
Author URI: http://ryansommers.com
|
||||||
|
*/
|
||||||
|
|
||||||
|
function obvious_post_states_files() {
|
||||||
|
wp_enqueue_style( 'obvious-post-states', plugins_url('obvious-post-states.css', __FILE__) );
|
||||||
|
wp_enqueue_script( 'obvious-post-states', plugins_url( "js/obvious-post-states.js", __FILE__ ), array( 'jquery' ), '1.0.0', true );
|
||||||
|
}
|
||||||
|
add_action( 'admin_enqueue_scripts', 'obvious_post_states_files' );
|
||||||
|
add_action( 'login_enqueue_scripts', 'obvious_post_states_files' );
|
||||||
|
|
||||||
|
// Remove the hyphen before the post state
|
||||||
|
add_filter( 'display_post_states', 'obvious_post_states_post_state' );
|
||||||
|
function obvious_post_states_post_state( $post_states ) {
|
||||||
|
if ( !empty($post_states) ) {
|
||||||
|
$state_count = count($post_states);
|
||||||
|
$i = 0;
|
||||||
|
foreach ( $post_states as $state ) {
|
||||||
|
++$i;
|
||||||
|
( $i == $state_count ) ? $sep = '' : $sep = '';
|
||||||
|
echo "<span class='post-state'>$state$sep</span>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
56
readme.txt
Normal file
56
readme.txt
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
=== Obvious Post States ===
|
||||||
|
Contributors: ryansommers
|
||||||
|
Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LD5WYPVG8AJW4
|
||||||
|
Tags: post state, drafts, pending, sticky, password protected, ryan sommers.
|
||||||
|
Requires at least: 4.0
|
||||||
|
Tested up to: 4.3
|
||||||
|
Stable tag: 1.0.3
|
||||||
|
License: GPLv2 or later
|
||||||
|
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
|
Make the WordPress post state text (draft, pending, sticky, etc) stand out.
|
||||||
|
|
||||||
|
== Description ==
|
||||||
|
|
||||||
|
Obvious Post States does what its name implies: makes the post states of your Posts and Pages stand out.
|
||||||
|
|
||||||
|
Post states like Draft, Pending, Sticky, Password Protected, etc. will be more prominent and obvious.
|
||||||
|
|
||||||
|
Takes into account the built-in WordPress Admin Color Schemes so everything matches.
|
||||||
|
|
||||||
|
Check out the screenshot to see an example.
|
||||||
|
|
||||||
|
== Installation ==
|
||||||
|
|
||||||
|
1. Unzip `obvious-post-states.zip`
|
||||||
|
2. Upload the `obvious-post-states' folder to the `/wp-content/plugins/` directory
|
||||||
|
3. Activate the plugin through the 'Plugins' menu in WordPress
|
||||||
|
|
||||||
|
== Frequently Asked Questions ==
|
||||||
|
|
||||||
|
= How do I know it's working? =
|
||||||
|
|
||||||
|
The post state text (draft, pending, etc) will be moved to the beginning of the column and have a background color. Check out the screenshot.
|
||||||
|
|
||||||
|
== Screenshots ==
|
||||||
|
|
||||||
|
1. Obvious Post States Example
|
||||||
|
|
||||||
|
== Changelog ==
|
||||||
|
|
||||||
|
= 1.0.3 =
|
||||||
|
* Compatibility update for WordPress 4.3.
|
||||||
|
|
||||||
|
= 1.0.2 =
|
||||||
|
* Fixed a bug regarding hidden post titles for Subscriber roles.
|
||||||
|
|
||||||
|
= 1.0.1 =
|
||||||
|
* Added compatibility with the Slate admin theme plugin.
|
||||||
|
|
||||||
|
= 1.0.0 =
|
||||||
|
* Initial release.
|
||||||
|
|
||||||
|
== Upgrade Notice ==
|
||||||
|
|
||||||
|
= 1.0.2 =
|
||||||
|
* Fixed a bug regarding hidden post titles for Subscriber roles.
|
Loading…
Reference in New Issue
Block a user