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
/** | |
* Determine whether a $post or a string contains a specific block type, | |
* including blocks that are included in reusable blocks. | |
* | |
* @param string $block_name Full Block type to look for. | |
* @param int|string|WP_Post|null $post Optional. Post content, post ID, or post object. Defaults to global $post. | |
* @return bool Whether the post content contains the specified block. | |
*/ | |
function has_block_including_reusables( $block_name, $post = false ) { |
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 | |
/* Copy this in your child theme functions.php file */ | |
function jba_change_plugin_translations( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Lire plus' : | |
$translated_text = 'Voir le produit'; | |
break; | |
} | |
return $translated_text; | |
} |
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 | |
/* | |
* Query all posts versions on home page. | |
*/ | |
function jba_modify_home_query( $query ) { | |
if ( function_exists( 'pll__' ) && ! is_admin() && is_home() ) { | |
$query->set('tax_query', ''); | |
$query->set('lang', ''); | |
} | |
} |
NewerOlder