__('Prebuilt Slide Layouts', 'vantage'), 'replace' => __('Are you sure you want to replace your current slide content with this prebuilt layout?', 'vantage') ) ); // Check if this theme has a metaslider editor style if(file_exists(get_template_directory().'/slider/metaslider-editor-style.css')) { wp_enqueue_style('siteorigin-metaslider-editor-style', get_template_directory_uri().'/slider/metaslider-editor-style.css', array(), SITEORIGIN_THEME_VERSION); } } add_action('metaslider_register_admin_scripts', 'siteorigin_metaslider_register_admin_scripts'); /** * */ function siteorigin_metaslider_prebuilt_window(){ if(isset($_GET['page']) && $_GET['page'] == 'metaslider') { $layouts = siteorigin_metaslider_prebuilt_layouts(); ?>
x

__('None', 'vantage') ); if($has_demo) $options['demo'] = __('Demo Slider', 'vantage'); if(class_exists('MetaSliderPlugin')){ $sliders = get_posts(array( 'post_type' => 'ml-slider', 'numberposts' => 200, )); foreach($sliders as $slider) { $options['meta:'.$slider->ID] = __('Slider: ', 'vantage').$slider->post_title; } } return $options; } function siteorigin_metaslider_install_link(){ if(function_exists('siteorigin_plugin_activation_install_url')) { return siteorigin_plugin_activation_install_url('ml-slider', 'MetaSlider'); } else { return 'http://downloads.wordpress.org/plugin/ml-slider.zip'; } } function siteorigin_metaslider_affiliate(){ return 'https://getdpd.com/cart/hoplink/15318?referrer=2h2i49ktlxic4s4osog'; } add_filter('metaslider_hoplink', 'siteorigin_metaslider_affiliate'); /** * Create the HTML for a slider layer. * * @param $content * @param $position * @param $size * @param $animate_in * @param $animate_out */ function siteorigin_metaslider_layer($content, $layer_style, $position, $size, $animate_in = array(), $animate_out = array()){ ob_start(); // The layer HTML $style = array( 'position: absolute', 'width: '.$size['width'].'px', 'height: '.$size['height'].'px', ); $data_position = array(); foreach(array('top', 'left', 'right', 'bottom') as $p) { if(isset($position[$p])) { $style[] = $p.': '.$position[$p].'px'; $data_position[] = 'data-'.$p.'="'.$position[$p].'"'; } } if(isset($animate_in['delay'])) { $animate_in_delay_style = 'animation-delay: ' . ($animate_in['delay'] * 1000) . 'ms'; $animate_in_delay_style = "$animate_in_delay_style; -webkit-$animate_in_delay_style; -moz-$animate_in_delay_style;"; } if(isset($animate_out['delay'])) { $animate_out_delay_style = 'animation-delay: ' . ($animate_out['delay'] * 1000) . 'ms'; $animate_out_delay_style = "$animate_out_delay_style; -webkit-$animate_out_delay_style; -moz-$animate_out_delay_style;"; } ?>
>