/** * Register/enqueue frontend scripts. */ public static function load_scripts() { $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min'; $lightbox_en = 'yes' === get_option('restaurantpress_enable_lightbox'); $assets_path = str_replace(array('http:', 'https:'), '', RP()->plugin_url()) . '/assets/'; $frontend_script_path = $assets_path . 'js/frontend/'; if (apply_filters('restaurantpress_is_widget_menu_active', is_active_widget(false, false, 'restaurantpress_widget_menu', true)) || rp_post_content_has_shortcode('restaurantpress_menu')) { // Register frontend scripts conditionally if ($lightbox_en) { self::enqueue_script('prettyPhoto', $assets_path . 'js/prettyPhoto/jquery.prettyPhoto' . $suffix . '.js', array('jquery'), '3.1.6', true); self::enqueue_script('prettyPhoto-init', $assets_path . 'js/prettyPhoto/jquery.prettyPhoto.init' . $suffix . '.js', array('jquery', 'prettyPhoto')); self::enqueue_style('restaurantpress_prettyPhoto_css', $assets_path . 'css/prettyPhoto.css'); } // Global frontend scripts self::enqueue_script('restaurantpress', $frontend_script_path . 'restaurantpress' . $suffix . '.js', array('jquery')); // CSS Styles if ($enqueue_styles = self::get_styles()) { foreach ($enqueue_styles as $handle => $args) { self::enqueue_style($handle, $args['src'], $args['deps'], $args['version'], $args['media']); } } // Inline Styles self::create_primary_styles(); } }
/** * @deprecated */ function rp_shortcode_tag($tag = '') { _deprecated_function('rp_shortcode_tag', '1.3', 'rp_post_content_has_shortcode'); return rp_post_content_has_shortcode($tag); }