wp_register_script('pagelines-bootstrap-all', PL_JS . '/script.bootstrap.min.js', array('jquery'), '2.3.1', true); wp_register_script('pagelines-blocks', PL_JS . '/script.blocks.js', array('jquery'), '1.0.1', true); wp_register_script('pagelines-supersize', PL_JS . '/script.supersize.js', array('jquery'), '3.1.3', false); wp_register_script('pagelines-viewport', PL_JS . '/script.viewport.js', array('jquery'), PL_CORE_VERSION, true); wp_register_script('pagelines-easing', PL_JS . '/script.easing.js', array('jquery'), PL_CORE_VERSION, true); } add_action('wp_print_scripts', 'pagelines_print_js'); function pagelines_print_js() { wp_enqueue_script('pagelines-bootstrap-all'); wp_enqueue_script('pagelines-blocks'); } // Load Supersize BG Script add_action('wp_enqueue_scripts', 'pagelines_supersize_bg'); if (defined('PL_LESS_DEV') && PL_LESS_DEV) { PageLinesRenderCSS::flush_version(false); } add_filter('generate_rewrite_rules', array('PageLinesRenderCSS', 'pagelines_less_rewrite')); add_action('wp_loaded', array('PageLinesRenderCSS', 'check_rules')); /** * Auto load child less file. */ add_action('init', 'pagelines_check_child_less'); function pagelines_check_child_less() { $lessfile = sprintf('%s/style.less', get_stylesheet_directory()); if (is_file($lessfile)) { pagelines_insert_core_less($lessfile); } } add_action('template_redirect', 'pagelines_check_customizer');
public static function instance() { if (is_null(self::$instance)) { self::$instance = new self(); } return self::$instance; }
function pagelines_check_lessdev() { if (1 == pl_setting('no_cache_mode')) { PageLinesRenderCSS::flush_version(false); global $dms_cache; $dms_cache->purge('draft'); delete_transient('pagelines_sections_cache'); set_theme_mod('editor-sections-data', array()); } }
function pagelines_set_versions() { if (current_user_can('edit_themes')) { delete_transient('pagelines_sections_cache'); if (defined('PL_LESS_DEV') && PL_LESS_DEV) { PageLinesRenderCSS::flush_version(false); } } set_theme_mod('pagelines_version', pl_get_theme_data(get_template_directory(), 'Version')); set_theme_mod('pagelines_child_version', pl_get_theme_data(get_stylesheet_directory(), 'Version')); }