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> | |
| var slideoutLinks = document.querySelectorAll( '.slideout-navigation ul a' ); | |
| for ( var i = 0; i < slideoutLinks.length; i++ ) { | |
| slideoutLinks[i].removeEventListener( 'click', closeOffsideOnAction, false ); | |
| }; | |
| </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
| function generateblocks_get_parsed_content( $content = '' ) { | |
| if ( ! function_exists( 'has_blocks' ) ) { | |
| return; | |
| } | |
| if ( ! $content && has_blocks( get_the_ID() ) ) { | |
| global $post; | |
| if ( ! is_object( $post ) ) { | |
| return; |
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( 'generate_premium_url_args', function( $args ) { | |
| $args['ref'] = 123; // Add your affiliate ID | |
| 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
| add_filter( 'generate_navigation_search_output', function() { | |
| printf( | |
| '<form method="get" class="search-form navigation-search" action="%1$s"> | |
| <input type="search" class="search-field" value="%2$s" name="s" title="%3$s" /> | |
| <input type="submit" class="search-button" value=""> | |
| </form>', | |
| esc_url( home_url( '/' ) ), | |
| esc_attr( get_search_query() ), | |
| esc_attr_x( 'Search', 'label', 'generatepress' ) | |
| ); |
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( 'generate_typography_default_fonts', function( $fonts ) { | |
| if ( ! class_exists( 'Bsf_Custom_Fonts_Taxonomy' ) ) { | |
| return $fonts; | |
| } | |
| $all_fonts = Bsf_Custom_Fonts_Taxonomy::get_fonts(); | |
| if ( ! empty( $all_fonts ) ) { | |
| foreach ( $all_fonts as $font_family_name => $fonts_url ) { | |
| $fonts[] = $font_family_name; |
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
| <?php | |
| /** | |
| * The template for displaying Comments. | |
| * | |
| * The area of the page that contains both current comments | |
| * and the comment form. The actual display of comments is | |
| * handled by a callback to generate_comment() which is | |
| * located in the inc/template-tags.php file. | |
| * | |
| * @package GeneratePress |
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( 'generate_search_button', function() { | |
| return ''; | |
| } ); |
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
| <div id="post-nav"> | |
| <?php global $post; | |
| $prevPost = get_previous_post(false); | |
| $post_type = get_post_type(); | |
| if($prevPost) { | |
| $args = array( | |
| 'posts_per_page' => 1, | |
| 'include' => $prevPost->ID, | |
| 'post_type' => $post_type, |
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( 'generate_logo_href', function( $url ) { | |
| if ( function_exists( 'pll_home_url' ) ) { | |
| return pll_home_url(); | |
| } | |
| return $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 generate_elements_ignore_languages( $post_id ) { | |
| if ( function_exists( 'pll_get_post_language' ) && function_exists( 'pll_current_language' ) ) { | |
| $language = pll_get_post_language( $post_id, 'locale' ); | |
| if ( $language && $language !== pll_current_language( 'locale' ) ) { | |
| return false; | |
| } | |
| } | |
| return $post_id; |
NewerOlder