This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('woocommerce_share', 'product_share', 10); | |
| function product_share() { | |
| presscore_display_share_buttons('post', array('echo' => true)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'get_header', 'tribe_event_fix', 10 ); | |
| function tribe_event_fix() { | |
| if ( 'tribe_events' == get_post_type() ) { | |
| $config = Presscore_Config::get_instance(); | |
| presscore_config_base_init(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function dt_add_event_metaboxes() { | |
| global $DT_META_BOXES; | |
| if ( $DT_META_BOXES ) { | |
| foreach ( array( 'dt_page_box-sidebar', 'dt_page_box-footer', 'dt_page_box-header_options', 'dt_page_box-slideshow_options', 'dt_page_box-fancy_header_options' ) as $mb_id ) { | |
| if ( isset($DT_META_BOXES[ $mb_id ], $DT_META_BOXES[ $mb_id ]['pages']) ) { | |
| $DT_META_BOXES[ $mb_id ]['pages'][] = 'tribe_events'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'dt_menu_options', 'cp_custom_menu_filter' ); | |
| function cp_custom_menu_filter( $options = array() ) { | |
| global $post; | |
| if ( 'primary' == $options['location'] ) { | |
| if(is_page( 35 )) { //if page id 35 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'get_header', 'dt_archive_sidebar', 10 ); | |
| function dt_archive_sidebar() { | |
| $config = Presscore_Config::get_instance(); | |
| if(is_archive() || is_category() ){ | |
| $config->set( 'sidebar_position', 'right' ); | |
| $config->set( 'sidebar_widgetarea_id', 'sidebar_1' ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'get_header', 'dt_disable_sidebar', 10 ); | |
| function dt_disable_sidebar() { | |
| $config = Presscore_Config::get_instance(); | |
| $config->set( 'sidebar_position', 'disabled' ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function presscore_get_post_data( $html = '' ) { | |
| $href = 'javascript: void(0);'; | |
| if ( 'post' == get_post_type() ) { | |
| // remove link if in date archive | |
| if ( !(is_day() && is_month() && is_year()) ) { | |
| $href = presscore_get_post_day_link(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function presscore_blog_title() { | |
| $wp_title = wp_title('', false); | |
| return $wp_title; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('admin_head', 'my_custom_css'); | |
| function my_custom_css() { | |
| echo '<style> | |
| .ult_activate { | |
| display: none; | |
| } | |
| </style>'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function remove_benefits_search() { | |
| global $wp_post_types; | |
| $wp_post_types['dt_benefits']->exclude_from_search = true; | |
| } | |
| add_filter('pre_get_posts','remove_benefits_search'); |