コード例 #1
0
function plugin_sws_css_tooltip_install()
{
    global $bundle;
    require_once ABSPATH . 'wp-content/plugins/' . basename(dirname(__FILE__)) . '/includes/bundle.php';
    $o = new ImportExport();
    $o->import_bundle($bundle, $error);
    return true;
}
コード例 #2
0
 function sws_install()
 {
     global $bundle;
     require_once WPCSS_PATH . 'includes/bundle.php';
     require_once WPCSS_PATH . 'includes/class.ImportExport.php';
     require_once WPCSS_PATH . 'includes/class.CSShortcodes.php';
     CSShortcodes::init_taxonomy();
     CSShortcodes::init_post_type();
     $o = new ImportExport();
     $o->import_bundle($bundle, $error);
     return true;
 }
コード例 #3
0
 function sws_install()
 {
     global $bundle;
     require_once WPCSS_PATH . 'includes/bundle.php';
     require_once WPCSS_PATH . 'includes/class.ImportExport.php';
     require_once WPCSS_PATH . 'includes/class.CSShortcodes.php';
     CSShortcodes::init_taxonomy();
     CSShortcodes::install_init_post_type();
     $o = new ImportExport();
     $o->import_bundle($bundle, $error);
     //--custom capabilities
     global $wp_roles;
     $wp_roles->add_cap('administrator', 'manage_sws');
     //--
     return true;
 }