Shortcode Instructions and Settings. Author: April Hodge Silver Version: 1.3.4 Author URI: http://springthistle.com/ ** Copyright 2011 April Hodge Silver ** 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 St, Fifth Floor, Boston, MA 02110-1301 USA Changelog: 1.0 - 2011-04-14 - Creation 1.1 - 2011-04-28 - Released 1.2 - 2011-04-30 - Optionionated 1.3 - 2011-06-01 - Lots of little enhancements Future to-do list: * Turn sub-pages template function into an actual widget * Clean up asfp_getimage() to be more flexible */ /* * INCLUDE OTHER PHP FILES AND ALSO JAVASCRIPT * * * * * * * * * * * * * * * * * * */ $filepath = WP_PLUGIN_DIR.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); $urlpath = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); /* TEMPLATE FUNCTIONS */ require_once ($filepath.'/template_funcs.php'); /* WIDGETS */ require_once ($filepath.'/widgets.php'); /* SHORTCODES */ require_once ($filepath.'/shortcodes/shortcodes.php'); require_once ($filepath.'/shortcodes/buttons.php'); require_once ($filepath.'/shortcodes/columns.php'); require_once ($filepath.'/shortcodes/icons.php'); /* JAVASCRIPT */ function asfp_init_method() { global $urlpath; if (!is_admin()) { wp_deregister_script('jquery'); wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'); wp_enqueue_script('jquery'); wp_enqueue_script('toolsta',$urlpath.'js/jquery.tools.min.js','jquery'); wp_enqueue_script('ahshead',$urlpath.'js/jquery.ahshead.js','jquery'); if (get_option('asfp_sfjs')==1) wp_enqueue_script('ahssf',$urlpath.'js/jquery.suckerfish.js','jquery'); if (get_option('asfp_cformsjs')==1) wp_enqueue_script('ahscf',$urlpath.'js/jquery.ahscform.js','jquery'); wp_enqueue_script('ahsfoot',$urlpath.'js/jquery.ahsfoot.js','jquery',null,true); } } add_action('init', 'asfp_init_method'); function asfp_headstuff() { global $urlpath; echo "\n\n"; echo ''."\n"; echo ''."\n"; echo "\n\n"; } add_action('wp_head', 'asfp_headstuff'); function asfp_footstuff() { global $urlpath; echo "\n\n"; echo ''."\n"; echo "\n\n"; } add_action('wp_footer', 'asfp_footstuff'); /* ADDITIONAL FEATURES */ if (get_option('asfp_doctypes')==1) add_filter('the_content', 'asfp_doctypes_regex', 9); // DO SHORTCODES AT SIDEBARS add_filter('widget_text', 'do_shortcode'); // AUTOMATIC RSS FEED add_theme_support( 'automatic-feed-links' ); // IMAGES SUPPORT add_theme_support( 'post-thumbnails' ); /* * INCLUDE AND ADD EXPLANATORY/HELP PAGE TO MENU * * * * * * * * * * * * * * * * * * */ function print_howto_page() { global $filepath; include($filepath.'readme.php'); } // adds our new option page to the admin menu function modify_menu_for_asfp() { add_submenu_page( 'tools.php', "April's Super Functions Pack", // Page