Compare commits

...

8 Commits

Author SHA1 Message Date
ac3379da25 Merge branch 'main' of https://git.kjodle.net/kjodle/obvious-post-states into main 2021-08-05 19:26:17 -04:00
9a59b58013 Moved status to right; altered color, shape, and size 2021-08-05 19:21:03 -04:00
Ryan
a6f6ce3c1f Version 1.0.3
1.0.3
* Compatibility update for WordPress 4.3.
2015-08-23 13:45:21 -07:00
Ryan
8ebc5f6d4e Updated readme.txt and links
Signed-off-by: Ryan <ryan@ryansommers.com>
2014-12-19 20:40:39 -08:00
Ryan
2010ad58f0 Version 1.0.2
* Fixed a bug regarding hidden post titles for Subscriber roles.

Signed-off-by: Ryan <ryan@ryansommers.com>
2014-12-19 20:35:30 -08:00
Ryan
ff165a4a94 Added donate link 2014-10-18 15:39:08 -07:00
Ryan
1030504f92 Version 1.0.1
Version 1.0.1

* Added compatibility with the Slate admin theme plugin.
2014-10-15 16:23:39 -07:00
Ryan
0c0ed76009 Version 1.0.0 2014-09-30 15:40:12 -07:00
9 changed files with 136 additions and 0 deletions

BIN
assets/banner-1544x500.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

BIN
assets/banner-772x250.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
assets/screenshot-1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

View 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
View 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
View 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
View 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.