Exemple #1
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_action('init', array($this, 'setup_maintenance_mode'));
     add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
     add_action('admin_bar_menu', array($this, 'add_info_to_admin_toolbar'), 100);
 }
Exemple #2
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_action('widgets_init', array($this, 'register_widgets'));
     add_action('wp_ajax_g1_contact_form_send', array($this, 'handle_send_action'));
     add_action('wp_ajax_nopriv_g1_contact_form_send', array($this, 'handle_send_action'));
 }
Exemple #3
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_action('widgets_init', array($this, 'register_widgets'));
     add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
     add_action('g1_prefooter_begin', array($this, 'render_toolbar_in_prefooter'));
 }
Exemple #4
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_action('widgets_init', array($this, 'register_widgets'));
     add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
     add_action('wp_ajax_g1_mailchimp_add_to_mailing_list', array($this, 'add_to_mailing_list'));
     add_action('wp_ajax_nopriv_g1_mailchimp_add_to_mailing_list', array($this, 'add_to_mailing_list'));
 }
Exemple #5
0
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_action('init', array($this, 'add_post_type_support'));
     add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
     add_filter('pre_option_page_for_posts', array($this, 'pre_option_page_for_posts'));
     add_filter('pre_option_page_on_front', array($this, 'pre_option_page_on_front'));
     add_filter('pre_option_show_on_front', array($this, 'pre_option_show_on_front'));
     add_filter('nav_menu_css_class', array($this, 'fix_nav_menu_css_class'), 10, 2);
     add_action('g1_collections_register', array($this, 'register_collections'));
 }
Exemple #6
0
 protected function setup_hooks()
 {
     parent::setup_hooks();
     // general setup
     add_action('wp', array($this, 'setup_learndash'));
     // sidebars
     add_filter('g1_setup_sidebars', array($this, 'setup_sidebars'));
     // support features
     add_action('init', array($this, 'add_post_type_support'));
     // theme options
     add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
 }
Exemple #7
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_action('g1_extra_entry_blocks', array($this, 'render_related_entries'), 50);
     add_action('admin_enqueue_scripts', array($this, 'admin_enqueue'));
     /* Notice the very low priority!
      * We want to register our custom taxonomy after all post types
      */
     add_action('init', array($this, 'register_taxonomy'), 9999);
     add_action('init', array($this, 'setup_shortcodes'), 999);
     add_action('g1_single_elements_register', array($this, 'register_single_elements'));
     add_action('do_meta_boxes', array($this, 'alter_relation_tags_meta_box'));
 }
Exemple #8
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_theme_support('woocommerce');
     // Don't load default styles
     global $woocommerce;
     if (!is_object($woocommerce) || version_compare($woocommerce->version, '2.1', '<')) {
         define('WOOCOMMERCE_USE_CSS', false);
     } else {
         // version 2.1.x
         add_filter('woocommerce_enqueue_styles', '__return_false');
     }
     add_action('wp_enqueue_scripts', array($this, 'enqueue_styles'));
     // Wrappers
     remove_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
     remove_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
     add_action('woocommerce_before_main_content', array($this, 'render_wrapper_start'), 10);
     add_action('woocommerce_after_main_content', array($this, 'render_wrapper_end'), 10);
     add_action('woocommerce_product_meta_start', array($this, 'woocommerce_product_meta_start'));
     add_action('woocommerce_product_meta_end', array($this, 'woocommerce_product_meta_end'));
     add_action('woocommerce_before_my_account', array($this, 'before_my_account'));
     add_action('woocommerce_after_my_account', array($this, 'after_my_account'));
     // Replace the pagination nav
     remove_action('woocommerce_after_shop_loop', 'woocommerce_pagination', 10);
     add_action('woocommerce_after_shop_loop', array($this, 'render_shop_loop_pagination'), 10);
     // Manage sidebars
     add_filter('g1_setup_sidebars', array($this, 'setup_sidebars'));
     // Custom CSS classes for WC widgets
     add_filter('dynamic_sidebar_params', array($this, 'add_custom_widget_classes'));
     // Better thumbnails
     remove_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
     add_action('woocommerce_before_shop_loop_item_title', array($this, 'thumbnail_wrapper'), 10);
     remove_action('woocommerce_before_subcategory_title', 'woocommerce_subcategory_thumbnail', 10);
     add_action('woocommerce_before_subcategory_title', array($this, 'subcategory_thumbnail_wrapper'), 10);
     // Modify the breadcrumb
     add_action('woocommerce_breadcrumb_defaults', array($this, 'breadcrumb_defaults'));
     // We need to do it later, because conditional tags don't work here
     add_action('wp', array($this, 'switch_breadcrumbs'));
     // Entries per page
     add_filter('loop_shop_per_page', array($this, 'loop_shop_per_page'), 20);
     // Hide minicart when necessary
     add_action('g1_header_woocommerce_minicart', array($this, 'hide_minicart'));
     // Misc
     add_action('woocommerce_checkout_after_customer_details', array($this, 'checkout_after_customer_details'), 999);
     add_action('woocommerce_before_single_product_summary', array($this, 'before_single_product_summary'), 5);
 }
Exemple #9
0
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_filter('g1_element_slider_choices', array($this, 'add_slider_choices'));
     add_action(get_redux_opts_sections_filter_name(), array($this, 'add_theme_options'));
     if (is_admin()) {
         // Include stylesheets
         add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_styles'));
         // Include javascripts
         add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));
     } else {
         add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
     }
     add_action('g1_post_meta_manager_register', array($this, 'g1_post_meta_manager_register'));
     add_filter('g1_element_media_box_choices', array($this, 'add_media_box_choices'));
     add_filter('g1_mediabox_help', array($this, 'mediabox_help'));
     add_action('g1_mediabox', array($this, 'mediabox'), 10, 2);
     add_action('g1_precontent', array($this, 'precontent'));
     add_action('add_meta_boxes', array($this, 'remove_meta_boxes'));
     add_action('init', array($this, 'register_post_type'));
 }
Exemple #10
0
 /**
  * Set up all hooks
  */
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_action('g1_single_elements_register', array($this, 'register_slider_single_element'));
     add_action('g1_precontent', array($this, 'precontent_render_helpmode'));
 }
Exemple #11
0
 protected function setup_hooks()
 {
     parent::setup_hooks();
     add_filter('nav_menu_css_class', array($this, 'fix_nav_menu_css_class'), 10, 2);
     add_filter('icl_ls_languages', array($this, 'fix_wpml_language_switcher'));
 }