This file contains 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( 'block_type_metadata_settings', 'wecodeart_fix_gallery', 10, 2 ); | |
/** | |
* Filter markup | |
* | |
* @see https://wordpress.org/themes/wecodeart/ | |
* | |
* @param array $settings | |
* @param array $data | |
*/ |
This file contains 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
const variables = { | |
name: 'Bican Marian Valeriu', | |
job: 'WordPress Developer', | |
}; | |
const destruct = (obj, ...keys) => keys.reduce((a, c) => ({ ...a, [c]: obj[c] }), {}); | |
const mapVariables = (variables, string) => { | |
let rxp = /{{([^}]+)}}/g, curMatch; |
This file contains 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
/** | |
* Get primary taxonomy term (YoastSEO). | |
* | |
* @param mixed $taxonomy Taxonomy to check for. | |
* @param boolean $term_as_obj Whether to return an object or the term name. | |
* @param int $post_id Post ID. | |
* @return mixed The primary term. | |
*/ | |
function get_primary_tax_term( $post_id = 0, $taxonomy = 'category', $term_as_obj = true ) { | |
if ( 0 === $post_id ) { |