Beispiel #1
0
 /**
  * Import a package
  *
  * @param mixed $data (optional) An associative array containing a package, or the json encoded package
  * @param bool $replace (optional) Replace existing items when found
  *
  * @return bool
  *
  * @since 1.9.0
  * @deprecated 2.0
  */
 public function import_package($data = false, $replace = false)
 {
     if (class_exists('Pods_Migrate_Packages')) {
         return Pods_Migrate_Packages::import($data, $replace);
     }
     return false;
 }
Beispiel #2
0
        wp_send_json_error($fail);
    } else {
        wp_send_json_success($fail);
    }
});
add_action('admin_init', function () {
    return;
    $content = file_get_contents(DION_THEME_DIR . '/pods.json');
    //$content =   json_decode($content);
    echo class_exists('Pods_Migrate_Packages');
    if (class_exists('Pods_Migrate_Packages')) {
        $import = Pods_Migrate_Packages::import($content, false);
    } else {
        $classpath = WP_PLUGIN_DIR . '/pods/components/Migrate-Packages/Migrate-Packages.php';
        include_once $classpath;
        $import = Pods_Migrate_Packages::import($content, false);
    }
});
function dynamic_section($sections)
{
    //$sections = array();
    $sections[] = array('title' => __('Section via hook', 'redux-framework-demo'), 'desc' => __('<p class="description">This is a section created by adding a filter to the sections array. Can be used by child themes to add/remove sections from the options.</p>', 'redux-framework-demo'), 'icon' => 'el-icon-paper-clip', 'fields' => array());
    return $sections;
}
add_action('tgmpa_register', function () {
    $plugins = array(array('name' => 'Migrate DB', 'slug' => 'wp-migrate-db', 'required' => false), array('name' => 'Pods Framework', 'slug' => 'pods', 'required' => true));
    /**
     * Array of configuration settings. Amend each line as needed.
     * If you want the default strings to be available under your own theme domain,
     * leave the strings uncommented.
     * Some of the strings are added into a sprintf, so see the comments at the