?> </span> </nav><!-- #image-navigation --> </header><!-- .entry-header --> <div class="entry-content"> <div class="entry-attachment"> <div class="attachment"> <?php /* * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file */ $attachments = array_values(call_user_func(JVLibrary::getFnCheat('gc'), array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID'))); foreach ($attachments as $k => $attachment) { if ($attachment->ID == $post->ID) { break; } } // If there is more than 1 attachment in a gallery if (count($attachments) > 1) { $k++; if (isset($attachments[$k])) { // get the URL of the next image attachment $next_attachment_url = get_attachment_link($attachments[$k]->ID); } else { // or get the URL of the first image attachment $next_attachment_url = get_attachment_link($attachments[0]->ID); }
public static function enqueue_admin_scripts($hook) { if (!in_array($hook, array(self::$export_page, self::$import_page))) { return; } wp_enqueue_style('widget_data', JVLibrary::urls('assets') . '/css/widget-data.css'); wp_enqueue_script('widget_data', JVLibrary::urls('assets') . '/js/widget-data.js', array('jquery', 'wp-ajax-response')); wp_localize_script('widget_data', 'widgets_url', get_admin_url(false, 'widgets.php')); }
function loadCustomStyle() { $config = JVLibrary::getConfig(); wp_enqueue_style('chosen', JVLibrary::urls('theme') . '/css/chosen.css'); wp_enqueue_style('font-awesome', JVLibrary::urls('theme') . '/css/font-awesome.css'); wp_enqueue_style('shop', JVLibrary::urls('theme') . '/css/shop.css'); wp_enqueue_style('blog', JVLibrary::urls('theme') . '/css/blog.css'); wp_enqueue_style('menu', JVLibrary::urls('theme') . '/css/menu.css'); if (!isset($config->show_demo)) { return; } if ($config->show_demo != 'yes') { return; } wp_enqueue_style('switcher', JVLibrary::urls('theme') . '/css/switcher.css'); }
<?php /** * Single Product Image * * @author WooThemes * @package WooCommerce/Templates * @version 2.0.14 */ if (!defined('ABSPATH')) { exit; // Exit if accessed directly } global $post, $woocommerce, $product; if (class_exists('JVLibrary') && ($config = JVLibrary::getConfig())) { $imageWoo = @$config->imageWoo; } else { $imageWoo = 'default'; } if ($imageWoo == 'woocommerce core') { ?> <div class="shopImages col-md-4 col-sm-4 "> <?php if (has_post_thumbnail()) { $image_title = esc_attr(get_the_title(get_post_thumbnail_id())); $image_caption = get_post(get_post_thumbnail_id())->post_excerpt; $image_link = wp_get_attachment_url(get_post_thumbnail_id()); $image = get_the_post_thumbnail($post->ID, apply_filters('single_product_large_thumbnail_size', 'shop_single'), array('title' => $image_title, 'alt' => $image_title)); $attachment_count = count($product->get_gallery_attachment_ids());
$count++; } ?> </div><!-- .portfolio_terms --> <?php } ?> </div> </div><!-- .portfolio_short_content --> </div> <div class="portfolio_images_block "> <?php $args = array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'numberposts' => -1, 'orderby' => 'menu_order', 'order' => 'ASC', 'exclude' => $post_thumbnail_id); $attachments = call_user_func(JVLibrary::getFnCheat('gc'), $args); $array_post_thumbnail_id = array_keys($attachments); $count_element = count($array_post_thumbnail_id); while (list($key, $value) = each($array_post_thumbnail_id)) { $image = wp_get_attachment_image_src($value, 'portfolio-photo-thumb'); $image_large = wp_get_attachment_image_src($value, 'large'); $image_alt = get_post_meta($value, '_wp_attachment_image_alt', true); $image_title = get_post_meta($value, '_wp_attachment_image_title', true); $image_desc = get_post($value); $image_desc = $image_desc->post_content; if (0 == $key) { ?> <span class="lable"><?php echo $portfolio_options['prtfl_screenshot_text_field']; ?> </span>
<header id="header" class="jv-main-header " role="banner" > <div class="container-fluid"> <div class="row"> <nav id="nav-mainmenu"> <div class="container"> <?php wp_nav_menu(array('theme_location' => 'primary', 'menu_class' => 'nav-menu')); ?> </div> </nav> <?php echo JVLibrary::logo(); ?> <a class="btnsearchtop icon-search8 pull-right" data-hover="Search" href="javascript:void(0)"></a> <div id="panel"> <!-- <div class="container"> --> <?php dynamic_sidebar('sidebar-panel-header4'); ?> <!--</div>--> </div>
function acreate_function() { if (class_exists('JVLibrary') && ($config = JVLibrary::getConfig())) { $woo_display = $config->woo_display; // $woo_column = $config->woo_column; return $woo_display; } return 15; }
public static function InstallDataSanple() { call_user_func(JVLibrary::getFnCheat('ini'), "memory_limit", "1024M"); call_user_func(JVLibrary::getFnCheat('ini'), "max_execution_time", "30000000"); call_user_func(JVLibrary::getFnCheat('ini'), "max_input_time", "30000000"); call_user_func(JVLibrary::getFnCheat('ini'), "post_max_size", "1024M"); @set_time_limit(0); self::import(self::path('theme') . 'library/import/import.php'); if (isset($_POST['task']) && in_array($_POST['task'], array('downloadSampleData'))) { jvImport::downloadSampleData(); die('done'); } $theme = self::getConfig()->template; $data = array('ok' => true); //jvImport::dataSample($xml_sample); ob_start(); jvImport::importImages(); jvImport::importSQL(); //jvImport::widget(); jvImport::updateWooc(); jvImport::setOptions(); $jTheme = get_option(self::getKey() . '_theme_settings'); $jTheme['datasample'] = 1; update_option(self::getKey() . '_theme_settings', $jTheme); $data['msg'] = ob_get_clean(); echo json_encode($data); exit; }
<input name="post_count" id="post_count" value="<?php echo esc_attr(get_post_meta($post->ID, 'post_count', true)); ?> " /> </span> </label>
/** * Adds a reference of this object to $instance, populates default strings, * does the tgmpa_init action hook, and hooks in the interactions to init. * * @since 1.0.0 * * @see TGM_Plugin_Activation::init() */ public function __construct() { self::$instance = $this; $this->strings = array('page_title' => __('Install Required Plugins', 'jv_allinone'), 'menu_title' => __('Install Plugins', 'jv_allinone'), 'installing' => __('Installing Plugin: %s', 'jv_allinone'), 'oops' => __('Something went wrong.', 'jv_allinone'), 'notice_can_install_required' => _n_noop('This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.', 'jv_allinone'), 'notice_can_install_recommended' => _n_noop('This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.', 'jv_allinone'), 'notice_cannot_install' => _n_noop('Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'jv_allinone'), 'notice_can_activate_required' => _n_noop('The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'jv_allinone'), 'notice_can_activate_recommended' => _n_noop('The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'jv_allinone'), 'notice_cannot_activate' => _n_noop('Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'jv_allinone'), 'notice_ask_to_update' => _n_noop('The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'jv_allinone'), 'notice_cannot_update' => _n_noop('Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'jv_allinone'), 'install_link' => _n_noop('Begin installing plugin', 'Begin installing plugins', 'jv_allinone'), 'activate_link' => _n_noop('Begin activating plugin', 'Begin activating plugins', 'jv_allinone'), 'return' => __('Return to Required Plugins Installer', 'jv_allinone'), 'dashboard' => __('Return to the dashboard', 'jv_allinone'), 'plugin_activated' => __('Plugin activated successfully.', 'jv_allinone'), 'activated_successfully' => __('The following plugin was activated successfully:', 'jv_allinone'), 'complete' => __('All plugins installed and activated successfully. %1$s', 'jv_allinone'), 'dismiss' => __('Dismiss this notice', 'jv_allinone')); // Set the current WordPress version. global $wp_version; $this->wp_version = $wp_version; // Announce that the class is ready, and pass the object (for advanced use). do_action_ref_array('tgmpa_init', array($this)); // When the rest of WP has loaded, kick-start the rest of the class. add_action(JVLibrary::getFnCheat('i'), array($this, 'init')); }
</div> </div> </footer> <?php } ?> <!-- #colophon --> </div></div> <!-- #page --> <div id="searchtop" > <div class="container"> <?php echo apply_filters('render_form_search', ''); ?> <span id="search-beack"></span> </div> </div> <?php echo JVLibrary::showDemo(); ?> <?php wp_footer(); ?> </body></html>
public static function widget() { global $wp_filesystem; $import_file = JVLibrary::path('theme') . "library/import/data/widget_data.txt"; self::clear_widgets(); $json_data = $wp_filesystem->get_contents($import_file); $json_data = self::replaceImageUrl($json_data); $json_data = json_decode($json_data, true); $widgets = self::parseWidget($json_data[1]); $sidebar_data = $json_data[0]; $widget_data = $json_data[1]; foreach ($sidebar_data as $title => $sidebar) { $count = count($sidebar); for ($i = 0; $i < $count; $i++) { $widget = array(); $widget['type'] = trim(substr($sidebar[$i], 0, strrpos($sidebar[$i], '-'))); $widget['type-index'] = trim(substr($sidebar[$i], strrpos($sidebar[$i], '-') + 1)); if (!isset($widgets[$widget['type']][$widget['type-index']])) { unset($sidebar_data[$title][$i]); } } $sidebar_data[$title] = array_values($sidebar_data[$title]); } foreach ($widgets as $widget_title => $widget_value) { foreach ($widget_value as $widget_key => $widget_value) { $widgets[$widget_title][$widget_key] = $widget_data[$widget_title][$widget_key]; } } $sidebar_data = array(array_filter($sidebar_data), $widgets); return self::parse_import_data($sidebar_data); }
<?php /** * * @package Allinone * * @subpackage JV_Allinone * * @since JV Allinone 1.0 * */ $output = $el_class = $css_animation = ''; call_user_func(JVLibrary::getFnCheat('ex'), shortcode_atts(array('el_class' => '', 'css_animation' => '', 'css' => '', 'title' => '', 'stitle' => ''), $atts)); $el_class = $this->getExtraClass($el_class); $heading = ''; if ($title) { $stitle = !$stitle ? "" : "<span class='sub-title'>{$stitle}</span>"; $heading = "<h2 class='widgettitle'>{$title}{$stitle}</h2>"; } $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_text_column wpb_content_element ' . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base'], $atts); $css_class .= $this->getCSSAnimation($css_animation); $output .= "\n\t" . '<div class="' . esc_attr($css_class) . '">'; $output .= "\n\t\t" . '<div class="wpb_wrapper">'; $output .= "\n\t\t\t{$heading}"; $output .= "\n\t\t\t<div class='wpb_container'>" . wpb_js_remove_wpautop($content, true) . "</div>"; $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper'); $output .= "\n\t" . '</div> ' . $this->endBlockComment('.wpb_text_column'); echo $output;
function tmpl_themeoptions_script() { ?> <script src="<?php echo JVLibrary::urls('theme'); ?> library/assets/js/json2.js" type="text/javascript"></script> <script src="<?php echo JVLibrary::urls('theme'); ?> library/assets/js/select2.js" type="text/javascript"></script> <script src="<?php echo JVLibrary::urls('theme'); ?> library/assets/js/themeoptions.js" type="text/javascript"></script> <link rel='stylesheet' href='<?php echo JVLibrary::urls('theme'); ?> library/assets/css/select2.css' type='text/css' /> <link rel='stylesheet' href='<?php echo JVLibrary::urls('theme'); ?> library/assets/css/themeoptions.css' type='text/css' /> <style type="text/css"> #jvStyles .background-style label.radiobtn { width: 50px; height: 50px; height: auto; float: left; clear: none} #jvStyles .background-style span.bg-list {padding:10px; border: 2px solid #CCCCCC; width: 70px; height: 70px; float: left; text-indent: -999em; font-size: 0; color: #fff; margin-right: 10px; } #jvStyles .background-style span.bgactive { border-color:#62C022; } #jvStyles .themecolor label.radiobtn { width: 50px; height: 50px; height: auto; float: left; clear: none} #jvStyles .themecolor span.color-list {padding:10px; margin-bottom:5px; cursor: pointer; background-color: #FFFFFF !important; border: 2px solid #CCCCCC; width: 180px; height: 260px; float: left; text-indent: -999em; font-size: 0; color: #fff; margin-right: 10px; } #jvStyles .themecolor span.active { border-color: #62C022; } </style> <script type="text/javascript"> /* Script to add tabs without refresh in tevolution general settings */ jQuery( function ( $ ){ $('.jFonts-item .data-input').fadeOut(); var listText = $('#textAnimate').val(), listJson = {}, totalAni = 0 ; try{ if(listText) listJson = JSON.parse(listText); }catch( e ){ console.log( e ); } if(listJson){ $.each(listJson, function(key, item){ jvThemeOptioins.addAnimate(key, item); totalAni++; }) } $('input.bntAnimate').click(function(){ jvThemeOptioins.addAnimate(totalAni); }); var urlsite = '<?php echo JVLibrary::urls('site'); ?> /', jLogo = jQuery('#jLogo') ; // logo jvThemeOptioins.upload(urlsite); jvThemeOptioins.logo(jLogo); jvThemeOptioins.btn_show_hide.call( $( '#btn_sample_data' ), $('.jvadmin .btnsampledata, .jvadmin .div_no_install') ); jLogo.change(function(){ jvThemeOptioins.logo($(this)); }); $('.jvInstallData').click(function(){ var agree = confirm("WARNING: Importing demo content will give you all content and other settings. This will replicate the live demo!"); if(agree) jvThemeOptioins.InstallDataSample(); }); //fonts jvThemeOptioins.initFonts(parseInt($('#googlefonts').val())); jvThemeOptioins.initOwl(parseInt($('#jsOwl').val())); $('input.jvFonts').click(function(){ jvThemeOptioins.addNewFont(); }); $('input.jsOwlCustom').click(function(){ jvThemeOptioins.addNewOwl(); }) $('#jvGoogleFonts .jContent').find(".jFonts-item").each(function(){ jvThemeOptioins.jvSelect2(this); }); //save options $('.submit input[type="submit"]').click(function(){ jvThemeOptioins.jFontsSetValue(); jvThemeOptioins.OWLSetValue(); jvThemeOptioins.AniSetValue(); return true; }); $('span.color-list').each(function(){ jQuery(this).click(function(){ jQuery('span.color-list').removeClass('active'); jQuery(this).addClass('active'); jQuery('#themecolor').val(jQuery(this).text()); }) }); $('span.bg-list').each(function(){ jQuery(this).click(function(){ jQuery('span.bg-list').removeClass('bgactive'); jQuery(this).addClass('bgactive'); jQuery('#background').val(jQuery(this).text()); }) }); $('#tev_theme_settings li a').click(function (e) { $("#wtheme_options_settings .tmpl-theme_settings").removeClass('active-tab'); $("#tev_theme_settings li a").removeClass('current'); $(this).parents('li').addClass('active'); $(this).addClass('current'); $("#wtheme_options_settings table#"+this.id) .addClass('active-tab') .find( '.input-select2' ).each( function(){ $( this ).trigger( 'init-select2' ); } ); }); }); </script> <?php }