PluginProbe
FeedWordPress / 2012.1212
FeedWordPress v2012.1212
trunk 0.8 0.9 0.91 0.95 0.96 0.97 0.98 0.981 0.99 0.991 0.992 0.993 2008.1030 2008.1101 2008.1105 2008.1214 2009.0612 2009.0613 2009.0618 2009.0707 2009.1111 2009.1112 2010.0127 2010.0528 All 65 releases
← All changes | inspectpostmeta.class.php +10 -6 trunk2012.1212 View file →
@@ -7,18 +7,22 @@
7 7 * Author URI: http://projects.radgeek.com
8 8 */
9 9
10 10 class InspectPostMeta {
11 - public function __construct ($in_hook = true) {
12 - add_action('add_meta_boxes', array($this, 'add_meta_boxes'), 10, 2);
13 - } /* InspectPostMeta::__construct () */
11 + function InspectPostMeta ($in_hook = true) {
12 + if (!$in_hook) :
13 + add_action('admin_menu', array($this, 'add_meta_box'));
14 + else :
15 + $this->add_meta_box();
16 + endif;
17 + }
14 18
15 - function add_meta_boxes ($post_type, $post) {
19 + function add_meta_box () {
16 20 add_meta_box(
17 21 /*id=*/ 'inspect_post_guid_box',
18 22 /*title=*/ 'Post GUID and Meta Data',
19 23 /*callback=*/ array($this, 'meta_box'),
20 - /*page=*/ $post_type,
24 + /*page=*/ 'post',
21 25 /*context=*/ 'normal',
22 26 /*priority=*/ 'default'
23 27 );
24 28 }
@@ -49,9 +53,9 @@
49 53 $idx = 1;
50 54 foreach ($values as $value) :
51 55 print "<tr><th style='text-align: left' scope='row'>".esc_html($key);
52 56 if ($idx > 1) :
53 - print esc_html( sprintf( '[%d]', intval( $idx ) ) );
57 + print "[$idx]";
54 58 endif;
55 59 print ":</th> ";
56 60 print "<td><pre><code>".esc_html($value)."</code></pre>";
57 61 print "</td></tr>\n";