Version Description
- Tested against WordPress 3.0.1. Everything looks good.
- Centered ID columns. Width reduced to 45px.
Download this release
Release Info
Developer | PriMoThemes |
Plugin | WP Show IDs ( simple, yet elegant ) |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- includes/functions/column-handlers.inc.php +8 -3
- includes/functions/configure-columns.inc.php +13 -11
- includes/syscon.inc.php +1 -6
- readme.txt +8 -4
- wp-show-ids.php +8 -8
includes/functions/column-handlers.inc.php
CHANGED
@@ -30,7 +30,7 @@ if (!function_exists ("_ws_plugin__wp_show_ids_return_value"))
|
|
30 |
{
|
31 |
function _ws_plugin__wp_show_ids_return_value ($value = FALSE, $column_name = FALSE, $id = FALSE)
|
32 |
{
|
33 |
-
return apply_filters ("_ws_plugin__wp_show_ids_return_value", (($column_name === "ws_plugin__wp_show_ids") ? $id : $value), get_defined_vars ());
|
34 |
}
|
35 |
}
|
36 |
/*
|
@@ -40,7 +40,7 @@ if (!function_exists ("_ws_plugin__wp_show_ids_echo_value"))
|
|
40 |
{
|
41 |
function _ws_plugin__wp_show_ids_echo_value ($column_name = FALSE, $id = FALSE)
|
42 |
{
|
43 |
-
echo apply_filters ("_ws_plugin__wp_show_ids_echo_value", (($column_name === "ws_plugin__wp_show_ids") ? $id : null), get_defined_vars ());
|
44 |
}
|
45 |
}
|
46 |
/*
|
@@ -50,7 +50,12 @@ if (!function_exists ("_ws_plugin__wp_show_ids_echo_css"))
|
|
50 |
{
|
51 |
function _ws_plugin__wp_show_ids_echo_css ()
|
52 |
{
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
}
|
56 |
?>
|
30 |
{
|
31 |
function _ws_plugin__wp_show_ids_return_value ($value = FALSE, $column_name = FALSE, $id = FALSE)
|
32 |
{
|
33 |
+
return apply_filters ("_ws_plugin__wp_show_ids_return_value", ( ($column_name === "ws_plugin__wp_show_ids") ? $id : $value), get_defined_vars ());
|
34 |
}
|
35 |
}
|
36 |
/*
|
40 |
{
|
41 |
function _ws_plugin__wp_show_ids_echo_value ($column_name = FALSE, $id = FALSE)
|
42 |
{
|
43 |
+
echo apply_filters ("_ws_plugin__wp_show_ids_echo_value", ( ($column_name === "ws_plugin__wp_show_ids") ? $id : null), get_defined_vars ());
|
44 |
}
|
45 |
}
|
46 |
/*
|
50 |
{
|
51 |
function _ws_plugin__wp_show_ids_echo_css ()
|
52 |
{
|
53 |
+
$css = '<style type="text/css">';
|
54 |
+
$css .= 'th.column-ws_plugin__wp_show_ids { width: 45px; text-align:center; }';
|
55 |
+
$css .= 'td.column-ws_plugin__wp_show_ids { width: 45px; text-align:center; }';
|
56 |
+
$css .= '</style>';
|
57 |
+
/**/
|
58 |
+
echo apply_filters ("_ws_plugin__wp_show_ids_echo_css", $css, get_defined_vars ());
|
59 |
}
|
60 |
}
|
61 |
?>
|
includes/functions/configure-columns.inc.php
CHANGED
@@ -12,7 +12,7 @@ If not, see: <http://www.gnu.org/licenses/>.
|
|
12 |
Direct access denial.
|
13 |
*/
|
14 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
15 |
-
exit("Do not access this file directly.");
|
16 |
/*
|
17 |
Configure all of the required Hooks/Filters for columns & css.
|
18 |
Attach to: add_action("admin_init");
|
@@ -48,17 +48,19 @@ if (!function_exists ("ws_plugin__wp_show_ids_configure"))
|
|
48 |
add_filter ("manage_users_columns", "_ws_plugin__wp_show_ids_return_column");
|
49 |
add_filter ("manage_users_custom_column", "_ws_plugin__wp_show_ids_return_value", 10, 3);
|
50 |
/**/
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
56 |
/**/
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
62 |
/**/
|
63 |
do_action ("ws_plugin__wp_show_ids_after_configure", get_defined_vars ());
|
64 |
}
|
12 |
Direct access denial.
|
13 |
*/
|
14 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
15 |
+
exit ("Do not access this file directly.");
|
16 |
/*
|
17 |
Configure all of the required Hooks/Filters for columns & css.
|
18 |
Attach to: add_action("admin_init");
|
48 |
add_filter ("manage_users_columns", "_ws_plugin__wp_show_ids_return_column");
|
49 |
add_filter ("manage_users_custom_column", "_ws_plugin__wp_show_ids_return_value", 10, 3);
|
50 |
/**/
|
51 |
+
if (is_array ($wp_post_types))
|
52 |
+
foreach ($wp_post_types as $type => $post_type_object) /* Handle WP 3.0+ Post Types. */
|
53 |
+
{
|
54 |
+
add_action ("manage_edit-${type}_columns", "_ws_plugin__wp_show_ids_return_column");
|
55 |
+
add_filter ("manage_${type}_custom_column", "_ws_plugin__wp_show_ids_return_value", 10, 3);
|
56 |
+
}
|
57 |
/**/
|
58 |
+
if (is_array ($wp_taxonomies))
|
59 |
+
foreach ($wp_taxonomies as $taxonomy => $taxonomy_o) /* Handle WP 3.0+ Taxonomies. */
|
60 |
+
{
|
61 |
+
add_action ("manage_edit-${taxonomy}_columns", "_ws_plugin__wp_show_ids_return_column");
|
62 |
+
add_filter ("manage_${taxonomy}_custom_column", "_ws_plugin__wp_show_ids_return_value", 10, 3);
|
63 |
+
}
|
64 |
/**/
|
65 |
do_action ("ws_plugin__wp_show_ids_after_configure", get_defined_vars ());
|
66 |
}
|
includes/syscon.inc.php
CHANGED
@@ -14,12 +14,7 @@ Direct access denial.
|
|
14 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
15 |
exit("Do not access this file directly.");
|
16 |
/*
|
17 |
-
|
18 |
-
*/
|
19 |
-
if (($GLOBALS["WS_PLUGIN__"]["wp_show_ids"]["c"]["is_multisite"] = ((function_exists ("is_multisite") && is_multisite ()) || function_exists ("wpmu_current_site"))) && ((defined ("MULTISITE_FARM") && MULTISITE_FARM) || file_exists (dirname (dirname (__FILE__)) . "/multisite.farm")))
|
20 |
-
$GLOBALS["WS_PLUGIN__"]["wp_show_ids"]["c"]["is_multisite_farm"] = true;
|
21 |
-
/*
|
22 |
-
Determine the full url to the directory this plugin resides in.
|
23 |
*/
|
24 |
$GLOBALS["WS_PLUGIN__"]["wp_show_ids"]["c"]["dir_url"] = content_url () . preg_replace ("/^(.*?)(\/" . preg_quote (basename (WP_CONTENT_DIR), "/") . ")/", "", preg_replace ("/" . preg_quote (DIRECTORY_SEPARATOR, "/") . "/", "/", dirname (dirname (__FILE__))));
|
25 |
/*
|
14 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
15 |
exit("Do not access this file directly.");
|
16 |
/*
|
17 |
+
Determine the full URL to the directory this plugin resides in.
|
|
|
|
|
|
|
|
|
|
|
18 |
*/
|
19 |
$GLOBALS["WS_PLUGIN__"]["wp_show_ids"]["c"]["dir_url"] = content_url () . preg_replace ("/^(.*?)(\/" . preg_quote (basename (WP_CONTENT_DIR), "/") . ")/", "", preg_replace ("/" . preg_quote (DIRECTORY_SEPARATOR, "/") . "/", "/", dirname (dirname (__FILE__))));
|
20 |
/*
|
readme.txt
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
=== WP Show IDs ( simple, yet elegant ) ===
|
2 |
|
3 |
-
Version: 1.0.
|
4 |
-
Stable tag: 1.0.
|
5 |
Framework: WS-DIP-3.0
|
6 |
|
7 |
WordPress Compatible: yes
|
8 |
WP Multisite Compatible: yes
|
9 |
Multisite Blog Farm Compatible: yes
|
10 |
|
11 |
-
Tested up to: 3.0
|
12 |
Requires at least: 3.0
|
13 |
Requires: WordPress® 3.0+, PHP 5.2+
|
14 |
|
@@ -32,7 +32,7 @@ Simple, yet elegant. Shows IDs for Posts, Pages, Media, Links, Categories, Tags,
|
|
32 |
1. Upload the `/wp-show-ids` folder to your `/wp-content/plugins/` directory.
|
33 |
2. Activate the plugin through the `Plugins` menu in WordPress®.
|
34 |
|
35 |
-
***Special instructions for Multisite Blog Farms:** If you're installing this plugin on WordPress® with Multisite/Networking enabled, and you run a Blog Farm ( i.e. you give away free blogs to the public );
|
36 |
|
37 |
== Description ==
|
38 |
|
@@ -55,6 +55,10 @@ Yes, this plugin supports WordPress® 3.0+; even Custom Post Types & Custom
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
|
|
|
|
|
|
58 |
= 1.0.2 =
|
59 |
* Hooks/Filters updated; general cleanup.
|
60 |
* Updated minimum requirements to WordPress® 3.0.
|
1 |
=== WP Show IDs ( simple, yet elegant ) ===
|
2 |
|
3 |
+
Version: 1.0.3
|
4 |
+
Stable tag: 1.0.3
|
5 |
Framework: WS-DIP-3.0
|
6 |
|
7 |
WordPress Compatible: yes
|
8 |
WP Multisite Compatible: yes
|
9 |
Multisite Blog Farm Compatible: yes
|
10 |
|
11 |
+
Tested up to: 3.0.1
|
12 |
Requires at least: 3.0
|
13 |
Requires: WordPress® 3.0+, PHP 5.2+
|
14 |
|
32 |
1. Upload the `/wp-show-ids` folder to your `/wp-content/plugins/` directory.
|
33 |
2. Activate the plugin through the `Plugins` menu in WordPress®.
|
34 |
|
35 |
+
***Special instructions for Multisite Blog Farms:** If you're installing this plugin on WordPress® with Multisite/Networking enabled, and you run a Blog Farm ( i.e. you give away free blogs to the public ); please `define("MULTISITE_FARM", true);` in your /wp-config.php file. When this plugin is running on a Multisite Blog Farm, it will mutate itself ( including its menus ) for safe compatiblity with Blog Farms. You don't need to do this unless you run a Blog Farm. If you're running the standard version of WordPress®, or you run WordPress® Multisite to host your own sites, you can ( and should ) skip this step.*
|
36 |
|
37 |
== Description ==
|
38 |
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
= 1.0.3 =
|
59 |
+
* Tested against WordPress® 3.0.1. Everything looks good.
|
60 |
+
* Centered ID columns. Width reduced to 45px.
|
61 |
+
|
62 |
= 1.0.2 =
|
63 |
* Hooks/Filters updated; general cleanup.
|
64 |
* Updated minimum requirements to WordPress® 3.0.
|
wp-show-ids.php
CHANGED
@@ -9,15 +9,15 @@ along with this software. In the main directory, see: /licensing/
|
|
9 |
If not, see: <http://www.gnu.org/licenses/>.
|
10 |
*/
|
11 |
/*
|
12 |
-
Version: 1.0.
|
13 |
-
Stable tag: 1.0.
|
14 |
Framework: WS-DIP-3.0
|
15 |
|
16 |
WordPress Compatible: yes
|
17 |
WP Multisite Compatible: yes
|
18 |
Multisite Blog Farm Compatible: yes
|
19 |
|
20 |
-
Tested up to: 3.0
|
21 |
Requires at least: 3.0
|
22 |
Requires: WordPress® 3.0+, PHP 5.2+
|
23 |
|
@@ -38,11 +38,11 @@ Tags: admin, administration, dashboard, id, ids, wp ids, wp-ids, show ids, wordp
|
|
38 |
Direct access denial.
|
39 |
*/
|
40 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
41 |
-
exit("Do not access this file directly.");
|
42 |
/*
|
43 |
Define versions.
|
44 |
*/
|
45 |
-
define ("WS_PLUGIN__WP_SHOW_IDS_VERSION", "1.0.
|
46 |
define ("WS_PLUGIN__WP_SHOW_IDS_MIN_PHP_VERSION", "5.2");
|
47 |
define ("WS_PLUGIN__WP_SHOW_IDS_MIN_WP_VERSION", "3.0");
|
48 |
/*
|
@@ -54,7 +54,7 @@ if (version_compare (PHP_VERSION, WS_PLUGIN__WP_SHOW_IDS_MIN_PHP_VERSION, ">=")
|
|
54 |
/*
|
55 |
Hook before loaded.
|
56 |
*/
|
57 |
-
do_action("ws_plugin__wp_show_ids_before_loaded");
|
58 |
/*
|
59 |
System configuraton.
|
60 |
*/
|
@@ -66,7 +66,7 @@ if (version_compare (PHP_VERSION, WS_PLUGIN__WP_SHOW_IDS_MIN_PHP_VERSION, ">=")
|
|
66 |
/*
|
67 |
Hook after system config & hooks are loaded.
|
68 |
*/
|
69 |
-
do_action("ws_plugin__wp_show_ids_config_hooks_loaded");
|
70 |
/*
|
71 |
Function includes.
|
72 |
*/
|
@@ -78,7 +78,7 @@ if (version_compare (PHP_VERSION, WS_PLUGIN__WP_SHOW_IDS_MIN_PHP_VERSION, ">=")
|
|
78 |
/*
|
79 |
Hook after loaded.
|
80 |
*/
|
81 |
-
do_action("ws_plugin__wp_show_ids_after_loaded");
|
82 |
}
|
83 |
else if (is_admin ()) /* Admin compatibility errors. */
|
84 |
{
|
9 |
If not, see: <http://www.gnu.org/licenses/>.
|
10 |
*/
|
11 |
/*
|
12 |
+
Version: 1.0.3
|
13 |
+
Stable tag: 1.0.3
|
14 |
Framework: WS-DIP-3.0
|
15 |
|
16 |
WordPress Compatible: yes
|
17 |
WP Multisite Compatible: yes
|
18 |
Multisite Blog Farm Compatible: yes
|
19 |
|
20 |
+
Tested up to: 3.0.1
|
21 |
Requires at least: 3.0
|
22 |
Requires: WordPress® 3.0+, PHP 5.2+
|
23 |
|
38 |
Direct access denial.
|
39 |
*/
|
40 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
41 |
+
exit ("Do not access this file directly.");
|
42 |
/*
|
43 |
Define versions.
|
44 |
*/
|
45 |
+
define ("WS_PLUGIN__WP_SHOW_IDS_VERSION", "1.0.3");
|
46 |
define ("WS_PLUGIN__WP_SHOW_IDS_MIN_PHP_VERSION", "5.2");
|
47 |
define ("WS_PLUGIN__WP_SHOW_IDS_MIN_WP_VERSION", "3.0");
|
48 |
/*
|
54 |
/*
|
55 |
Hook before loaded.
|
56 |
*/
|
57 |
+
do_action ("ws_plugin__wp_show_ids_before_loaded");
|
58 |
/*
|
59 |
System configuraton.
|
60 |
*/
|
66 |
/*
|
67 |
Hook after system config & hooks are loaded.
|
68 |
*/
|
69 |
+
do_action ("ws_plugin__wp_show_ids_config_hooks_loaded");
|
70 |
/*
|
71 |
Function includes.
|
72 |
*/
|
78 |
/*
|
79 |
Hook after loaded.
|
80 |
*/
|
81 |
+
do_action ("ws_plugin__wp_show_ids_after_loaded");
|
82 |
}
|
83 |
else if (is_admin ()) /* Admin compatibility errors. */
|
84 |
{
|