private function _add_hooks() { if (Upfront_Permissions::current(Upfront_Permissions::BOOT)) { upfront_add_ajax('upfront_load_editor_grid', array($this, "load_styles")); } upfront_add_ajax('upfront_load_grid', array($this, "load_front_styles")); upfront_add_ajax_nopriv('upfront_load_grid', array($this, "load_front_styles")); }
private function _add_hooks() { upfront_add_ajax('upfront_load_styles', array($this, "load_styles")); upfront_add_ajax_nopriv('upfront_load_styles', array($this, "load_styles")); if (Upfront_Permissions::current(Upfront_Permissions::BOOT)) { upfront_add_ajax('upfront_theme_styles', array($this, "theme_styles")); } if (Upfront_Permissions::current(Upfront_Permissions::SAVE)) { upfront_add_ajax('upfront_save_styles', array($this, "save_styles")); upfront_add_ajax('upfront_delete_styles', array($this, "delete_styles")); upfront_add_ajax('upfront_save_theme_colors_styles', array($this, "save_theme_colors_styles")); } }
private function _add_hooks() { $this->_cache = Upfront_Cache::get_instance(Upfront_Cache::TYPE_LONG_TERM); if (Upfront_OutputBehavior::has_experiments()) { add_filter('upfront-experiments-styles-debounce_dependency_load', array($this, 'add_style_load_url')); add_filter('upfront-experiments-scripts-debounce_dependency_load', array($this, 'add_script_load_url')); } else { add_action('upfront-layout-applied', array($this, 'load_styles')); add_action('upfront-layout-applied', array($this, 'load_scripts')); } upfront_add_ajax('upfront-element-styles', array($this, 'serve_styles')); upfront_add_ajax_nopriv('upfront-element-styles', array($this, 'serve_styles')); upfront_add_ajax('upfront-element-scripts', array($this, 'serve_scripts')); upfront_add_ajax_nopriv('upfront-element-scripts', array($this, 'serve_scripts')); }