Skip to content

Instantly share code, notes, and snippets.

@qstudio
Last active September 17, 2020 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qstudio/45ceec248902a15b06b8aacdcdf1aa09 to your computer and use it in GitHub Desktop.
Save qstudio/45ceec248902a15b06b8aacdcdf1aa09 to your computer and use it in GitHub Desktop.
<?php
// filter Willow Config ##
// Priority -- Willow = 1, Q Plugin = 10, Extension = 10, Parent Theme = 100, Child Theme = 1000 ##
\add_filter( 'willow/config/load',
function( $args ){
$source = null; // context source ##
return self::filter( $args, $source );
}
, 1, 1 );
\add_filter( 'willow/config/load',
function( $args ){
$source = 'plugin'; // context source ##
return self::filter( $args, $source );
}
, 10, 1 );
\add_filter( 'willow/config/load',
function( $args ){
$source = 'extend'; // context source ##
return self::filter( $args, $source );
}
, 50, 1 );
\add_filter( 'willow/config/load',
function( $args ){
$source = 'parent'; // context source ##
return self::filter( $args, $source );
}
, 100, 1 );
\add_filter( 'willow/config/load',
function( $args ){
$source = 'child'; // context source ##
return self::filter( $args, $source );
}
, 1000, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment