예제 #1
0
 public static function pre_init()
 {
     // load the settings. theya re required for everything past this point
     $settings_class_name = apply_filters('qsot-settings-class-name', '');
     if (empty($settings_class_name)) {
         return;
     }
     self::$o = call_user_func_array(array($settings_class_name, "instance"), array());
     self::$me = plugin_basename(self::$o->core_file);
     self::$version = self::$o->version;
     self::$plugin_dir = self::$o->core_dir;
     self::$plugin_url = self::$o->core_url;
     self::$product_url = self::$o->product_url;
     load_plugin_textdomain('opentickets-community-edition', false, dirname(plugin_basename(__FILE__)) . '/langs/');
     //add_action( 'plugins_loaded', array( __CLASS__, 'admin_deactivate' ), 0 );
     if (!self::_memory_check()) {
         return;
     }
     // locale fix
     add_action('plugins_loaded', array(__CLASS__, 'locale'), 4);
     // inject our own autoloader before all others in case we need to overtake some woocommerce autoloaded classes down the line. this may not work with 100% of all classes
     // because we dont actually control the plugin load order, but it should suffice for what we may use it for. if it does not suffice at any time, then we will rethink this
     add_action('plugins_loaded', array(__CLASS__, 'prepend_overtake_autoloader'), 4);
     // load emails when doing ajax request. woocommerce workaround
     add_action('plugins_loaded', array(__CLASS__, 'why_do_i_have_to_do_this'), 4);
     // declare the includes loader function
     add_action('qsot-load-includes', array(__CLASS__, 'load_includes'), 10, 2);
     add_filter('qsot-search-results-group-query', array(__CLASS__, 'only_search_parent_events'), 10, 4);
     // load all other system features and classes used everywhere
     do_action('qsot-load-includes', 'sys');
     // load all plugins and modules later on
     add_action('plugins_loaded', array(__CLASS__, 'load_plugins_and_modules'), 5);
     // register the activation function, so that when the plugin is activated, it does some magic described in the activation function
     register_activation_hook(self::$o->core_file, array(__CLASS__, 'activation'));
     add_action('woocommerce_email_classes', array(__CLASS__, 'load_custom_emails'), 2);
     add_filter('woocommerce_locate_template', array(__CLASS__, 'overtake_some_woocommerce_core_templates'), 10, 3);
     add_action('admin_init', array(__CLASS__, 'register_base_admin_assets'), 10);
     add_action('admin_enqueue_scripts', array(__CLASS__, 'load_base_admin_assets'), 10);
     add_action('load-post.php', array(__CLASS__, 'load_assets'), 999);
     add_action('load-post-new.php', array(__CLASS__, 'load_assets'), 999);
     // register js and css assets at the appropriate time
     add_action('init', array(__CLASS__, 'register_assets'), 2);
     add_filter('plugin_action_links', array(__CLASS__, 'plugins_page_actions'), 10, 4);
     // polyfill the hide/show js functions in the head tag, since some themes apparently don't have this
     add_action('wp_head', array(__CLASS__, 'polyfill_hideshow_js'), 0);
 }
예제 #2
0
						</table>
						<table class="branding">
							<tbody>
								<tr>
									<?php 
    for ($i = 0; $i < 5; $i++) {
        ?>
										<td valign="bottom"><?php 
        echo force_balance_tags($brand_imgs[$i]);
        ?>
</td>
									<?php 
    }
    ?>
									<td valign="bottom"><a href="<?php 
    echo esc_attr(QSOT::product_url());
    ?>
" title="<?php 
    _e('Who is OpenTickets?', 'opentickets-community-edition');
    ?>
">
										<img src="<?php 
    echo esc_attr(QSOT::plugin_url() . 'assets/imgs/opentickets-tiny.jpg');
    ?>
" class="ot-tiny-logo branding-img" />
									</a></td>
								</tr>
							</tbody>

							<div class="clear"></div>
						</table>