Example #1
0
/**
 * Add widget support for homepage. If no widgets active, display the default loop.
 *
 */
function parallax_home_genesis_meta()
{
    if (is_active_sidebar('home-section-1') || is_active_sidebar('home-section-2') || is_active_sidebar('home-section-3') || is_active_sidebar('home-section-4') || is_active_sidebar('home-section-5')) {
        //* Enqueue parallax script
        add_action('wp_enqueue_scripts', 'parallax_enqueue_parallax_script');
        function parallax_enqueue_parallax_script()
        {
            if (!wp_is_mobile()) {
                wp_enqueue_script('parallax-script', get_bloginfo('stylesheet_directory') . '/js/parallax.js', array('jquery'), '1.0.0');
            }
        }
        //* Add parallax-home body class
        add_filter('body_class', 'parallax_body_class');
        function parallax_body_class($classes)
        {
            $classes[] = 'parallax-home';
            return $classes;
        }
        //* Force full width content layout
        add_filter('genesis_pre_get_option_site_layout', '__genesis_return_full_width_content');
        //* Remove primary navigation
        remove_action('genesis_before_content_sidebar_wrap', 'genesis_do_nav');
        //* Remove breadcrumbs
        remove_action('genesis_before_loop', 'genesis_do_breadcrumbs');
        //* Remove the default Genesis loop
        remove_action('genesis_loop', 'genesis_do_loop');
        //* Add homepage widgets
        add_action('genesis_loop', 'parallax_homepage_widgets');
    }
}
 function __construct()
 {
     // Do not automatically check translations updates after updating plugins/themes.
     add_action('upgrader_process_complete', function () {
         remove_action('upgrader_process_complete', array('Language_Pack_Upgrader', 'async_upgrade'), 20);
     }, 1);
 }
function child_manage_woocommerce_styles()
{
    //remove generator meta tag
    remove_action('wp_head', array($GLOBALS['woocommerce'], 'generator'));
    //first check that woo exists to prevent fatal errors
    if (function_exists('is_woocommerce')) {
        //dequeue scripts and styles
        if (!is_woocommerce() && !is_cart() && !is_checkout()) {
            wp_dequeue_style('woocommerce_frontend_styles');
            wp_dequeue_style('woocommerce_fancybox_styles');
            wp_dequeue_style('woocommerce_chosen_styles');
            wp_dequeue_style('woocommerce_prettyPhoto_css');
            wp_dequeue_script('wc_price_slider');
            wp_dequeue_script('wc-single-product');
            wp_dequeue_script('wc-add-to-cart');
            wp_dequeue_script('wc-cart-fragments');
            wp_dequeue_script('wc-checkout');
            wp_dequeue_script('wc-add-to-cart-variation');
            wp_dequeue_script('wc-single-product');
            wp_dequeue_script('wc-cart');
            wp_dequeue_script('wc-chosen');
            wp_dequeue_script('woocommerce');
            wp_dequeue_script('prettyPhoto');
            wp_dequeue_script('prettyPhoto-init');
            wp_dequeue_script('jquery-blockui');
            wp_dequeue_script('jquery-placeholder');
            wp_dequeue_script('fancybox');
            wp_dequeue_script('jqueryui');
        }
    }
}
 function __construct()
 {
     global $bp;
     // Ensure that we have access to some utility functions. Must use require_once()
     // because BP Core is loaded during incremental upgrades
     require_once BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php';
     // Get current DB version
     $this->database_version = !empty($bp->database_version) ? (int) $bp->database_version : 0;
     if (!empty($bp->is_network_activate)) {
         $this->is_network_activate = $bp->is_network_activate;
     } elseif (!$this->current_step()) {
         setcookie('bp-wizard-step', 0, time() + 60 * 60 * 24, COOKIEPATH);
         $_COOKIE['bp-wizard-step'] = 0;
     }
     $this->new_version = constant('BP_DB_VERSION');
     $this->setup_type = !empty($bp->maintenance_mode) ? $bp->maintenance_mode : '';
     $this->current_step = $this->current_step();
     // Remove the admin menu while we update/install
     remove_action(bp_core_admin_hook(), 'bp_core_add_admin_menu', 9);
     // Call the save method that will save data and modify $current_step
     if (isset($_POST['save'])) {
         $this->save($_POST['save']);
     }
     // Build the steps needed for update or new installations
     $this->steps = $this->add_steps();
 }
Example #5
0
function gc_enterprise_bp_head()
{
    remove_action('genesis_after_footer', 'bp_core_admin_bar', 88);
    if (gconnect_have_adminbar() && (!is_home() || gconnect_get_option('adminbar'))) {
        add_action('genesis_after_footer', 'gc_enterprise_adminbar', 88);
    }
}
function my_login_head()
{
    $options = get_option('blue_default_theme');
    if ($options == "DarkLight") {
        remove_action('login_head', 'wp_shake_js', 12);
    }
}
 /**
  * Class constructor.
  */
 public function __construct()
 {
     $this->options = WPSEO_Options::get_all();
     global $fb_ver;
     if (isset($fb_ver) || class_exists('Facebook_Loader')) {
         add_filter('fb_meta_tags', array($this, 'facebook_filter'), 10, 1);
     } else {
         add_filter('language_attributes', array($this, 'add_opengraph_namespace'));
         add_action('wpseo_opengraph', array($this, 'locale'), 1);
         add_action('wpseo_opengraph', array($this, 'type'), 5);
         add_action('wpseo_opengraph', array($this, 'og_title'), 10);
         add_action('wpseo_opengraph', array($this, 'site_owner'), 20);
         add_action('wpseo_opengraph', array($this, 'description'), 11);
         add_action('wpseo_opengraph', array($this, 'url'), 12);
         add_action('wpseo_opengraph', array($this, 'site_name'), 13);
         add_action('wpseo_opengraph', array($this, 'website_facebook'), 14);
         if (is_singular() && !is_front_page()) {
             add_action('wpseo_opengraph', array($this, 'article_author_facebook'), 15);
             add_action('wpseo_opengraph', array($this, 'tags'), 16);
             add_action('wpseo_opengraph', array($this, 'category'), 17);
             add_action('wpseo_opengraph', array($this, 'publish_date'), 19);
         }
         add_action('wpseo_opengraph', array($this, 'image'), 30);
     }
     remove_action('wp_head', 'jetpack_og_tags');
     add_action('wpseo_head', array($this, 'opengraph'), 30);
 }
Example #8
0
 function __construct()
 {
     LazyestGallery::__construct();
     $this->slideshows = $this->dirshows = $this->thumbshows = 0;
     $this->slideshow = $this->comment = '';
     // actions
     add_action('wp_head', array(&$this, 'css_rules'), 1);
     add_action('wp_head', array(&$this, 'styles'), 2);
     add_action('wp_head', array(&$this, 'scripts'), 1);
     if ('TRUE' == $this->get_option('rel_canonical')) {
         remove_action('wp_head', 'rel_canonical');
         add_action('wp_head', array(&$this, 'rel_canonical'));
     }
     $structure = get_option('permalink_structure');
     if (0 < strlen($structure) && 0 == strpos($structure, 'index.php') && 'TRUE' == $this->get_option('use_permalinks')) {
         add_action('generate_rewrite_rules', array(&$this, 'rewrite_rules'));
         add_action('init', array(&$this, 'flush_rules'), 100);
     }
     add_action('admin_bar_menu', array(&$this, 'admin_bar_menu'), 100);
     add_action('after_setup_theme', array(&$this, 'setup_theme'));
     // filters
     add_filter('query_vars', array(&$this, 'query_vars'));
     // shortcodes
     add_shortcode('lg_folder', array(&$this, 'folder_code'));
     add_shortcode('lg_gallery', array(&$this, 'gallery_code'));
     add_shortcode('lg_image', array(&$this, 'image_code'));
     add_shortcode('lg_slideshow', array(&$this, 'slideshow_code'));
 }
Example #9
0
/**
 * Theme Supports
 */
function ohs_theme_setup()
{
    add_theme_support('post-thumbnails');
    add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption'));
    add_theme_support('title-tag');
    add_theme_support('automatic-feed-links');
    add_theme_support('menus');
    register_nav_menus(array('main-menu' => __('Main Menu', 'ohs-theme')));
    remove_action('wp_head', 'wp_print_scripts');
    remove_action('wp_head', 'wp_print_head_scripts', 9);
    remove_action('wp_head', 'wp_enqueue_scripts', 1);
    add_action('wp_footer', 'wp_print_scripts', 1);
    add_action('wp_footer', 'wp_enqueue_scripts', 1);
    add_action('wp_footer', 'wp_print_head_scripts', 1);
    wp_register_script('jqueryCDN', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', null);
    wp_enqueue_script('jqueryCDN');
    wp_register_script('npo', get_bloginfo('template_url') . '/js/lib/npo.min.js', null);
    wp_register_script('bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js', null);
    wp_register_script('handlebars', get_bloginfo('template_url') . '/js/lib/handlebars.runtime.min.js', null);
    wp_register_script('masonry', get_bloginfo('template_url') . '/js/lib/jquery.masonry.min.js', null);
    wp_register_script('imagesLoaded', get_bloginfo('template_url') . '/js/lib/imagesloaded.pkgd.min.js', null);
    wp_register_script('ohsTemplates', get_bloginfo('template_url') . '/js/templates.min.js', '0.1.1');
    wp_register_script('renderTemplates', get_bloginfo('template_url') . '/js/dev/jquery.renderTemplate.js', '0.1');
    wp_register_script('ohsMain', get_bloginfo('template_url') . '/js/dev/main.js', '0.1');
    wp_register_script('ohsMedia', get_bloginfo('template_url') . '/js/dev/media.js', '0.1');
    wp_enqueue_script('npo', false, array(), false, true);
    wp_enqueue_script('bootstrap', false, array(), false, true);
    wp_enqueue_script('handlebars', false, array(), false, true);
    wp_enqueue_script('masonry', false, array(), false, true);
    wp_enqueue_script('imagesLoaded', false, array(), false, true);
    wp_enqueue_script('ohsTemplates', false, array(), false, true);
    wp_enqueue_script('renderTemplates', false, array(), false, true);
    wp_enqueue_script('ohsMain', false, array(), false, true);
    wp_enqueue_script('ohsMedia', false, array(), false, true);
}
Example #10
0
/**
 * Add/remove actions
 */
function sydney_woo_actions()
{
    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', 'sydney_wc_wrapper_start', 10);
    add_action('woocommerce_after_main_content', 'sydney_wc_wrapper_end', 10);
}
Example #11
0
function skeleton_remove_recent_comments_style()
{
    global $wp_widget_factory;
    if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) {
        remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));
    }
}
 function events_blog()
 {
     // Allow to pubblish posts with future date
     function pubblish_posts_in_the_future($data)
     {
         if ($data['post_status'] == 'future' && $data['post_type'] == 'post') {
             $data['post_status'] = 'publish';
         }
         return $data;
     }
     remove_action('future_post', '_future_post_hook');
     add_filter('wp_insert_post_data', 'pubblish_posts_in_the_future');
     // Use date to find PREVIOUS MONTH and create link to it
     function get_previous($current)
     {
         $date = date("Y-m-d", strtotime($current['year'] . '-' . $current['month'] . '-01'));
         $previous = array("month" => date("m", strtotime(date("d-m-Y", strtotime($date)) . " -1 month")), "year" => date("Y", strtotime(date("d-m-Y", strtotime($date)) . " -1 month")));
         return $previous;
     }
     // Use date to find NEXT MONTH and create link to it
     function get_next($current)
     {
         $date = date("Y-m-d", strtotime($current['year'] . '-' . $current['month'] . '-01'));
         $next = array("month" => date("m", strtotime(date("d-m-Y", strtotime($date)) . " +1 month")), "year" => date("Y", strtotime(date("d-m-Y", strtotime($date)) . " +1 month")));
         return $next;
     }
     // Get the month name from number
     function month_num_to_name($monthnum)
     {
         $monthName = date("F", mktime(0, 0, 0, intval($monthnum), 10));
         return $monthName;
     }
 }
/**
 * Removes membership access for processing orders
 * so access is only granted at when orders are complete
 */
function sv_wc_memberships_remove_processing_access()
{
    // make sure Memberships is active first
    if (function_exists('wc_memberships')) {
        remove_action('woocommerce_order_status_processing', array(wc_memberships(), 'grant_membership_access'), 11);
    }
}
Example #14
0
function acfmod_simple_content_save_post($post_id)
{
    // bail early if no ACF data
    if (empty($_POST['acf'])) {
        return;
    }
    // array of field values
    $fields = $_POST['acf'];
    if (!isset($fields['acf_modules_field']) && is_array($fields['acf_modules_field'])) {
        return;
    }
    // This may change in the future... yikes...
    $delete_content_key = 'field_55686c1d9d812';
    // assume we aren't deleting content
    $do_delete_content = false;
    // get modules values
    foreach ($fields['acf_modules_field'] as $module) {
        if (isset($module[$delete_content_key])) {
            if ($module[$delete_content_key]) {
                $do_delete_content = true;
            }
        }
    }
    // don't store the values for delete and load content fields
    # not sure how to do that just yet
    // bail early if we're not deleting the content
    if (!$do_delete_content) {
        return;
    }
    // clear the post content
    remove_action('acf/save_post', 'acfmod_simple_content_save_post', 20);
    $delete_content = array('ID' => $post_id, 'post_content' => '');
    wp_update_post($delete_content);
    add_action('acf/save_post', 'acfmod_simple_content_save_post', 20);
}
Example #15
0
function bil_head_cleanup()
{
    remove_action('wp_head', 'feed_links_extra');
    // Display the links to the extra feeds such as category feeds
    remove_action('wp_head', 'feed_links');
    // Display the links to the general feeds: Post and Comment Feed
    remove_action('wp_head', 'rsd_link');
    // Display the link to the Really Simple Discovery service endpoint, EditURI link
    remove_action('wp_head', 'wlwmanifest_link');
    // Display the link to the Windows Live Writer manifest file.
    remove_action('wp_head', 'index_rel_link');
    // index link
    remove_action('wp_head', 'parent_post_rel_link');
    // prev link
    remove_action('wp_head', 'start_post_rel_link');
    // start link
    remove_action('wp_head', 'adjacent_posts_rel_link');
    // Display relational links for the posts adjacent to the current post.
    remove_action('wp_head', 'wp_generator');
    // Display the XHTML generator that is generated on the wp_head hook, WP version
    // remove WP version from css
    add_filter('style_loader_src', 'bones_remove_wp_ver_css_js', 9999);
    // remove Wp version from scripts
    add_filter('script_loader_src', 'bones_remove_wp_ver_css_js', 9999);
}
Example #16
0
function bones_head_cleanup()
{
    // remove header links
    remove_action('wp_head', 'feed_links_extra', 3);
    // Category Feeds
    remove_action('wp_head', 'feed_links', 2);
    // Post and Comment Feeds
    remove_action('wp_head', 'rsd_link');
    // EditURI link
    remove_action('wp_head', 'wlwmanifest_link');
    // Windows Live Writer
    remove_action('wp_head', 'index_rel_link');
    // index link
    remove_action('wp_head', 'parent_post_rel_link', 10, 0);
    // previous link
    remove_action('wp_head', 'start_post_rel_link', 10, 0);
    // start link
    remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
    // Links for Adjacent Posts
    remove_action('wp_head', 'wp_generator');
    // WP version
    if (!is_admin()) {
        wp_deregister_script('jquery');
        // De-Register jQuery
        wp_register_script('jquery', '', '', '', true);
        // It's already in the Header
    }
}
 /**
  * Add notices + styles if needed.
  */
 public function add_notices()
 {
     if (get_option('_wc_gzd_needs_update') == 1 || get_option('_wc_gzd_needs_pages') == 1) {
         wp_enqueue_style('woocommerce-activation', plugins_url('/assets/css/activation.css', WC_PLUGIN_FILE));
         wp_enqueue_style('woocommerce-gzd-activation', plugins_url('/assets/css/woocommerce-gzd-activation.css', WC_GERMANIZED_PLUGIN_FILE));
         add_action('admin_notices', array($this, 'install_notice'));
     }
     if (!get_option('_wc_gzd_hide_theme_notice')) {
         if (!WC_germanized()->is_pro()) {
             if (!$this->is_theme_compatible()) {
                 add_action('admin_notices', array($this, 'theme_incompatibility_notice'));
             } else {
                 if ($this->is_theme_supported_by_pro()) {
                     add_action('admin_notices', array($this, 'theme_supported_notice'));
                 } else {
                     if (!$this->is_theme_ready()) {
                         add_action('admin_notices', array($this, 'theme_not_ready_notice'));
                     }
                 }
             }
         }
     }
     if (!get_option('_wc_gzd_hide_review_notice')) {
         add_action('admin_notices', array($this, 'add_review_notice'));
     }
     if (!get_option('_wc_gzd_hide_pro_notice') && !WC_germanized()->is_pro()) {
         add_action('admin_notices', array($this, 'add_pro_notice'));
     }
     if (isset($_GET['page']) && $_GET['page'] == 'wc-gzd-about' || get_option('_wc_gzd_needs_pages')) {
         remove_action('admin_notices', array($this, 'theme_incompatibility_notice'));
         remove_action('admin_notices', array($this, 'theme_not_ready_notice'));
         remove_action('admin_notices', array($this, 'theme_supported_notice'));
     }
 }
Example #18
0
/**
 * Clean up wp_head()
 *
 * Remove unnecessary <link>'s
 * Remove inline CSS and JS from WP emoji support
 * Remove inline CSS used by Recent Comments widget
 * Remove inline CSS used by posts with galleries
 * Remove self-closing tag and change ''s to "'s on rel_canonical()
 *
 * You can enable/disable this feature in functions.php (or lib/setup.php if you're using Sage):
 * add_theme_support('soil-clean-up');
 */
function head_cleanup()
{
    // Originally from http://wpengineer.com/1438/wordpress-header/
    remove_action('wp_head', 'feed_links_extra', 3);
    add_action('wp_head', 'ob_start', 1, 0);
    add_action('wp_head', function () {
        $pattern = '/.*' . preg_quote(esc_url(get_feed_link('comments_' . get_default_feed())), '/') . '.*[\\r\\n]+/';
        echo preg_replace($pattern, '', ob_get_clean());
    }, 3, 0);
    remove_action('wp_head', 'rsd_link');
    remove_action('wp_head', 'wlwmanifest_link');
    remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
    remove_action('wp_head', 'wp_generator');
    remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
    remove_action('wp_head', 'print_emoji_detection_script', 7);
    remove_action('admin_print_scripts', 'print_emoji_detection_script');
    remove_action('wp_print_styles', 'print_emoji_styles');
    remove_action('admin_print_styles', 'print_emoji_styles');
    remove_action('wp_head', 'wp_oembed_add_discovery_links');
    remove_action('wp_head', 'wp_oembed_add_host_js');
    remove_action('wp_head', 'rest_output_link_wp_head', 10, 0);
    remove_filter('the_content_feed', 'wp_staticize_emoji');
    remove_filter('comment_text_rss', 'wp_staticize_emoji');
    remove_filter('wp_mail', 'wp_staticize_emoji_for_email');
    add_filter('use_default_gallery_style', '__return_false');
    global $wp_widget_factory;
    if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) {
        remove_action('wp_head', [$wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style']);
    }
    if (!class_exists('WPSEO_Frontend')) {
        remove_action('wp_head', 'rel_canonical');
        add_action('wp_head', __NAMESPACE__ . '\\rel_canonical');
    }
}
Example #19
0
    function __construct()
    {
        add_theme_support('post-thumbnails');
        $this->defaultPostThumb = $this->getTheme() . "/img/logo-circle.png";
        // Remove stupid WP emoji support
        remove_action('wp_head', 'print_emoji_detection_script', 7);
        remove_action('wp_print_styles', 'print_emoji_styles');
        // Add projects CPT
        register_post_type('projects', array('labels' => array('menu_name' => 'Projects', 'name' => __('Project'), 'singular_name' => __('Project'), 'add_new' => __('Add'), 'add_new_item' => __('Add new project'), 'edit_item' => __('Edit project'), 'new_item' => __('New project'), 'all_items' => __('All projects'), 'view_item' => __('View project'), 'search_items' => __('Search projects'), 'not_found' => __('No projects found'), 'not_found_in_trash' => __('No projects found in trash')), 'public' => true, 'has_archive' => true, 'menu_position' => 9));
        // Add votes metabox
        function hackastory_votes_meta_box($post_type, $post)
        {
            add_post_meta($post->ID, 'project-votes-experimental', 0, true);
            add_post_meta($post->ID, 'project-votes-potential', 0, true);
            add_meta_box('votes_box', 'Votes', function ($post) {
                echo 'Best experiment: ' . get_post_meta($post->ID, 'project-votes-experimental', true) . '<br>';
                echo 'Most potential: ' . get_post_meta($post->ID, 'project-votes-potential', true);
            }, array('projects'), 'side');
        }
        add_action('add_meta_boxes', 'hackastory_votes_meta_box', 10, 2);
        // Define ajaxurl in frontend
        function hackastory_ajaxurl()
        {
            ?>
            <script type="text/javascript">
                var ajaxurl = '<?php 
            echo admin_url('admin-ajax.php');
            ?>
';
            </script>
            <?php 
        }
        add_action('wp_head', 'hackastory_ajaxurl');
    }
Example #20
0
/**
 * Override default map with advanced map
 * @since	2.0.0
**/
function epl_override_default_map()
{
    global $epl_settings;
    if (is_epl_post()) {
        if (has_action('epl_property_map')) {
            // remove default map of epl core
            remove_action('epl_property_map', 'epl_property_map_default_callback');
            $enabled_default_map = isset($epl_settings['epl_am_map_enable']) ? $epl_settings['epl_am_map_enable'] : 1;
            $map_position = isset($epl_settings['epl_am_single_tab_position']) ? $epl_settings['epl_am_single_tab_position'] : 1;
            // show default tabbed map ?
            if ($enabled_default_map) {
                // map tabs position
                if ($map_position == '1') {
                    add_action('epl_property_map', 'epl_am_tabbed_map_top', 10, 5);
                } else {
                    add_action('epl_property_map', 'epl_am_tabbed_map_bottom', 1, 5);
                }
            } else {
                // make tab positioning work with custom action too
                $map_position = $map_position == 1 ? 'top' : 'bottom';
                // custom actions to render tabbed map
                add_action('epl_property_map_show', 'epl_am_tabbed_map_' . $map_position, 1, 5);
            }
        }
    }
}
Example #21
0
 function lingotek_maybe_wordpress_importer()
 {
     if (defined('WP_LOAD_IMPORTERS') && class_exists('WP_Import')) {
         remove_action('admin_init', 'lingotek_wordpress_importer_init');
         add_action('admin_init', array(&$this, 'lingotek_wordpress_importer_init'));
     }
 }
 function wooframework_related_products()
 {
     global $woo_options;
     if (isset($woo_options['woocommerce_related_products']) && 'false' == $woo_options['woocommerce_related_products']) {
         remove_action('woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);
     }
 }
Example #23
0
function et_setup_theme()
{
    global $themename, $shortname, $et_store_options_in_one_row, $default_colorscheme;
    $themename = 'Divi';
    $shortname = 'divi';
    $et_store_options_in_one_row = true;
    $default_colorscheme = "Default";
    $template_directory = get_template_directory();
    require_once $template_directory . '/epanel/custom_functions.php';
    require_once $template_directory . '/includes/functions/comments.php';
    require_once $template_directory . '/includes/functions/sidebars.php';
    load_theme_textdomain('Divi', $template_directory . '/lang');
    require_once $template_directory . '/epanel/core_functions.php';
    require_once $template_directory . '/epanel/post_thumbnails_divi.php';
    include $template_directory . '/includes/widgets.php';
    register_nav_menus(array('primary-menu' => __('Primary Menu', 'Divi'), 'secondary-menu' => __('Secondary Menu', 'Divi'), 'footer-menu' => __('Footer Menu', 'Divi')));
    // don't display the empty title bar if the widget title is not set
    remove_filter('widget_title', 'et_widget_force_title');
    add_action('wp_enqueue_scripts', 'et_add_responsive_shortcodes_css', 11);
    add_theme_support('post-formats', array('video', 'audio', 'quote', 'gallery', 'link'));
    add_theme_support('woocommerce');
    remove_action('woocommerce_sidebar', 'woocommerce_get_sidebar', 10);
    remove_action('woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
    add_action('woocommerce_before_main_content', 'et_divi_output_content_wrapper', 10);
    remove_action('woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
    add_action('woocommerce_after_main_content', 'et_divi_output_content_wrapper_end', 10);
    //remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
    // deactivate page templates and custom import functions
    remove_action('init', 'et_activate_features');
}
 public function wordpressAction(Request $request)
 {
     $this->get('wordpress.loader')->load();
     $this->get('wordpress.loader')->loadPostInWordpressFromRequest($request);
     remove_theme_support('custom-header');
     remove_action('wp_head', 'wp_enqueue_scripts', 1);
     remove_action('wp_head', 'feed_links', 2);
     remove_action('wp_head', 'feed_links_extra', 3);
     remove_action('wp_head', 'rsd_link');
     remove_action('wp_head', 'wlwmanifest_link');
     remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
     remove_action('wp_head', 'locale_stylesheet');
     remove_action('wp_head', 'noindex', 1);
     remove_action('wp_head', 'wp_print_styles', 8);
     remove_action('wp_head', 'wp_print_head_scripts', 9);
     remove_action('wp_head', 'wp_generator');
     remove_action('wp_head', 'rel_canonical');
     remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
     ob_start();
     @wp_head();
     $head = ob_get_clean();
     ob_start();
     $content = dynamic_sidebar('sidebar-2');
     $side = ob_get_clean();
     ob_start();
     the_content();
     $content = ob_get_clean();
     $post = array('content' => $content);
     return $this->render($this->container->getParameter('wordpress.template'), array('post' => $post));
 }
Example #25
0
function bear_bones_woocommerce_main_content()
{
    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', 'bear_bones_woocommerce_wrapper_start', 10);
    add_action('woocommerce_after_main_content', 'bear_bones_woocommerce_wrapper_end', 10);
}
 function deregister_cron_for_module($module)
 {
     wp_clear_scheduled_hook('rt_parse_email_cron', array($module));
     wp_clear_scheduled_hook('rt_send_email_cron');
     remove_action('rt_parse_email_cron', array($this, 'rt_parse_email'));
     remove_action('rt_send_email_cron', array($this, 'rt_send_email'));
 }
 public function setUp()
 {
     parent::setUp();
     add_theme_support('infinite-scroll');
     remove_action('init', 'the_neverending_home_page_init', 20);
     $this->infinite_scroll = new The_Neverending_Home_Page();
 }
 /**
  * Initialize the class and place hooks and styling.
  */
 function init()
 {
     $this->title(__('Tribe', 'tribe-events-calendar'));
     remove_action('tribe_debug', array(TribeEvents::instance(), 'renderDebug'), 10, 2);
     add_action('tribe_debug', array($this, 'logDebug'), 8, 3);
     wp_enqueue_style('tribe-debugger', TribeEvents::instance()->pluginUrl . 'resources/debugger.css');
 }
 public static function init($opt_name = "")
 {
     if (!empty($opt_name)) {
         self::loadRedux($opt_name);
         remove_action('setup_theme', array('Redux', 'createRedux'));
     }
 }
Example #30
0
 function __construct($file)
 {
     add_action('wp_head', array($this, 'meta_init'), 1);
     add_filter('wp_title', array($this, 'change_title'), 9999);
     add_action('init', array($this, 'kingkongboard_localization'));
     add_action('admin_menu', array($this, 'KingkongBoard_AddMenu'));
     add_action('kingkongboard_iframe_header', array($this, 'KingkongBoard_Style'));
     add_action('admin_enqueue_scripts', array($this, 'KingkongBoard_AdminStyle'));
     add_action('wp_enqueue_scripts', array($this, 'KingkongBoard_Style'), 9999);
     add_filter('mce_buttons', array($this, 'KingkongBoard_register_buttons'));
     add_filter('mce_external_plugins', array($this, 'KingkongBoard_register_tinymce_javascript'));
     add_action('get_header', array($this, 'kingkongboard_enable_threaded_comments'));
     register_activation_hook($file, array(&$this, 'KingkongBoard_Active_Create_DB'));
     register_activation_hook($file, array(&$this, 'KingkongBoard_Remote_Post'));
     //add_action('pre_get_posts', array($this, 'KingkongBoard_Search_Filter'), 9999);
     add_action('in_admin_footer', array($this, 'KingkongBoard_Facebook_Script'));
     $this->KingkongBoard_Panel_Setup();
     add_action('init', array($this, 'KingkongBoard_Register_Post_Types'));
     add_action('admin_init', array($this, 'kingkongboard_add_theme_caps'));
     add_filter('map_meta_cap', array($this, 'kingkongboard_map_meta_cap'), 10, 4);
     add_filter('upload_mimes', array($this, 'kingkongboard_upload_mimes'));
     add_action('admin_init', array($this, 'check_current_kkb_version'));
     add_action('template_redirect', array($this, 'kkb_entry_redirect'));
     add_filter('load_textdomain_mofile', array($this, 'replace_kkb_default_language_files'), 10, 2);
     add_action('kingkong_board_before', array($this, 'kkb_before_css'), 10, 1);
     add_action('kingkong_board_iframe_before', array($this, 'kkb_iframe_before'), 10, 1);
     add_action('init', array($this, 'media_category_create'));
     add_action('init', array($this, 'regist_kkb_tag'), 0);
     add_action('kingkongboard_entry_save_after', array($this, 'entry_notification'), 10, 2);
     add_action('kingkongboard_save_comment_after', array($this, 'comment_notification'), 10, 3);
     remove_action('welcome_panel', 'wp_welcome_panel');
     add_action('welcome_panel', array($this, 'kkb_welcome_panel'));
     add_filter('page_template', array($this, 'iframe_template'));
 }