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_new_post_navigation( $args = array() ) { | |
| if ( ! in_the_loop() ) { | |
| return ''; | |
| } | |
| $defaults = array( | |
| 'prev_src_text' => __( 'Previous post:', 'the7mk2' ), | |
| 'next_src_text' => __( 'Next post:', 'the7mk2' ), | |
| 'in_same_term' => false, | |
| 'excluded_terms' => '', |
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
| var countDownDate = new Date("july 01, 2024 15:37:25").getTime(); | |
| // Update the count down every 1 second | |
| var x = setInterval(function() { | |
| // Get today's date and time | |
| var now = new Date().getTime(); | |
| // Find the distance between now and the count down date | |
| var distance = countDownDate - now; |
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
| <script> | |
| jQuery(document).ready(function($) { | |
| var delay = 300; | |
| setTimeout(function() { | |
| $('.the7-e-tab-title').removeClass('active'); | |
| $('.the7-e-tab-text-content').removeClass('active'); | |
| $('.the7-e-tab-text-content').css('display', 'none'); }, delay); | |
| }); | |
| </script> |
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( 'cptui_user_supports_params', function( $supports, $post_type ) { | |
| if ( $post_type === 'movies' ) { | |
| $supports['hierarchical'] = true; | |
| } | |
| return $supports; | |
| }, 10, 2 ); |
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( 'rest_api_init', 'add_album_gallery_fields' ); | |
| function add_album_gallery_fields() { | |
| register_rest_field( | |
| 'dt_gallery', | |
| 'album_gallery', | |
| array( | |
| 'get_callback' => 'get_album_gallery', // custom function name | |
| 'update_callback' => null, | |
| 'schema' => null, | |
| ) |
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( 'presscore_post_type_dt_team_args', 'my_team_args' ); | |
| function my_team_args( $args ) { | |
| $args['has_archive'] = false ; | |
| return $args; | |
| } |
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 teamposition_func( $atts ){ | |
| $config = presscore_config(); | |
| presscore_populate_team_config(); | |
| $position = $config->get( 'post.member.position' ); | |
| if($position) { | |
| return '<p>'.$position.'<p>'; | |
| } | |
| } | |
| add_shortcode( 'teamposition', 'teamposition_func' ); |
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_header', 10 ); | |
| function dt_disable_header() { | |
| $config = Presscore_Config::get_instance(); | |
| if( is_singular( 'cpt_name' ) ) { | |
| $config->set( 'header_title', '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
| add_filter( 'the7_get_share_buttons_list', 'dt_add_sharebtn_callback', 10, 4); | |
| function dt_add_sharebtn_callback( $share_buttons, $place, $post_id, $buttons ) { | |
| $title = get_the_title($post_id ); | |
| $url = get_the_permalink($post_id ); | |
| $url = 'https://t.me/share/url?url="'. $url . '"&text=' . $title; | |
| $share_buttons[] = array( | |
| 'id' => 'telegram', | |
| 'url' => $url, |
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_jquery_mousewheel_local() { | |
| wp_enqueue_script( 'jquery-mousewheel', get_stylesheet_directory_uri() . '/js/jquery.mousewheel.min.js', array( 'jquery' ) ); | |
| } | |
| add_action( 'wp_enqueue_scripts', 'dt_jquery_mousewheel_local' ); |
NewerOlder