Changeset 645528
- Timestamp:
- 12/28/2012 08:12:41 PM (13 years ago)
- File:
-
- 1 edited
-
debug-this/branches/dev/_inc/extensions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
debug-this/branches/dev/_inc/extensions.php
r645515 r645528 13 13 add_debug_extension('cache', __('Object Cache', 'debug-this'), __('Object Cache stats', 'debug-this'), array($this, 'cache'), 'Cache'); 14 14 add_debug_extension('constants', __('Constants', 'debug-this'), __('Defined Constants', 'debug-this'), array($this, 'constants'), 'PHP'); 15 add_debug_extension('constants-wp', __(' WordPress Constants', 'debug-this'), __('Defined WordPress Constants', 'debug-this'), array($this, 'constants_wordpress'), 'PHP');15 add_debug_extension('constants-wp', __('Constants (WordPress)', 'debug-this'), __('Defined WordPress Constants', 'debug-this'), array($this, 'constants_wordpress'), 'PHP'); 16 16 add_debug_extension('content-width', __('Content Width', 'debug-this'), __('global $content_width', 'debug-this'), array($this, 'content_width'), 'Themes'); 17 17 add_debug_extension('context', __('Context', 'debug-this'), __('Conditional Context Tags', 'debug-this'), array($this, 'context'), 'Query'); … … 173 173 174 174 public function constants(){ 175 $debug = print_r(get_defined_constants(), true); 175 $constants = get_defined_constants(); 176 foreach($constants as $constant => $value) 177 if($value === false) 178 $constants[$constant] = '<span class="error">'.__('false', 'debug-this').'</span>'; 179 elseif($value === '') 180 $constants[$constant] = '<span class="error">'.__('empty string', 'debug-this').'</span>'; 181 $debug = print_r($constants, true); 176 182 return $debug; 177 183 }
Note: See TracChangeset
for help on using the changeset viewer.