Created
December 5, 2015 13:47
-
-
Save merianos/47959167cecabce91872 to your computer and use it in GitHub Desktop.
Allow PageBuilder to see your custom fields
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
function register_unique_namespace( $class_prefixes = array() ) { | |
$class_prefixes[] = 'My_Custom_Field_'; | |
return $class_prefixes; | |
} | |
add_filter( 'siteorigin_widgets_field_class_prefixes', 'register_unique_namespace' ); | |
function register_my_custom_fields_folder( $class_paths = array() ) { | |
$class_paths[] = dirname( __FILE__ ) . '/fields/'; | |
return $class_paths; | |
} | |
add_filter( 'siteorigin_widgets_field_class_paths', 'register_my_custom_fields_folder' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment