function nrelate_flyout_styles() { if (nrelate_flyout_is_loading()) { global $nrelate_thumbnail_styles, $nrelate_thumbnail_styles_separate, $nrelate_text_styles, $nrelate_text_styles_separate, $fo_styleclass, $fo_layout; $options = get_option('nrelate_flyout_options'); $style_options = get_option('nrelate_flyout_options_styles'); $ad_options = get_option('nrelate_flyout_options_ads'); // Are we loading separate ads? if ($ad_options['flyout_ad_placement'] == 'Separate') { $style_suffix = '_separate'; } else { $style_suffix = ''; } // Thumbnails or Text? if ($options['flyout_thumbnail'] == 'Thumbnails') { $style_type = 'flyout_thumbnails_style' . $style_suffix; $style_array = 'nrelate_thumbnail_styles' . $style_suffix; } else { $style_type = 'flyout_text_style' . $style_suffix; $style_array = 'nrelate_text_styles' . $style_suffix; } //Identify Animation type and stylesheet $options = get_option('nrelate_flyout_options'); $animstyle_options = get_option('nrelate_flyout_anim_options_styles'); if ($options['flyout_animation'] == 'Slideout') { //Slideout Animation if ('none' == $animstyle_options['flyout_anim_slideout_style']) { return; } $anim_style_type = 'flyout-' . $animstyle_options['flyout_anim_slideout_style']; //$anim_style_type = 'slideout-' . $animstyle_options['flyout_anim_slideout_style']; use for two different styles $anim_stylesheet = 'nrelate-' . $anim_style_type . '.min.css'; } else { //Fade Animation if ('none' == $animstyle_options['flyout_anim_fade_style']) { return; } $anim_style_type = 'flyout-' . $animstyle_options['flyout_anim_slideout_style']; //$anim_style_type = 'fade-' . $animstyle_options['flyout_anim_fade_style']; use for two different styles $anim_stylesheet = 'nrelate-' . $anim_style_type . '.min.css'; } // Get style name (i.e. Default) $style_name = $style_options[$style_type]; // Get the style sheet and class from STYLES.PHP $style_array_convert = ${$style_array}; $stylesheet = $style_array_convert[$style_name]['stylesheet'] ? $style_array_convert[$style_name]['stylesheet'] : "nrelate-panels-default"; $fo_styleclass = $style_array_convert[$style_name]['styleclass']; $fo_layout = $style_array_convert[$style_name]['layout']; // Get full stylesheet url $fo_css_url = NRELATE_CSS_URL . $stylesheet . '.min.css'; $fo_anim_css_url = NRELATE_CSS_URL . $anim_stylesheet; // For local development //$fo_anim_css_url= NRELATE_FLYOUT_PLUGIN_URL . '/' . $anim_stylesheet; // Only load if style not set to NONE if ('none' != $style_options[$style_type]) { nrelate_ie6_thumbnail_style(); wp_register_style('nrelate-style-' . $style_name . "-" . str_replace(".", "-", NRELATE_PLUGIN_VERSION), $fo_css_url, array(), NRELATE_PLUGIN_VERSION); wp_enqueue_style('nrelate-style-' . $style_name . "-" . str_replace(".", "-", NRELATE_PLUGIN_VERSION)); } // Load animation style wp_register_style('nrelate-style-' . $anim_style_type . "-" . str_replace(".", "-", NRELATE_PLUGIN_VERSION), $fo_anim_css_url, array(), NRELATE_PLUGIN_VERSION); wp_enqueue_style('nrelate-style-' . $anim_style_type . "-" . str_replace(".", "-", NRELATE_PLUGIN_VERSION)); } }
function nrelate_related_styles() { if (nrelate_related_is_loading()) { global $nrelate_thumbnail_styles, $nrelate_thumbnail_styles_separate, $nrelate_text_styles, $nrelate_text_styles_separate, $rc_styleclass, $rc_layout; $options = get_option('nrelate_related_options'); $style_options = get_option('nrelate_related_options_styles'); $ad_options = get_option('nrelate_related_options_ads'); // Are we loading separate ads? if ($ad_options['related_ad_placement'] == 'Separate') { $style_suffix = '_separate'; } else { $style_suffix = ''; } // Thumbnails or Text? if ($options['related_thumbnail'] == 'Thumbnails') { $style_type = 'related_thumbnails_style' . $style_suffix; $style_array = 'nrelate_thumbnail_styles' . $style_suffix; } else { $style_type = 'related_text_style' . $style_suffix; $style_array = 'nrelate_text_styles' . $style_suffix; } // Get style name (i.e. Default) $style_name = $style_options[$style_type]; // Get the style sheet and class from STYLES.PHP $style_array_convert = ${$style_array}; $stylesheet = $style_array_convert[$style_name]['stylesheet'] ? $style_array_convert[$style_name]['stylesheet'] : "nrelate-panels-default"; $rc_styleclass = $style_array_convert[$style_name]['styleclass']; $rc_layout = $style_array_convert[$style_name]['layout']; // Get full stylesheet url $nr_css_url = NRELATE_CSS_URL . $stylesheet . '.min.css'; /* For local development */ //$nr_css_url = NRELATE_RELATED_PLUGIN_URL . '/' . $stylesheet . '.css'; // Only load if style not set to NONE if ('none' != $style_options[$style_type]) { nrelate_ie6_thumbnail_style(); wp_register_style('nrelate-style-' . $style_name . "-" . str_replace(".", "-", NRELATE_PLUGIN_VERSION), $nr_css_url, array(), NRELATE_PLUGIN_VERSION); wp_enqueue_style('nrelate-style-' . $style_name . "-" . str_replace(".", "-", NRELATE_PLUGIN_VERSION)); } } }