コード例 #1
0
 /**
  * Returns single instance of the class
  *
  * @since 1.0.0
  */
 public static function get_instance()
 {
     if (is_null(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
コード例 #2
0
ファイル: premium.php プロジェクト: namnguyen2312/spa
?>
</h2>
                </div>
                <p><?php 
_e('Tailored options to limit the plugin features only to certain products. Some of these could have too small images to be zoomed, or maybe being part of categories that do not imply zoomed images. Select the products and the categories to exclude and delete all your problems', 'ywzm');
?>
</p>
            </div>
        </div>
    </div>

    <div class="section section-cta section-odd">
        <div class="landing-container">
            <div class="premium-cta">
                <p>
                <?php 
echo sprintf(__('Upgrade to the %1$spremium version%2$s of %1$sYITH WooCommerce Zoom Magnifier%2$s to benefit from all features!', 'ywzm'), '<span class="highlight">', '</span>');
?>
                </p>
                <a href="<?php 
echo YITH_YWZM_Plugin_FW_Loader::get_instance()->get_premium_landing_uri();
?>
" target="_blank" class="premium-cta-button button btn">
                <?php 
echo sprintf(__('%1$sUPGRADE%2$s %3$sto the premium version%2$s', 'ywzm'), '<span class="highlight">', '</span>', '<span>');
?>
                </a>
            </div>
        </div>
    </div>
</div>
コード例 #3
0
ファイル: init.php プロジェクト: simonsays88/costa
function yith_ywzm_init() {

	/**
	 * Required functions
	 */
	if ( ! defined( 'YITH_FUNCTIONS' ) ) {
		require_once( 'yit-common/yit-functions.php' );
	}

	/**
	 * Load text domain and start plugin
	 */
	load_plugin_textdomain( 'yith-woocommerce-zoom-magnifier', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );

	add_option( 'yith_wcmg_slider_direction', apply_filters( 'yith_wcmg_slider_direction', 'left' ) );

	define( 'YITH_WCMG', true );
	define( 'YITH_WCMG_URL', plugin_dir_url( __FILE__ ) );

	// Load required classes and functions
	require_once( 'functions.yith-wcmg.php' );
	require_once( 'class.yith-wcmg-admin.php' );
	require_once( 'class.yith-wcmg-frontend.php' );

	require_once( YITH_YWZM_LIB_DIR . 'class.yith-woocommerce-zoom-magnifier.php' );
	require_once( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-plugin-fw-loader.php' );
	require_once( YITH_YWZM_LIB_DIR . 'class.yith-ywzm-custom-types.php' );

	YITH_YWZM_Plugin_FW_Loader::get_instance();

	// Let's start the game!
	global $yith_wcmg;

	$yith_wcmg = new YITH_WooCommerce_Zoom_Magnifier();
}
コード例 #4
0
ファイル: premium.php プロジェクト: qhuit/dcosta
    </div>
    <div class="section section-even clear" style="background: url(<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>03-bg.png) no-repeat #fff; background-position: 85% 100%">
        <div class="landing-container">
            <div class="col-1">
                <img src="<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>03.png" alt="Vote the review" />
            </div>
            <div class="col-2">
                <div class="section-title">
                    <img src="<?php echo YITH_YWZM_ASSETS_IMAGES_URL ?>03-icon.png" alt="Vote the review" />
                    <h2>EXCLUDE PRODUCTS</h2>
                </div>
                <p>Tailored options to limit the plugin features only to certain products. Some of these could have too small images to be zoomed, or maybe being part of categories that do not imply zoomed images. Select the products and the categories to exclude and delete all your problems.</p>
            </div>
        </div>
    </div>

    <div class="section section-cta section-odd">
        <div class="landing-container">
            <div class="premium-cta">
                <p>
                    Upgrade to the <span class="highlight">premium version</span>
                    of <span class="highlight">YITH WooCommerce Zoom Magnifier</span> to benefit from all features!
                </p>
                <a href="<?php echo YITH_YWZM_Plugin_FW_Loader::get_instance()->get_premium_landing_uri(); ?>" target="_blank" class="premium-cta-button button btn">
                    <span class="highlight">UPGRADE</span>
                    <span>to the premium version</span>
                </a>
            </div>
        </div>
    </div>
</div>
コード例 #5
0
<?php

/**
 * This file belongs to the YIT Plugin Framework.
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
$image_size = array('name' => __('Image size', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('The size of the images used within the magnifier box', 'yith-woocommerce-zoom-magnifier'), 'id' => 'woocommerce_magnifier_image', 'css' => '', 'type' => 'yith_ywzm_image_width', 'default' => array('width' => 600, 'height' => 600, 'crop' => true), 'std' => array('width' => 600, 'height' => 600, 'crop' => true), 'desc_tip' => true);
$general_settings = array(array('name' => __('General Settings', 'yith-woocommerce-zoom-magnifier'), 'type' => 'title', 'desc' => '', 'id' => 'yith_wcmg_general'), array('name' => __('Activate YITH WooCommerce Zoom Magnifier', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('Activate the plugin or use the WooCommerce default product image.', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_enable_plugin', 'std' => 'yes', 'default' => 'yes', 'type' => 'checkbox'), array('name' => __('Activate on mobile device', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('Set if zoom and slider functionalities should be shown also on mobile devices.', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_enable_mobile', 'std' => 'yes', 'default' => 'yes', 'type' => 'checkbox'), array('name' => __('Forced Image Size', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('If disabled, you will able to customize the sizes of the zoomed images. Disable it at your own risk; the magnifier could not properly work with images out of proportion.', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_force_sizes', 'std' => 'yes', 'default' => 'yes', 'type' => 'checkbox'), array('type' => 'sectionend', 'id' => 'yith_wcmg_general_end'));
$magnifier_settings = array(array('name' => __('Magnifier Settings', 'yith-woocommerce-zoom-magnifier'), 'type' => 'title', 'desc' => '', 'id' => 'yith_wcmg_magnifier'), 'zoom_box_width' => array('name' => __('Zoom Box Width', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('The width of the magnifier box (default: auto)', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_zoom_width', 'std' => 'auto', 'default' => 'auto', 'type' => 'text'), array('name' => __('Zoom Box Height', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('The height of the magnifier box (default: auto)', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_zoom_height', 'std' => 'auto', 'default' => 'auto', 'type' => 'text'), $image_size, 'zoom_box_position' => array('name' => __('Zoom Box Position', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('The magnifier position', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_zoom_position', 'std' => 'right', 'default' => 'right', 'type' => 'select', 'options' => array('right' => __('Right', 'yith-woocommerce-zoom-magnifier'), 'inside' => __('Inside', 'yith-woocommerce-zoom-magnifier'))), array('name' => __('Zoom Box Position for mobile devices', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('The magnifier position for the mobile devices (iPhone, Android, etc.)', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_zoom_mobile_position', 'std' => 'default', 'default' => 'inside', 'type' => 'select', 'options' => array('default' => __('Default', 'yith-woocommerce-zoom-magnifier'), 'inside' => __('Inside', 'yith-woocommerce-zoom-magnifier'), 'disable' => __('Disable', 'yith-woocommerce-zoom-magnifier'))), array('name' => __('Loading label', 'yith-woocommerce-zoom-magnifier'), 'desc' => '', 'id' => 'yith_wcmg_loading_label', 'std' => __('Loading...', 'yith-woocommerce-zoom-magnifier'), 'default' => __('Loading...', 'yith-woocommerce-zoom-magnifier'), 'type' => 'text'), array('name' => __('Lens Opacity', 'yith-woocommerce-zoom-magnifier'), 'desc' => '', 'id' => 'yith_wcmg_lens_opacity', 'std' => 0.5, 'default' => 0.5, 'type' => 'slider', 'min' => 0, 'max' => 1, 'step' => 0.1), array('name' => __('Blur', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('Add a blur effect to the small image on mouse hover.', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_softfocus', 'std' => 'no', 'default' => 'no', 'type' => 'checkbox'), array('type' => 'sectionend', 'id' => 'yith_wcmg_magnifier_end'));
$slider_settings = array(array('name' => __('Slider Settings', 'yith-woocommerce-zoom-magnifier'), 'type' => 'title', 'desc' => '', 'id' => 'yith_wcmg_slider'), array('name' => __('Activate Slider', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('Activate Thumbnail Slider.', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_enableslider', 'std' => 'yes', 'default' => 'yes', 'type' => 'checkbox'), array('name' => __('Activate Responsive Slider', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('This option fits the thumbnails within the available space. Disable it if you want to manage freely the thumbnails (eg. add margins, paddings, etc.)', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_slider_responsive', 'std' => 'yes', 'default' => 'yes', 'type' => 'checkbox'), array('name' => __('Items', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('Number of items to show', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_slider_items', 'std' => 3, 'default' => 3, 'type' => 'slider', 'min' => 1, 'max' => 10, 'step' => 1), array('name' => __('Circular carousel', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('It defines whether the carousel should be circular.', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_slider_circular', 'std' => 'yes', 'default' => 'yes', 'type' => 'checkbox'), array('name' => __('Infinite carousel', 'yith-woocommerce-zoom-magnifier'), 'desc' => __('It defines whether the carousel should be infinite. Note: It is possible to create a non-circular, infinite carousel, but it is not possible to create a circular, non-infinite carousel.', 'yith-woocommerce-zoom-magnifier'), 'id' => 'yith_wcmg_slider_infinite', 'std' => 'yes', 'default' => 'yes', 'type' => 'checkbox'), array('type' => 'sectionend', 'id' => 'yith_wcmg_slider_end'));
$general_settings = apply_filters('yith_ywzm_general_settings', $general_settings);
$magnifier_settings = apply_filters('yith_ywzm_magnifier_settings', $magnifier_settings);
$slider_settings = apply_filters('yith_ywzm_slider_settings', $slider_settings);
$options['general'] = array();
if (!defined('YITH_YWZM_PREMIUM')) {
    $intro_tab = array('section_general_settings_videobox' => array('name' => __('Upgrade to the PREMIUM VERSION', 'yith-woocommerce-zoom-magnifier'), 'type' => 'videobox', 'default' => array('plugin_name' => __('YITH WooCommerce Zoom Magnifier', 'yith-woocommerce-zoom-magnifier'), 'title_first_column' => __('Discover The Advanced Features', 'yith-woocommerce-zoom-magnifier'), 'description_first_column' => __('Upgrade to the PREMIUM VERSION of YITH WOOCOMMERCE ZOOM MAGNIFIER to benefit from all features!', 'yith-woocommerce-zoom-magnifier'), 'video' => array('video_id' => '122436840', 'video_image_url' => YITH_YWZM_ASSETS_IMAGES_URL . 'yith-woocommerce-zoom-magnifier-video.jpg', 'video_description' => __('See YITH WooCommerce Zoom Magnifier plugin with full premium features in action', 'yith-woocommerce-zoom-magnifier')), 'title_second_column' => __('Get Support and Pro Features', 'yith-woocommerce-zoom-magnifier'), 'description_second_column' => __('Purchasing the premium version of the plugin, you will take advantage of the advanced features of the product, and you will get one year of free updates and support through our platform available 24h/24.', 'yith-woocommerce-zoom-magnifier'), 'button' => array('href' => YITH_YWZM_Plugin_FW_Loader::get_instance()->get_premium_landing_uri(), 'title' => 'Get Support and Pro Features')), 'id' => 'yith_wcas_general_videobox'));
    $options['general'] = $intro_tab;
}
$options['general'] = array_merge($options['general'], $general_settings, $magnifier_settings, $slider_settings);
return apply_filters('yith_wcmg_tab_options', $options);