public function registerAssets()
 {
     parent::registerAssets();
     // prototype.js alters JSON2 behaviour, it shouldn't be loaded in our admin page anyway but
     // if other plugins are forcing it in all wordpress admin pages, we get rid of it here.
     wp_deregister_script("prototype");
     if (version_compare($GLOBALS["wp_version"], '3.5-RC1', '<')) {
         // for wordpress < 3.5, the bundled jquery ui is not able to handle correctly the nested sortables
         // so we load a newer version in noconflict mode and only use for our layout builder
         PeThemeAsset::addScript("framework/js/admin/3.5/jquery.js", array(), "pe_theme_35_jquery");
         PeThemeAsset::addScript("framework/js/admin/3.5/jquery-ui-1.9.2.custom.min.js", array("pe_theme_35_jquery"), "pe_theme_35_ui");
         PeThemeAsset::addScript("framework/js/admin/3.5/noconflict.js", array("pe_theme_35_ui"), "pe_theme_35");
         wp_enqueue_script("pe_theme_35");
     }
     PeThemeAsset::addStyle("framework/css/jquery.theme.field.layout.css", array("pe_theme_admin"), "pe_theme_field_layout");
     PeThemeAsset::addScript("framework/js/admin/jquery.theme.field.layout.js", array("pe_theme_utils", "jquery-ui-sortable", "pe_theme_tooltip", "json2"), "pe_theme_field_layout");
     wp_enqueue_style("pe_theme_field_layout");
     wp_enqueue_script("pe_theme_field_layout");
     $views = array();
     // modules
     foreach (peTheme()->view->views() as $view) {
         if ($view->capability("layout")) {
             $view->registerAssets();
             $views[] = $view;
         }
     }
     foreach ($views as $view) {
         $view->requireAssets();
     }
 }
 public function pe_theme_font_awesome_icons()
 {
     PeThemeAsset::addStyle("css/icons.css", array(), "pe_theme_outlined_iconset_css");
     $screen = get_current_screen();
     if (is_admin() && ('page' === $screen->post_type || 'post' === $screen->post_type || 'project' === $screen->post_type)) {
         wp_enqueue_style("pe_theme_outlined_iconset_css");
     }
 }
 public function registerAssets()
 {
     parent::registerAssets();
     PeThemeAsset::addScript("framework/js/admin/jquery.theme.field.icon.js", array("jquery-ui-dialog", "pe_theme_utils"), "pe_theme_field_icon");
     PeThemeAsset::addStyle("css/entypo-icon-font.css", array("wp-jquery-ui-dialog"), "pe_theme_admin_icon_font");
     wp_localize_script("pe_theme_field_icon", "pe_theme_field_icon", array("icons" => PeGlobal::$const->data->icons));
     wp_enqueue_style("pe_theme_admin_icon_font");
     wp_enqueue_script("pe_theme_field_icon");
 }
 public function registerAssets()
 {
     parent::registerAssets();
     peTheme()->asset->registerAssets();
     PeThemeAsset::addScript("framework/js/admin/jquery.theme.field.thumbnails.js", array("jquery", "pe_theme_transform", "pe_theme_utils_geom"), "pe_theme_field_thumbnails");
     PeThemeAsset::addStyle("framework/css/jquery.theme.field.thumbnails.css", null, "pe_theme_field_thumbnails");
     wp_enqueue_script("pe_theme_field_thumbnails");
     wp_enqueue_style("pe_theme_field_thumbnails");
 }
Beispiel #5
0
 public function registerAssets()
 {
     PeThemeAsset::addScript("framework/js/admin/jquery.theme.utils.js", array(), "pe_theme_utils");
     PeThemeAsset::addScript("framework/js/admin/jquery.theme.tooltip.js", array('jquery', 'jquery-ui-tooltip', 'pe_theme_utils'), "pe_theme_tooltip");
     PeThemeAsset::addScript("framework/js/admin/jquery.theme.admin.js", array('jquery', 'jquery-ui-core', 'jquery-ui-tabs', 'jquery-ui-sortable', 'pe_theme_tooltip', 'pe_theme_utils'), "pe_theme_admin");
     PeThemeAsset::addScript("framework/js/admin/jquery.theme.edit.js", array(), "pe_theme_edit");
     PeThemeAsset::addStyle("framework/css/ui/jquery-ui-1.8.17.custom.css", NULL, "pe_theme_admin_ui");
     PeThemeAsset::addStyle("framework/css/customadminicons.css", array(), "pe_theme_admin_icons");
     PeThemeAsset::addStyle("framework/css/admin.css", array("pe_theme_admin_ui", "pe_theme_admin_icons"), "pe_theme_admin");
     //PeThemeAsset::addStyle("framework/css/admin.css",array("pe_theme_admin_icons"),"pe_theme_admin");
 }
 public function pe_theme_asset_style_pe_theme_init_deps_filter($deps)
 {
     PeThemeAsset::addStyle("css/woocommerce.css", array(), "pe_theme_woocommerce");
     $deps[] = "pe_theme_woocommerce";
     return $deps;
 }