eSoftArena Ltd. Author: Enamul Version: 1.2 Author URI: http://esoftarena.co.uk/ Copyright 2007-2012 by Enamul & Esoftarena Development Team. 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 Please note: The ESA WORDPRESS TCPDF is not part of this license and is available under a Creative Commons License, which allowing you to use, modify and redistribute them for noncommercial purposes. */ // Stop direct call if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); } //ini_set('display_errors', '1'); //ini_set('error_reporting', E_ALL); if (!class_exists('esa_vzaarLoader')) { class esa_vzaarLoader { var $version = '1.2'; var $minium_WP = '2.9'; var $options = ''; /** * PHP 4 Compatible Constructor */ function esa_vzaarLoader() {$this->__construct();} /** * PHP 5 Constructor */ function __construct() { // Stop the plugin if we missed the requirements if ( ( !$this->esa_required_version() ) || ( !$this->esa_check_memory_limit() ) ) return; // Get some constants first $this->esa_load_options(); $this->esa_define_constant(); //$this->esa_define_tables(); $this->esa_load_dependencies(); //$this->start_rewrite_module(); $this->plugin_name = plugin_basename(__FILE__); // Init options & tables during activation & deregister init option register_activation_hook( $this->plugin_name, array(&$this, 'esa_activate') ); register_deactivation_hook( $this->plugin_name, array(&$this, 'esa_deactivate') ); // Register a uninstall hook to remove all tables & option automatic register_uninstall_hook( $this->plugin_name, array('esa_vzaarLoader', 'uninstall') ); // Start this plugin once all other plugins are fully loaded add_action( 'plugins_loaded', array(&$this, 'esa_start_plugin') ); //Add some links on the plugin page add_filter('plugin_row_meta', array(&$this, 'esa_add_plugin_links'), 10, 2); } function esa_start_plugin() { global $vzaarRewrite; // Content Filters //add_filter('vzaar_videos_name', 'sanitize_title'); add_action('wp_print_styles', array(&$this, 'esa_load_styles') ); // Check if we are in the admin area if ( is_admin() ) { // Pass the init check or show a message if (get_option( 'vzaar_init_check' ) != false ) add_action( 'admin_notices', create_function('', 'echo \'
' . get_option( "vzaar_init_check" ) . '
\' . __(\'Sorry, Vzaar Videos works only under WordPress %s or higher\', "vzaarVIDEOS" ) . \'
' . __('Sorry, Vzaar Videos works only with a Memory Limit of 16 MB higher', 'vzaarVIDEOS') . '