* Decide whether to use these files as a standalone plugin or not (i.e. integrate them in a theme). */ if (!defined('TPS_USE_AS_STANDALONE')) { define('TPS_USE_AS_STANDALONE', true); } /* * Define the plugin URL. */ if (!defined('TPS_PLUGINS_URL')) { define('TPS_PLUGINS_URL', plugins_url('', __FILE__) . '/'); } // Include other files. include dirname(__FILE__) . '/TpsMisc.php'; include dirname(__FILE__) . '/TpsEnqueues.php'; include dirname(__FILE__) . '/TpsShortCodes.php'; include dirname(__FILE__) . '/TpsOptions.php'; include dirname(__FILE__) . '/admin-menu.php'; // Initialize plugin options. TpsOptions::initOptions(); // Add hooks. add_action('the_post', 'TpsMisc::the_post', 999999); add_action('the_content', 'TpsMisc::the_content', 999999); add_action('wp_enqueue_scripts', 'TpsEnqueues::wp_enqueue_scripts'); add_action('admin_enqueue_scripts', 'TpsEnqueues::admin_enqueue_scripts'); add_filter('mce_buttons', 'TpsMisc::wysiwyg_editor'); add_filter('wp_head', 'TpsMisc::wp_head'); add_action('init', 'TpsShortCodes::add_button'); // Add shortcodes. add_shortcode("tps_header", "TpsShortCodes::tps_header"); add_shortcode("tps_footer", "TpsShortCodes::tps_footer"); add_shortcode("tps_title", "TpsShortCodes::tps_title");