Version Description
Initial Commit
Download this release
Release Info
Developer | wpsitenet |
Plugin | Show IDs by 99 Robots |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- readme.txt +62 -0
- wpsite-show-ids.php +145 -0
readme.txt
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== WPsite Show IDs ===
|
2 |
+
Contributors: wpsitenet, kjbenk, charliepatel
|
3 |
+
Donate link:
|
4 |
+
Tags: ID, show id, display id, show post id, display post id, reveal id, reveal post id, post, category, media, page, post type, post id, category id, media id, page id, post type id, comments, comment id, custom post type id, link id, show, display, reveal, taxonomy, taxonomy id, wordpress id, wp id, user, user id, tag, tag id, wp-admin
|
5 |
+
Requires at least: 3.9
|
6 |
+
Tested up to: 4.0
|
7 |
+
Stable tag: 1.0
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
The **Show IDs** plugin displays the ID of all posts, categories, pages, taxonomies, users, tags, and more.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
**WPsite Show ID** plugin is super light-weight and does not need any configuration or separate options page. Simply activate the plugin and IDs will be displayed on all admin pages.
|
16 |
+
* Light-weight with no options page required
|
17 |
+
* Adds a new column on admin page to display IDs of all posts, pages, categories, and more
|
18 |
+
* Supports custom post types and custom taxonomies
|
19 |
+
|
20 |
+
= Features =
|
21 |
+
The Show ID plugin will reveal IDs for the following:
|
22 |
+
* posts
|
23 |
+
* pages
|
24 |
+
* categories
|
25 |
+
* links
|
26 |
+
* media
|
27 |
+
* users
|
28 |
+
* comments
|
29 |
+
* link categories
|
30 |
+
* custom taxonomies
|
31 |
+
* custom post types
|
32 |
+
* tags
|
33 |
+
|
34 |
+
== Installation ==
|
35 |
+
|
36 |
+
1. Upload `wpsite-show-ids` to the `/wp-content/plugins/` directory
|
37 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress
|
38 |
+
|
39 |
+
You can install the **WPsite Show IDs** plugin from your WordPress Dashboard or manually via FTP. For more details, visit http://www.wpsite.net
|
40 |
+
|
41 |
+
= From WordPress Dashboard =
|
42 |
+
|
43 |
+
1. Navigate to 'Plugins -> Add New' from your WordPress dashboard.
|
44 |
+
2. Search for `WPsite Show ID` and install it.
|
45 |
+
3. Activate the plugin from Plugins menu.
|
46 |
+
4. Thats it! There is no option configuration or page required.
|
47 |
+
|
48 |
+
= Manual Installation =
|
49 |
+
|
50 |
+
1. Download the plugin file: `wpsite-show-ids.zip`
|
51 |
+
2. Unzip the file
|
52 |
+
3. Upload the `wpsite-show-ids` folder to your `/wp-content/plugins` directory (do not rename the folder)
|
53 |
+
4. Activate the plugin from Plugins menu. There is no option configuration or page required.
|
54 |
+
|
55 |
+
== Screenshots ==
|
56 |
+
|
57 |
+
1. IDs on the all posts page
|
58 |
+
|
59 |
+
== Changelog ==
|
60 |
+
|
61 |
+
= 1.0 =
|
62 |
+
Initial Commit
|
wpsite-show-ids.php
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: WPsite Show IDs
|
4 |
+
plugin URI: http://wpsite.net/wpsite-show-ids
|
5 |
+
Description: Show IDs on all post, page and taxonomy pages.
|
6 |
+
version: 1.0
|
7 |
+
Author: WPSITE.NET
|
8 |
+
Author URI: http://wpsite.net
|
9 |
+
License: GPL2
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Hooks + Filters
|
13 |
+
add_action( 'admin_head', array('WPSiteShowIDs', 'add_css'));
|
14 |
+
|
15 |
+
// For Post Management
|
16 |
+
add_filter( 'manage_posts_columns', array('WPSiteShowIDs', 'add_column') );
|
17 |
+
add_action( 'manage_posts_custom_column', array('WPSiteShowIDs', 'add_value'), 10, 2 );
|
18 |
+
|
19 |
+
// For Page Management
|
20 |
+
add_filter( 'manage_pages_columns', array('WPSiteShowIDs', 'add_column') );
|
21 |
+
add_action( 'manage_pages_custom_column', array('WPSiteShowIDs', 'add_value'), 10, 2 );
|
22 |
+
|
23 |
+
// For Media Management
|
24 |
+
add_filter( 'manage_media_columns', array('WPSiteShowIDs', 'add_column') );
|
25 |
+
add_action( 'manage_media_custom_column', array('WPSiteShowIDs', 'add_value'), 10, 2 );
|
26 |
+
|
27 |
+
// For Link Management
|
28 |
+
add_filter( 'manage_link-manager_columns', array('WPSiteShowIDs', 'add_column') );
|
29 |
+
add_action( 'manage_link_custom_column', array('WPSiteShowIDs', 'add_value'), 10, 2 );
|
30 |
+
|
31 |
+
// For Category Management
|
32 |
+
add_action( 'manage_edit-link-categories_columns', array('WPSiteShowIDs', 'add_column') );
|
33 |
+
add_filter( 'manage_link_categories_custom_column', array('WPSiteShowIDs', 'add_return_value'), 10, 3 );
|
34 |
+
|
35 |
+
// For Taxonmies
|
36 |
+
|
37 |
+
foreach ( get_taxonomies() as $taxonomy ) {
|
38 |
+
if (isset($taxonomy)) {
|
39 |
+
add_action("manage_edit-" . $taxonomy . "_columns", array('WPSiteShowIDs', 'add_column'));
|
40 |
+
add_filter("manage_" . $taxonomy . "_custom_column", array('WPSiteShowIDs', 'add_return_value'), 10, 3);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
// For User Management
|
45 |
+
add_action( 'manage_users_columns', array('WPSiteShowIDs', 'add_column') );
|
46 |
+
add_filter( 'manage_users_custom_column', array('WPSiteShowIDs', 'add_return_value'), 10, 3 );
|
47 |
+
|
48 |
+
// For Comment Management
|
49 |
+
add_action( 'manage_edit-comments_columns', array('WPSiteShowIDs', 'add_column') );
|
50 |
+
add_action( 'manage_comments_custom_column', array('WPSiteShowIDs', 'add_value'), 10, 2 );
|
51 |
+
|
52 |
+
add_action('admin_init', array('WPSiteShowIDs', 'custom_objects'));
|
53 |
+
|
54 |
+
class WPSiteShowIDs {
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Hooks to the 'admin_init'
|
58 |
+
*
|
59 |
+
* @access public
|
60 |
+
* @static
|
61 |
+
* @return void
|
62 |
+
*/
|
63 |
+
static function custom_objects() {
|
64 |
+
|
65 |
+
// For Custom Taxonomies
|
66 |
+
|
67 |
+
foreach ( get_taxonomies(array('public' => true, '_builtin' => false ), 'names') as $custom_taxonomy ) {
|
68 |
+
if (isset($custom_taxonomy)) {
|
69 |
+
add_action("manage_edit-" . $custom_taxonomy . "_columns", array('WPSiteShowIDs', 'add_column'));
|
70 |
+
add_filter("manage_" . $custom_taxonomy . "_custom_column", array('WPSiteShowIDs', 'add_return_value'), 10, 3);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
// For Custom Post Types
|
75 |
+
|
76 |
+
foreach (get_post_types(array('public' => true, '_builtin' => false ), 'names') as $post_type) {
|
77 |
+
if (isset($post_type)) {
|
78 |
+
add_action("manage_edit-". $post_type . "_columns", array('WPSiteShowIDs', 'add_column'));
|
79 |
+
add_filter("manage_". $post_type . "_custom_column", array('WPSiteShowIDs', 'add_return_value'), 10, 3);
|
80 |
+
}
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Hooks to 'admin_head'
|
86 |
+
*
|
87 |
+
* @access public
|
88 |
+
* @static
|
89 |
+
* @return void
|
90 |
+
*/
|
91 |
+
static function add_css() {
|
92 |
+
?>
|
93 |
+
<style type="text/css">
|
94 |
+
#wpsite-show-ids {
|
95 |
+
width: 50px;
|
96 |
+
}
|
97 |
+
</style>
|
98 |
+
<?php
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Adds column to edit screen
|
103 |
+
*
|
104 |
+
* @access public
|
105 |
+
* @static
|
106 |
+
* @param mixed $cols
|
107 |
+
* @return void
|
108 |
+
*/
|
109 |
+
static function add_column($cols) {
|
110 |
+
$cols['wpsite-show-ids'] = 'ID';
|
111 |
+
return $cols;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Adds id value
|
116 |
+
*
|
117 |
+
* @access public
|
118 |
+
* @static
|
119 |
+
* @param mixed $column_name
|
120 |
+
* @param mixed $id
|
121 |
+
* @return void
|
122 |
+
*/
|
123 |
+
static function add_value($column_name, $id) {
|
124 |
+
if ( $column_name == 'wpsite-show-ids' ) {
|
125 |
+
echo $id;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Adds id value
|
131 |
+
*
|
132 |
+
* @access public
|
133 |
+
* @static
|
134 |
+
* @param mixed $value
|
135 |
+
* @param mixed $column_name
|
136 |
+
* @param mixed $id
|
137 |
+
* @return void
|
138 |
+
*/
|
139 |
+
static function add_return_value($value, $column_name, $id) {
|
140 |
+
if ( $column_name == 'wpsite-show-ids' ) {
|
141 |
+
$value = $id;
|
142 |
+
}
|
143 |
+
return $value;
|
144 |
+
}
|
145 |
+
}
|