Options configuration panel Version: 2.3 Author: AskApache Author URI: http://www.askapache.com */ /* == Installation == 1. Upload askapache-what-is-this.zip to the /wp-content/plugins/ directory 2. Unzip into its own folder /wp-content/plugins/askapache-what-is-this/askapache-what-is-this.php 3. Activate the plugin through the 'Plugins' menu in WordPress by clicking "AskApache WhatIsThis" 4. Go to your Options Panel and open the "AskApache WhatIsThis" submenu. */ /* /--------------------------------------------------------------------\ | | | License: GPL | | | | AskApache WhatIsThis Plugin - Displays what type of document is | | being displayed | | Copyright (C) 2008, AskApache, www.askapache.com | | All rights reserved. | | | | This program is free software; you can redistribute it and/or | | modify it under the terms of the GNU General Public License | | as published by the Free Software Foundation; either version 2 | | of the License, or (at your option) any later version. | | | | This program is distributed in the hope that it will be useful, | | but WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | GNU General Public License for more details. | | | | You should have received a copy of the GNU General Public License | | along with this program; if not, write to the | | Free Software Foundation, Inc. | | 51 Franklin Street, Fifth Floor | | Boston, MA 02110-1301, USA | | | \--------------------------------------------------------------------/ */ function aa_wit_options_setup() { add_options_page('AskApache WhatIsThis', 'AA WhatIsThis', 8, basename(__FILE__), 'aa_wit_page'); } add_action('admin_menu', 'aa_wit_options_setup'); add_action('wp_footer', 'aa_what_is_this'); add_action('admin_footer', 'aa_what_is_this'); function aa_what_is_this(){ //security if ( function_exists('current_user_can') && !current_user_can('manage_options') ) return; $aa_wit_display=''; $aa_wit_displaydebug=''; $aa_wit_activated=get_option('aa_wit_activated'); $aa_wit_debug=get_option('aa_wit_debug'); if($aa_wit_activated){ $aa_wit_display.= '
IS admin
"; else $aa_wit_displaydebug.= "NOT admin
"; if(is_paged())$aa_wit_display.= "IS paged
"; else $aa_wit_displaydebug.= "NOT paged
"; if(is_archive())$aa_wit_display.= "IS archive
"; else $aa_wit_displaydebug.= "NOT archive
"; if(is_attachment())$aa_wit_display.= "IS attachment
"; else $aa_wit_displaydebug.= "NOT attachment
"; if(is_author())$aa_wit_display.= "IS author
"; else $aa_wit_displaydebug.= "NOT author
"; if(is_category())$aa_wit_display.= "IS category
"; else $aa_wit_displaydebug.= "NOT category
"; if(is_tag())$aa_wit_display.= "IS tag
"; else $aa_wit_displaydebug.= "NOT tag
"; if(is_comments_popup())$aa_wit_display.= "IS comments_popup
"; else $aa_wit_displaydebug.= "NOT comments_popup
"; if(is_date())$aa_wit_display.= "IS date
"; else $aa_wit_displaydebug.= "NOT date
"; if(is_day())$aa_wit_display.= "IS day
"; else $aa_wit_displaydebug.= "NOT day
"; if(is_feed())$aa_wit_display.= "IS feed
"; else $aa_wit_displaydebug.= "NOT feed
"; if(is_home())$aa_wit_display.= "IS home
"; else $aa_wit_displaydebug.= "NOT home
"; if(is_month())$aa_wit_display.= "IS month
"; else $aa_wit_displaydebug.= "NOT month
"; if(is_page())$aa_wit_display.= "IS page
"; else $aa_wit_displaydebug.= "NOT page
"; if(is_plugin_page())$aa_wit_display.= "IS plugin_page
"; else $aa_wit_displaydebug.= "NOT plugin_page
"; if(is_preview())$aa_wit_display.= "IS preview
"; else $aa_wit_displaydebug.= "NOT preview
"; if(is_robots())$aa_wit_display.= "IS robots
"; else $aa_wit_displaydebug.= "NOT robots
"; if(is_search())$aa_wit_display.= "IS search
"; else $aa_wit_displaydebug.= "NOT search
"; if(is_single())$aa_wit_display.= "IS single
"; else $aa_wit_displaydebug.= "NOT single
"; if(is_singular())$aa_wit_display.= "IS singular
"; else $aa_wit_displaydebug.= "NOT singular
"; if(is_time())$aa_wit_display.= "IS time
"; else $aa_wit_displaydebug.= "NOT time
"; if(is_trackback())$aa_wit_display.= "IS trackback
"; else $aa_wit_displaydebug.= "NOT trackback
"; if(is_year())$aa_wit_display.= "IS year
"; else $aa_wit_displaydebug.= "NOT year
"; if(is_404())$aa_wit_display.= "IS 404
"; else $aa_wit_displaydebug.= "NOT 404
"; if($aa_wit_debug)$aa_wit_display.=$aa_wit_displaydebug; $aa_wit_display.= "[ AskApache What Is This Plugin 2.3 - Author Home ]