Version Description
- Update: Made the ID column sortable
- Code Optimization
Download this release
Release Info
Developer | catchthemes |
Plugin | Catch IDs |
Version | 1.3 |
Comparing to | |
See all releases |
Code changes from version 1.2.6 to 1.3
- catch-ids.php +29 -39
- languages/catch-ids.pot +4 -4
- readme.txt +7 -3
catch-ids.php
CHANGED
@@ -3,17 +3,17 @@
|
|
3 |
Plugin Name: Catch IDs
|
4 |
Plugin URI: http://catchthemes.com/wp-plugins/catch-ids/
|
5 |
Description: Catch IDs is a simple and light weight plugin to show the Post ID, Page ID, Media ID, Links ID, Category ID, Tag ID and User ID in the Admin Section Table. This plugin was initially develop to support our themes features slider. Then we thought that this will be helpful to all the WordPress Admin Users. Just activate and catch IDs in your page, post, category, tag and media pages.
|
6 |
-
Version: 1.
|
7 |
License: GNU General Public License, version 3 (GPLv3)
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
9 |
Author: Catch Themes
|
10 |
Author URI: http://catchthemes.com
|
11 |
Text Domain: catch-ids
|
12 |
-
Tags:
|
13 |
*/
|
14 |
|
15 |
/*
|
16 |
-
Copyright (C) 2012-
|
17 |
|
18 |
This program is free software; you can redistribute it and/or modify
|
19 |
it under the terms of the GNU General Public License as published by
|
@@ -29,26 +29,14 @@ You should have received a copy of the GNU General Public License
|
|
29 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
30 |
*/
|
31 |
|
32 |
-
if ( ! defined( 'CATCHIDS_FILE' ) ) {
|
33 |
-
define( 'CATCHIDS_FILE', __FILE__ );
|
34 |
-
}
|
35 |
-
|
36 |
-
if ( ! defined( 'CATCHIDS_PATH' ) ) {
|
37 |
-
define( 'CATCHIDS_PATH', plugin_dir_path( CATCHIDS_FILE ) );
|
38 |
-
}
|
39 |
-
|
40 |
-
if ( ! defined( 'CATCHIDS_BASENAME' ) ) {
|
41 |
-
define( 'CATCHIDS_BASENAME', plugin_basename( CATCHIDS_FILE ) );
|
42 |
-
}
|
43 |
-
|
44 |
/**
|
45 |
* Make plugin available for translation
|
46 |
* Translations can be filed in the /languages/ directory
|
47 |
*/
|
48 |
function catchids_load_textdomain() {
|
49 |
-
load_plugin_textdomain( 'catch-ids', false, dirname(
|
50 |
}
|
51 |
-
add_action( '
|
52 |
|
53 |
|
54 |
/**
|
@@ -62,27 +50,30 @@ if ( ! function_exists( 'catchids_column' ) ):
|
|
62 |
* Prepend the new column to the columns array
|
63 |
*/
|
64 |
function catchids_column($cols) {
|
65 |
-
$
|
|
|
66 |
return $cols;
|
67 |
}
|
68 |
-
endif; // catchids_column
|
69 |
|
|
|
70 |
|
71 |
if ( ! function_exists( 'catchids_value' ) ) :
|
72 |
/**
|
73 |
* Echo the ID for the new column
|
74 |
*/
|
75 |
function catchids_value( $column_name, $id ) {
|
76 |
-
if (
|
77 |
echo $id;
|
|
|
78 |
}
|
79 |
endif; // catchids_value
|
80 |
|
81 |
|
82 |
if ( ! function_exists( 'catchids_return_value' ) ) :
|
83 |
function catchids_return_value( $value, $column_name, $id ) {
|
84 |
-
if (
|
85 |
-
$value
|
|
|
86 |
return $value;
|
87 |
}
|
88 |
endif; // catchids_return_value
|
@@ -102,6 +93,7 @@ function catchids_css() {
|
|
102 |
<?php
|
103 |
}
|
104 |
endif; // catchids_css
|
|
|
105 |
|
106 |
|
107 |
if ( ! function_exists( 'catchids_add' ) ) :
|
@@ -109,42 +101,40 @@ if ( ! function_exists( 'catchids_add' ) ) :
|
|
109 |
* Actions/Filters for various tables and the css output
|
110 |
*/
|
111 |
function catchids_add() {
|
112 |
-
add_action( 'admin_head', 'catchids_css');
|
113 |
-
|
114 |
-
// For Post Management
|
115 |
-
add_filter( 'manage_posts_columns', 'catchids_column' );
|
116 |
-
add_action( 'manage_posts_custom_column', 'catchids_value', 10, 2 );
|
117 |
-
|
118 |
-
// For Page Management
|
119 |
-
add_filter( 'manage_pages_columns', 'catchids_column' );
|
120 |
-
add_action( 'manage_pages_custom_column', 'catchids_value', 10, 2 );
|
121 |
-
|
122 |
// For Media Management
|
123 |
-
|
124 |
-
|
125 |
|
126 |
// For Link Management
|
127 |
-
add_filter( 'manage_link-manager_columns', 'catchids_column' );
|
128 |
add_action( 'manage_link_custom_column', 'catchids_value', 10, 2 );
|
|
|
129 |
|
130 |
// For Category Management
|
131 |
add_action( 'manage_edit-link-categories_columns', 'catchids_column' );
|
132 |
add_filter( 'manage_link_categories_custom_column', 'catchids_return_value', 10, 3 );
|
133 |
|
134 |
// For Tags Management
|
135 |
-
foreach
|
136 |
-
add_action("manage_edit-${taxonomy}_columns",
|
137 |
-
add_filter("manage_${taxonomy}_custom_column", '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
}
|
139 |
|
140 |
// For User Management
|
141 |
add_action( 'manage_users_columns', 'catchids_column' );
|
142 |
add_filter( 'manage_users_custom_column', 'catchids_return_value', 10, 3 );
|
|
|
143 |
|
144 |
// For Comment Management
|
145 |
add_action( 'manage_edit-comments_columns', 'catchids_column' );
|
146 |
add_action( 'manage_comments_custom_column', 'catchids_value', 10, 2 );
|
|
|
147 |
}
|
148 |
endif; // catchids_add
|
149 |
-
|
150 |
add_action( 'admin_init', 'catchids_add' );
|
3 |
Plugin Name: Catch IDs
|
4 |
Plugin URI: http://catchthemes.com/wp-plugins/catch-ids/
|
5 |
Description: Catch IDs is a simple and light weight plugin to show the Post ID, Page ID, Media ID, Links ID, Category ID, Tag ID and User ID in the Admin Section Table. This plugin was initially develop to support our themes features slider. Then we thought that this will be helpful to all the WordPress Admin Users. Just activate and catch IDs in your page, post, category, tag and media pages.
|
6 |
+
Version: 1.3
|
7 |
License: GNU General Public License, version 3 (GPLv3)
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
9 |
Author: Catch Themes
|
10 |
Author URI: http://catchthemes.com
|
11 |
Text Domain: catch-ids
|
12 |
+
Tags: catch-ids, simple, admin, wp-admin, show, ids, post, page, category, media, links, tag, user, id, post id, page id, category id
|
13 |
*/
|
14 |
|
15 |
/*
|
16 |
+
Copyright (C) 2012-2016 Catch Themes, (info@catchthemes.com)
|
17 |
|
18 |
This program is free software; you can redistribute it and/or modify
|
19 |
it under the terms of the GNU General Public License as published by
|
29 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
30 |
*/
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
* Make plugin available for translation
|
34 |
* Translations can be filed in the /languages/ directory
|
35 |
*/
|
36 |
function catchids_load_textdomain() {
|
37 |
+
load_plugin_textdomain( 'catch-ids', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
|
38 |
}
|
39 |
+
add_action( 'plugins_loaded', 'catchids_load_textdomain' );
|
40 |
|
41 |
|
42 |
/**
|
50 |
* Prepend the new column to the columns array
|
51 |
*/
|
52 |
function catchids_column($cols) {
|
53 |
+
$column_id = array( 'catchids' => __( 'ID', 'catch-ids' ) );
|
54 |
+
$cols = array_slice( $cols, 0, 1, true ) + $column_id + array_slice( $cols, 1, NULL, true );
|
55 |
return $cols;
|
56 |
}
|
|
|
57 |
|
58 |
+
endif; // catchids_column
|
59 |
|
60 |
if ( ! function_exists( 'catchids_value' ) ) :
|
61 |
/**
|
62 |
* Echo the ID for the new column
|
63 |
*/
|
64 |
function catchids_value( $column_name, $id ) {
|
65 |
+
if ( 'catchids' == $column_name ) {
|
66 |
echo $id;
|
67 |
+
}
|
68 |
}
|
69 |
endif; // catchids_value
|
70 |
|
71 |
|
72 |
if ( ! function_exists( 'catchids_return_value' ) ) :
|
73 |
function catchids_return_value( $value, $column_name, $id ) {
|
74 |
+
if ( 'catchids' == $column_name ) {
|
75 |
+
$value .= $id;
|
76 |
+
}
|
77 |
return $value;
|
78 |
}
|
79 |
endif; // catchids_return_value
|
93 |
<?php
|
94 |
}
|
95 |
endif; // catchids_css
|
96 |
+
add_action( 'admin_head', 'catchids_css');
|
97 |
|
98 |
|
99 |
if ( ! function_exists( 'catchids_add' ) ) :
|
101 |
* Actions/Filters for various tables and the css output
|
102 |
*/
|
103 |
function catchids_add() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
// For Media Management
|
105 |
+
add_action( "manage_media_columns" , 'catchids_column' );
|
106 |
+
add_filter( "manage_media_custom_column" , 'catchids_value' , 10 , 3 );
|
107 |
|
108 |
// For Link Management
|
|
|
109 |
add_action( 'manage_link_custom_column', 'catchids_value', 10, 2 );
|
110 |
+
add_filter( 'manage_link-manager_columns', 'catchids_column' );
|
111 |
|
112 |
// For Category Management
|
113 |
add_action( 'manage_edit-link-categories_columns', 'catchids_column' );
|
114 |
add_filter( 'manage_link_categories_custom_column', 'catchids_return_value', 10, 3 );
|
115 |
|
116 |
// For Tags Management
|
117 |
+
foreach( get_taxonomies() as $taxonomy ) {
|
118 |
+
add_action( "manage_edit-${taxonomy}_columns" , 'catchids_column' );
|
119 |
+
add_filter( "manage_${taxonomy}_custom_column" , 'catchids_value' , 10 , 3 );
|
120 |
+
add_filter( "manage_edit-${taxonomy}_sortable_columns" , 'catchids_column' );
|
121 |
+
}
|
122 |
+
|
123 |
+
foreach( get_post_types() as $ptype ) {
|
124 |
+
add_action( "manage_edit-${ptype}_columns" , 'catchids_column' );
|
125 |
+
add_filter( "manage_${ptype}_posts_custom_column" , 'catchids_value' , 10 , 3 );
|
126 |
+
add_filter( "manage_edit-${ptype}_sortable_columns" , 'catchids_column' );
|
127 |
}
|
128 |
|
129 |
// For User Management
|
130 |
add_action( 'manage_users_columns', 'catchids_column' );
|
131 |
add_filter( 'manage_users_custom_column', 'catchids_return_value', 10, 3 );
|
132 |
+
add_filter( "manage_users_sortable_columns" , 'catchids_column' );
|
133 |
|
134 |
// For Comment Management
|
135 |
add_action( 'manage_edit-comments_columns', 'catchids_column' );
|
136 |
add_action( 'manage_comments_custom_column', 'catchids_value', 10, 2 );
|
137 |
+
add_filter( "manage_edit-comments_sortable_columns" , 'catchids_column' );
|
138 |
}
|
139 |
endif; // catchids_add
|
|
|
140 |
add_action( 'admin_init', 'catchids_add' );
|
languages/catch-ids.pot
CHANGED
@@ -4,8 +4,8 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Catch Ids\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tags/catch-ids\n"
|
7 |
-
"POT-Creation-Date:
|
8 |
-
"PO-Revision-Date:
|
9 |
"Last-Translator: Pratik Shrestha <pratik@catchthemes.com>\n"
|
10 |
"Language-Team: Catch Themes <info@catchthemes.com>\n"
|
11 |
"Language: en_US\n"
|
@@ -13,12 +13,12 @@ msgstr ""
|
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
16 |
-
"X-Generator: Poedit 1.
|
17 |
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;esc_attr_e;esc_attr__;_nx;"
|
18 |
"esc_html__\n"
|
19 |
"X-Poedit-Basepath: .\n"
|
20 |
"X-Poedit-SearchPath-0: ..\n"
|
21 |
|
22 |
-
#: ../catch-ids.php:
|
23 |
msgid "ID"
|
24 |
msgstr ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Catch Ids\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tags/catch-ids\n"
|
7 |
+
"POT-Creation-Date: 2016-02-18 17:24+0545\n"
|
8 |
+
"PO-Revision-Date: 2016-02-18 17:24+0545\n"
|
9 |
"Last-Translator: Pratik Shrestha <pratik@catchthemes.com>\n"
|
10 |
"Language-Team: Catch Themes <info@catchthemes.com>\n"
|
11 |
"Language: en_US\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
16 |
+
"X-Generator: Poedit 1.6.10\n"
|
17 |
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;esc_attr_e;esc_attr__;_nx;"
|
18 |
"esc_html__\n"
|
19 |
"X-Poedit-Basepath: .\n"
|
20 |
"X-Poedit-SearchPath-0: ..\n"
|
21 |
|
22 |
+
#: ../catch-ids.php:53
|
23 |
msgid "ID"
|
24 |
msgstr ""
|
readme.txt
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
|
3 |
Contributors: catchthemes, sakinshrestha, pratikshrestha
|
4 |
Donate link: http://catchthemes.com/wp-plugins/catch-ids/
|
5 |
-
Tags: catch-ids, simple, admin, wp-admin, show, ids, post, page, category, media, links, tag, user
|
6 |
Requires at least: 3.5
|
7 |
-
Tested up to: 4.4
|
8 |
-
Stable tag: 1.
|
9 |
License: GNU General Public License, version 3 (GPLv3)
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
11 |
|
@@ -47,6 +47,10 @@ Manual Installation through FTP access
|
|
47 |
|
48 |
== Changelog ==
|
49 |
|
|
|
|
|
|
|
|
|
50 |
= 1.2.6
|
51 |
* Compatibility check up to version 4.4
|
52 |
|
2 |
|
3 |
Contributors: catchthemes, sakinshrestha, pratikshrestha
|
4 |
Donate link: http://catchthemes.com/wp-plugins/catch-ids/
|
5 |
+
Tags: catch-ids, simple, admin, wp-admin, show, ids, post, page, category, media, links, tag, user, id, post id, page id, category id
|
6 |
Requires at least: 3.5
|
7 |
+
Tested up to: 4.4.2
|
8 |
+
Stable tag: 1.3
|
9 |
License: GNU General Public License, version 3 (GPLv3)
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
11 |
|
47 |
|
48 |
== Changelog ==
|
49 |
|
50 |
+
= 1.3 =
|
51 |
+
* Update: Made the ID column sortable
|
52 |
+
* Code Optimization
|
53 |
+
|
54 |
= 1.2.6
|
55 |
* Compatibility check up to version 4.4
|
56 |
|