Exemplo n.º 1
0
 /**
  * Enqueue style
  */
 public function enqueue_admin_style()
 {
     WR_Pb_Helper_Functions::enqueue_styles();
     if (!WR_Pb_Helper_Functions::is_preview()) {
         WR_Pb_Init_Assets::load(array('wr-pb-modal-css'));
     } else {
         WR_Pb_Init_Assets::load(array('wr-pb-frontend-css', 'wr-pb-scrollreveal'));
         WR_Pb_Init_Assets::inline('js', "\n\t\t\t\t\tvar revealObjects  = null;\n\t\t\t\t\t\$(document).ready(function (){\n\t\t\t\t\t\tif(\$('[data-scroll-reveal]').length) {\n\t\t\t\t\t\t\tif (!revealObjects) {\n\t\t\t\t\t\t\t\trevealObjects = new scrollReveal({\n\t\t\t\t\t\t\t\t        reset: true\n\t\t\t\t\t\t\t\t    });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t");
     }
 }
Exemplo n.º 2
0
 /**
  * Load required assets.
  *
  * @return  void
  */
 public static function load_assets()
 {
     WR_Pb_Helper_Functions::enqueue_styles();
     WR_Pb_Helper_Functions::enqueue_scripts_end();
 }
Exemplo n.º 3
0
 /**
  * Load necessary assets.
  *
  * @return  void
  */
 function load_assets()
 {
     if ($this->check_support('has_editor')) {
         // Load styles
         WR_Pb_Helper_Functions::enqueue_styles();
         // Load scripts
         WR_Pb_Helper_Functions::enqueue_scripts();
         $scripts = array('wr-pb-jquery-select2-js', 'wr-pb-addpanel-js', 'wr-pb-jquery-resize-js', 'wr-pb-joomlashine-modalresize-js', 'wr-pb-layout-js', 'wr-pb-placeholder', 'wr-pb-tinymce-btn');
         WR_Pb_Init_Assets::load(apply_filters('wr_pb_assets_enqueue_admin', $scripts));
         WR_Pb_Helper_Functions::enqueue_scripts_end();
     }
 }