本文整理汇总了PHP中FLBuilderModel::is_ssl方法的典型用法代码示例。如果您正苦于以下问题:PHP FLBuilderModel::is_ssl方法的具体用法?PHP FLBuilderModel::is_ssl怎么用?PHP FLBuilderModel::is_ssl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FLBuilderModel
的用法示例。
在下文中一共展示了FLBuilderModel::is_ssl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: layout_styles_scripts
/**
* Register and enqueue the styles and scripts for all builder
* layouts in the main WordPress query.
*
* @since 1.0
* @return void
*/
public static function layout_styles_scripts()
{
global $wp_query;
global $post;
$original_post = $post;
$ver = FL_BUILDER_VERSION;
$css_url = plugins_url('/css/', FL_BUILDER_FILE);
$js_url = plugins_url('/js/', FL_BUILDER_FILE);
// Register additional CSS
wp_register_style('font-awesome', $css_url . 'font-awesome.min.css', array(), $ver);
wp_register_style('foundation-icons', $css_url . 'foundation-icons.css', array(), $ver);
wp_register_style('fl-slideshow', $css_url . 'fl-slideshow.css', array(), $ver);
wp_register_style('jquery-bxslider', $css_url . 'jquery.bxslider.css', array(), $ver);
wp_register_style('jquery-magnificpopup', $css_url . 'jquery.magnificpopup.css', array(), $ver);
// Register additional JS
wp_register_script('fl-slideshow', $js_url . 'fl-slideshow.js', array('yui3'), $ver, true);
wp_register_script('fl-gallery-grid', $js_url . 'fl-gallery-grid.js', array('jquery'), $ver, true);
wp_register_script('jquery-bxslider', $js_url . 'jquery.bxslider.min.js', array('jquery-easing', 'jquery-fitvids'), $ver, true);
wp_register_script('jquery-easing', $js_url . 'jquery.easing.1.3.js', array('jquery'), '1.3', true);
wp_register_script('jquery-fitvids', $js_url . 'jquery.fitvids.js', array('jquery'), $ver, true);
wp_register_script('jquery-imagesloaded', $js_url . 'jquery.imagesloaded.js', array('jquery'), $ver, true);
wp_register_script('jquery-infinitescroll', $js_url . 'jquery.infinitescroll.js', array('jquery'), $ver, true);
wp_register_script('jquery-magnificpopup', $js_url . 'jquery.magnificpopup.min.js', array('jquery'), $ver, true);
wp_register_script('jquery-mosaicflow', $js_url . 'jquery.mosaicflow.min.js', array('jquery'), $ver, true);
wp_register_script('jquery-waypoints', $js_url . 'jquery.waypoints.min.js', array('jquery'), $ver, true);
wp_register_script('jquery-wookmark', $js_url . 'jquery.wookmark.min.js', array('jquery'), $ver, true);
// YUI 3 (Needed for the slideshow)
if (FLBuilderModel::is_ssl()) {
wp_register_script('yui3', 'https://yui-s.yahooapis.com/3.5.1/build/yui/yui-min.js', array(), '3.5.1', false);
} else {
wp_register_script('yui3', 'http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js', array(), '3.5.1', false);
}
// Enqueue assets for posts in the main query.
if (isset($wp_query->posts)) {
foreach ($wp_query->posts as $post) {
self::enqueue_layout_styles_scripts($post->ID);
}
}
// Enqueue assets for posts via the fl_builder_global_posts filter.
$post_ids = FLBuilderModel::get_global_posts();
if (count($post_ids) > 0) {
$posts = get_posts(array('post__in' => $post_ids, 'post_type' => get_post_types(), 'posts_per_page' => -1));
foreach ($posts as $post) {
self::enqueue_layout_styles_scripts($post->ID);
}
}
// Reset the global post variable.
$post = $original_post;
}
示例2: register_layout_styles_scripts
/**
* Register the styles and scripts for builder layouts.
*
* @since 1.7.4
* @return void
*/
public static function register_layout_styles_scripts()
{
$ver = FL_BUILDER_VERSION;
$css_url = plugins_url('/css/', FL_BUILDER_FILE);
$js_url = plugins_url('/js/', FL_BUILDER_FILE);
// Register additional CSS
wp_register_style('font-awesome', $css_url . 'font-awesome.min.css', array(), $ver);
wp_register_style('foundation-icons', $css_url . 'foundation-icons.css', array(), $ver);
wp_register_style('fl-slideshow', $css_url . 'fl-slideshow.css', array(), $ver);
wp_register_style('jquery-bxslider', $css_url . 'jquery.bxslider.css', array(), $ver);
wp_register_style('jquery-magnificpopup', $css_url . 'jquery.magnificpopup.css', array(), $ver);
// Register additional JS
wp_register_script('fl-slideshow', $js_url . 'fl-slideshow.js', array('yui3'), $ver, true);
wp_register_script('fl-gallery-grid', $js_url . 'fl-gallery-grid.js', array('jquery'), $ver, true);
wp_register_script('jquery-bxslider', $js_url . 'jquery.bxslider.min.js', array('jquery-easing', 'jquery-fitvids'), $ver, true);
wp_register_script('jquery-easing', $js_url . 'jquery.easing.1.3.js', array('jquery'), '1.3', true);
wp_register_script('jquery-fitvids', $js_url . 'jquery.fitvids.js', array('jquery'), $ver, true);
wp_register_script('jquery-imagesloaded', $js_url . 'jquery.imagesloaded.js', array('jquery'), $ver, true);
wp_register_script('jquery-infinitescroll', $js_url . 'jquery.infinitescroll.js', array('jquery'), $ver, true);
wp_register_script('jquery-magnificpopup', $js_url . 'jquery.magnificpopup.min.js', array('jquery'), $ver, true);
wp_register_script('jquery-mosaicflow', $js_url . 'jquery.mosaicflow.min.js', array('jquery'), $ver, true);
wp_register_script('jquery-waypoints', $js_url . 'jquery.waypoints.min.js', array('jquery'), $ver, true);
wp_register_script('jquery-wookmark', $js_url . 'jquery.wookmark.min.js', array('jquery'), $ver, true);
// YUI 3 (Needed for the slideshow)
if (FLBuilderModel::is_ssl()) {
wp_register_script('yui3', 'https://yui-s.yahooapis.com/3.5.1/build/yui/yui-min.js', array(), '3.5.1', false);
} else {
wp_register_script('yui3', 'http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js', array(), '3.5.1', false);
}
}