Advertisement
Guest User

Untitled

a guest
Aug 15th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. <?php
  2. // You'd add the following code to the theme functions file (functions.php).
  3.  
  4. // Make sure that the function is called after the global $wcff is set; so we
  5. // use the priority 12.
  6. add_action( 'plugins_loaded', 'my_wcff_overrides', 12 );
  7. function my_wcff_overrides() {
  8.     // Make sure the wcff() function exists.
  9.     if ( ! function_exists( 'wcff' ) ) {
  10.         return;
  11.     }
  12.  
  13.     // Load the custom builder class (file).
  14.     //require_once get_template_directory() . '/wc-fields-factory/wcff-builder-custom.php'; // If NOT using a child theme.
  15.     require_once get_stylesheet_directory() . '/wc-fields-factory/wcff-builder-custom.php'; // If IS using a child theme.
  16.  
  17.     // Modify Wcff::$builder so that it uses the custom class. Change the name
  18.     // if it's not "Wcff_Builder_Custom".
  19.     wcff()->builder = new Wcff_Builder_Custom();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement