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
/** | |
* Retrieves the translation of text. | |
* | |
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/ | |
*/ | |
import { __ } from '@wordpress/i18n'; | |
/** | |
* React hook that is used to mark the block wrapper element. | |
* It provides all the necessary props like the class 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
!function(l,c,u){"use strict";var e={getInstance:function(e,t){return l.offside.factory||(l.offside.factory=n(t)),l.offside.factory.getOffsideInstance(e,t)}};function n(e){var t,h=function(e){0<T.length&&(isNaN(e)?T.forEach(function(e){k[e].close()}):k[e].close())},S=function(){L(D,i)},L=function(e,t){e.classList?e.classList.add(t):e.className=(e.className+" "+t).trim()},A=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")},E=function(e,t,n){e.addEventListener(t,n)},O=function(e,t,n){e.removeEventListener(t,n)},q=function(e){return e instanceof HTMLElement?[e]:Array.isArray(e)?e:"string"==typeof e&&Array.apply(null,c.querySelectorAll(e))},x=function(e,t){var n=e.indexOf(t);return-1<n&&n},n={slidingElementsSelector:".offside-sliding-element",disableCss3dTransforms:!1,debug:!1};for(t in e)n.hasOwnProperty(t)&&(n[t]=e[t]);var w="offside-js",o=w+"--init",i=w+"--interact",k=[],C=!0,s=!n.disableCss3dTransforms&&function(){ |
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 search forms in Generate | |
* | |
* @package GeneratePress | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} |
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( 'generateblocks_defaults', function( $defaults ) { | |
$defaults['container']['paddingTop'] = ''; | |
$defaults['container']['paddingRight'] = ''; | |
$defaults['container']['paddingBottom'] = ''; | |
$defaults['container']['paddingLeft'] = ''; | |
return $defaults; | |
} ); |
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
if ( strpos( $content, '{{custom_field' ) !== false ) { | |
$data = preg_match_all('/{{custom_field="([^"]*)"}}/', $content, $matches); | |
foreach ( $matches[1] as $match ) { | |
if ( null !== get_post_meta( get_the_ID(), $match, true ) ) { | |
$search[] = '{{custom_field="' . $match . '"}}'; | |
$replace[] = get_post_meta( get_the_ID(), $match, 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_filter( 'taxonomy_parent_dropdown_args', 'limit_parents_wpse_tax_page', 10, 2 ); | |
add_filter( 'post_edit_category_parent_dropdown_args', 'limit_parents_wpse_tax_page' ); | |
function limit_parents_wpse_tax_page( $args ) { | |
if ( 'YOUR_TAXONOMY' != $args['taxonomy'] ) return $args; | |
$args['depth'] = '1'; | |
return $args; | |
} |