$style = ' html.wp-toolbar{padding-top: 102px; } #wpadminbar{top:70px; } #wr-header{position: fixed; top: 0; width: 100%; left: 0; background: #0074a2; height: 70px; z-index: 1; } #wr-header .wr-logoheader{float: left; height: 100%; border-right: 1px solid #0080b1; background: #005d82; margin: 0 15px 0 0; } #wr-header .wr-logoheader img{margin: 13px 10px 0; } #wr-header p{font-size: 14px; color: #FFF; padding: 0 50px 0 0; display: table-cell; height: 70px; vertical-align: middle; } #wr-header p a{color: #6BD8FF; text-decoration: none; } #wr-header p a:hover{text-decoration: underline; color: #C1EFFF; } #wr-header #close-header{float: right; margin: -47px 20px 0 0; font-size: 28px; color: rgba(0,0,0,0.3); cursor: pointer; } #wr-header #close-header:hover{color: rgba(0,0,0,1); } @media screen and (max-width:600px){ #wr-header {height: 172px; } } '; WR_Megamenu_Init_Assets::inline('css', $style); ?> <div id="wr-header"> <a class="wr-logoheader" target="_blank" href="http://www.woorockets.com/?utm_source=MegaMenu%20About&utm_medium=top%20logo&utm_campaign=Cross%20Promo%20Plugins"><img src="<?php echo WR_MEGAMENU_ROOT_URL . 'assets/woorockets/images/about-us/logo-header.png'; ?> " alt="woorockets.com" /></a> <p><?php printf(__('Thank you for installing WR Mega Menu from WooRockets Team! We are making new hi-quality themes and plugins for you ;) Follow us on <a href="%s" target="_blank" >Twitter</a> or <a href="%s" target="_blank" >Subscribe</a> to our email list and be the first to get updated.', WR_MEGAMENU_TEXTDOMAIN), 'http://bit.ly/wr-freebie-twitter', 'http://www.woorockets.com/?utm_source=MegaMenu%20Setting&utm_medium=banner-link&utm_campaign=Cross%20Promo%20Plugins#subscribe'); ?> </p> <span id="close-header" class="dashicons dashicons-no"></span> </div> <script type="text/javascript">
" id="wr-form-action-<?php esc_attr_e($bid); ?> " type="<?php esc_attr_e($button['type']); ?> "> <?php _e($button['label'], $this->text_domain); ?> </button> <?php } ?> </div> <?php } ?> </form> <?php } // Print Javascript initialization $script = ' // Init form new $.WR_Form( ' . json_encode(array_merge(array('form_id' => esc_attr($this->id)), array_combine($js_init, array_map('is_string', $js_init)))) . ' );'; WR_Megamenu_Init_Assets::inline('js', $script, true); } // Exit immediately if this is an Ajax request if (isset($_GET['ajax']) && $_GET['ajax']) { exit; }
public function load_profile_assets() { $profile_selector = $this->settings['location'] . '_' . $this->profile_id; $theme_style = isset($this->settings['theme_style']) ? $this->settings['theme_style'] : ''; $themes_options = get_post_meta($this->profile_id, WR_MEGAMENU_META_KEY . '_themes_options', true); $themes_options = json_decode($themes_options, true); // Load profile theme $default = isset($theme_style) && $theme_style != '' ? $theme_style . '/' . $theme_style . '.css' : 'default/default.css'; $profile_theme_url = WR_MEGAMENU_ROOT_URL . 'themes/' . $default; wp_enqueue_style("wr-{$this->profile_id}", $profile_theme_url, array(), '1.0'); if (isset($themes_options[$theme_style])) { $theme_options = $themes_options[$theme_style]; $setting = json_decode($theme_options, true); $style = ''; // Menu bar $style .= '.wr-megamenu-container.' . $profile_selector . ' {background: ' . $setting['menu-bar-bg'] . ' !important;}'; $style .= '.' . $profile_selector . ' .wr-mega-menu > li:hover > a, .' . $profile_selector . ' .wr-mega-menu > li.focus > a {background: ' . $setting['menu-bar-on_hover'] . ' !important;}'; if ($setting['menu-bar-font'] != 'inherit') { $style .= '.' . $profile_selector . ' .wr-mega-menu > li > a { color: ' . $setting['menu-bar-menu_color'] . ' !important; font-family: ' . $setting['menu-bar-font_face'] . ' !important; font-size:' . $setting['menu-bar-font_size'] . 'px !important; font-weight:' . $setting['menu-bar-font_weight'] . ' !important; }'; } if ($setting['menu-bar-icon_display_mode'] == 'icon_only') { $style .= ".{$profile_selector} .wr-mega-menu > li > a .menu_title, .{$profile_selector} .wr-mega-menu .sub-menu a .menu_title, .{$profile_selector} .wr-mega-menu .block-sub-menu a .ig-menu-title {display:none;}"; } else { if ($setting['menu-bar-icon_display_mode'] == 'text_only') { $style .= ".{$profile_selector} .wr-mega-menu > li > a > i, .{$profile_selector} .wr-mega-menu .sub-menu a i {display:none !important;}"; } } $style .= ".{$profile_selector} .wr-mega-menu > li > a > i {font-size: " . $setting['menu-bar-icon_size'] . 'px !important;}'; if ($setting['menu-bar-icon_position'] == 'top') { $style .= ".{$profile_selector} .wr-mega-menu > li > a > i {display:block !important;}"; $style .= ".{$profile_selector} .wr-mega-menu > li > a > i {text-align: center; width: 100% !important ;}"; } if ($setting['heading-text-font'] != 'inherit') { $style .= '.' . $profile_selector . ' .wr-mega-menu a.caption { color: ' . $setting['heading-text-menu_color'] . ' !important; font-family: ' . $setting['heading-text-font_face'] . ' !important; font-size:' . $setting['heading-text-font_size'] . 'px !important; font-weight:' . $setting['heading-text-font_weight'] . ' !important; }'; } if ($setting['normal-text-font'] != 'inherit') { $style .= '.' . $profile_selector . ' ul.sub-menu li a, ul.submenu-items li a { color: ' . $setting['normal-text-menu_color'] . ' !important; font-family: ' . $setting['normal-text-font_face'] . ' !important; font-size:' . $setting['normal-text-font_size'] . 'px !important; font-weight:' . $setting['normal-text-font_weight'] . ' !important; }'; } WR_Megamenu_Init_Assets::print_inline('css', $style); $script = ' '; if ($setting['menu-bar-menu_layout'] == 'vertical') { $script .= " \$( '.wr-megamenu-container.{$profile_selector}' ).addClass( 'vertical' );"; } if ($setting['submenu-panel-bullet_icon'] == 'yes') { $script .= "\$( '.{$profile_selector} ul.sub-menu li a, .{$profile_selector} ul.submenu-items li a' ).prepend( '<i class=\"glyphicon glyphicon-chevron-right\"></i>' );"; } if ($setting['menu-bar-stick_menu'] == 'yes') { $script .= "\$(document).scroll(function () {\n\t\t\t\t\t\t\t\tvar y = \$(document).scrollTop(),\n\t\t\t\t\t\t\t\tmega_container = \$( '.wr-megamenu-container.{$profile_selector}' );\n\t\t\t\t\t\t\t\tresponsive = \$( '.it-responsive-mega' );\n\t\t\t\t\t\t\t\tif (y > mega_container.parent().offset().top) {\n\t\t\t\t\t\t\t\t\tmega_container.addClass( 'stick' );\n\t\t\t\t\t\t\t\t\tresponsive.addClass( 'stick' );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmega_container.removeClass( 'stick' );\n\t\t\t\t\t\t\t\t\tresponsive.removeClass( 'stick' );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});"; } WR_Megamenu_Init_Assets::inline('js', $script); } $script = "\n\n\t\t\t\$( '.{$profile_selector} .mega-item.wr-megamenu-fixed, .{$profile_selector} .menu-item-has-children.menu-default' ).on( 'hover', function () {\n\n\t\t\t\tvar\n\t\t\t\t\tmega_inner = null,\n\t\t\t\t\tmega_menu = \$(this).find( ' > .wr-megamenu-inner' ),\n\t\t\t\t\tsub_menu = \$(this).find( ' > .sub-menu' ),\n\t\t\t\t\tis_mega_inner = false\n\t\t\t\t\t;\n\n\t\t\t\tif (sub_menu.length > 0) {\n\t\t\t\t\tmega_inner = sub_menu;\n\t\t\t\t} else if (mega_menu.length > 0) {\n\t\t\t\t\tmega_inner = mega_menu;\n\t\t\t\t\tis_mega_inner = true;\n\t\t\t\t}\n\t\t\t\tif (mega_inner != null) {\n\t\t\t\t\tif (mega_inner.outerWidth() > (\$(window).outerWidth() - mega_inner.offset().left ) ) {\n\t\t\t\t\t\tif (!is_mega_inner) {\n\t\t\t\t\t\t\tmega_inner.addClass( 'wr-megamenu-rtl' );\n\t\t\t\t\t\t\t\$( '.{$profile_selector} ul.sub-menu li.wr-megamenu-item' ).css({'text-align': 'right', 'background': 'inherit'});\n\t\t\t\t\t\t\t\$( '.{$profile_selector} ul.wr-mega-menu ul ul.sub-menu' ).css( 'right', '99%' );\n\t\t\t\t\t\t\t\$( '.{$profile_selector} ul.wr-mega-menu ul li' ).on( 'hover', function () {\n\t\t\t\t\t\t\t\t\$(this).find( '> ul.sub-menu' ).css({'right': '100%'});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\$( '.wr-megamenu-container.{$profile_selector} ul ul' ).addClass('pull-right');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmega_inner.addClass('wr-megamenu-left-inner');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t"; WR_Megamenu_Init_Assets::inline('js', $script); // Custom css $custom_css_data = WR_Megamenu_Helpers_Functions::custom_css_data(isset($this->profile_id) ? $this->profile_id : NULL); extract($custom_css_data); $css_files = stripslashes($css_files); if (!empty($css_files)) { $css_files = json_decode($css_files); $data = $css_files->data; foreach ($data as $idx => $file_info) { $checked = $file_info->checked; $url = $file_info->url; // if file is checked to load, enqueue it if ($checked) { echo balanceTags("<link rel='stylesheet' id='wr-mg-custom-file-{$this->profile_id}-{$idx}' href='/{$url}' type='text/css' media='all' />"); } } } $css_custom = stripslashes($css_custom); if (!empty($css_custom)) { WR_Megamenu_Init_Assets::print_inline('css', $css_custom); } }
exit; } $post_id = esc_sql($_GET['pid']); // get custom css data $custom_css_data = WR_Megamenu_Helpers_Functions::custom_css_data(isset($post_id) ? $post_id : NULL); extract($custom_css_data); $css_files = stripslashes($css_files); $css_custom = stripslashes($css_custom); $_css_files_tooltip = 'Insert path to your CSS files, each line for each file. <br>The path can be relative like: <br> <i><u>assets/css/yourfile.css</u></i> <br>or absolute like: <br> <i><u>http://yourwebsite.com/assets/css/yourfile.css</u></i> '; $_style = '.tooltip-inner { min-width: 350px !important; } .top-cut .tooltip-inner { margin-top: 60px; }'; WR_Megamenu_Init_Assets::inline('css', $_style, true); ?> <div class="jsn-master" id="wr-mm-custom-css-box"> <div class="jsn-bootstrap3"> <!-- CSS files --> <div class="form-group control-group jsn-items-list-container wr-modal-content"> <label for="option-items-itemlist" class="control-label top-cut" ><?php _e('CSS Files', WR_MEGAMENU_TEXTDOMAIN); ?> <i class=" icon-question-sign" data-toggle="tooltip" data-title="<?php _e($_css_files_tooltip, WR_MEGAMENU_TEXTDOMAIN); ?> "></i></label> <div class="controls">
/** * Insert WooRockets banner. * * @return void */ public static function insert_banner() { $style = ' /*** Premium ***/ #wr-promo-ab { background: url(' . WR_MEGAMENU_ROOT_URL . 'assets/woorockets/images/about-us/bg-wr-promo-2.jpg) center top no-repeat; background-size: auto 100%; text-align: center; overflow: hidden; font-family: \'Open Sans\', \'Helvetica Neue\', Helvetica, Arial, sans-serif; } #wr-promo-ab h3 { margin: 180px 0 15px; color: #fff; font-size: 25px; font-weight: bold; } #wr-promo-ab ul { margin: 0 auto 25px auto; padding: 0; list-style: none; color: #6c7885; width: 250px; } #wr-promo-ab li { line-height: 31px; margin: 0 5px 10px; text-align: left; list-style: none; background: none; padding: 0; } #wr-promo-ab li span { background: #6c7886; float: left; border-radius: 50%; -o-border-radius: 50%; -ms-border-radius: 50%; -moz-border-radius: 50%; -webkit-border-radius: 50%; margin: 0 5px 0 0; } #wr-promo-ab li img { margin: 8px; float: left !important; } #wr-promo-ab .btn-premium { margin: 0 0 78px 0; } #wr-promo-ab .btn-premium a { display: inline-block; margin: 0 10px; background: #418858; color: #fff; padding: 10px 5px; border-radius: 3px; -o-border-radius: 3px; -ms-border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; font-size: 11px; box-shadow: 0 4px 0 0 #2a6d40; -o-box-shadow: 0 4px 0 0 #2a6d40; -ms-box-shadow: 0 4px 0 0 #2a6d40; -moz-box-shadow: 0 4px 0 0 #2a6d40; -webkit-box-shadow: 0 4px 0 0 #2a6d40; text-decoration: none; transition: all 0.3s; -o-transition: all 0.3s; -ms-transition: all 0.3s; -moz-transition: all 0.3s; -webkit-transition: all 0.3s; } #wr-promo-ab .btn-premium strong { font-size: 18px; } #wr-promo-ab .btn-premium a:hover { background: #2a6d40; text-decoration:none; box-shadow: 0 4px 0 0 #418858; -o-box-shadow: 0 4px 0 0 #418858; -ms-box-shadow: 0 4px 0 0 #418858; -moz-box-shadow: 0 4px 0 0 #418858; -webkit-box-shadow: 0 4px 0 0 #418858; } @media only screen and (max-width: 1200px) and (min-width: 768px), (max-device-width: 1200px) and (max-device-width: 768px) { #wr-promo-ab .btn-premium a { padding: 10px 0; margin: 0 10px; } #wr-promo-ab .btn-premium strong { font-size:16px; } } '; WR_Megamenu_Init_Assets::inline('css', $style); $content = '<div id=\\"wr-promo-ab\\"><h3>Premium<br> WooCommerce Themes</h3><ul><li><span><img src=\\"' . WR_MEGAMENU_ROOT_URL . 'assets/woorockets/images/about-us/excellent-icon.png\\"></span>Excellent designs</li><li><span><img src=\\"' . WR_MEGAMENU_ROOT_URL . 'assets/woorockets/images/about-us/unlimited-icon.png\\"></span>Unlimited customization ability</li><li><span><img src=\\"' . WR_MEGAMENU_ROOT_URL . 'assets/woorockets/images/about-us/additional-icon.png\\"></span>Additional eCommerce features</li></ul><p class=\\"btn-premium\\"><a href=\\"http://www.woorockets.com/themes/?utm_source=MegaMenu&utm_medium=Editor&utm_campaign=Cross%20Promo%20Banner\\" target=\\"_blank\\"><strong>View the collection now</strong><br><span>And learn how our themes can boost your business!</span></a></p></div>'; $script = ' $("#side-sortables").append("' . $content . '"); '; WR_Megamenu_Init_Assets::inline('js', $script); }