/** * Constructor * * @return mixed YITH_INFS_Admin | YITH_INFS_Frontend * @since 1.0.0 */ public function __construct() { // Load Plugin Framework add_action('after_setup_theme', array($this, 'plugin_fw_loader'), 1); // Class admin if (is_admin()) { YITH_INFS_Admin(); } // Frontend class YITH_INFS_Frontend(); }
/** * Pass options to script * * @since 1.0.0 * @access public * @return void * @author Francesco Licandro <*****@*****.**> */ public function options_to_script() { // get options $navSelector = !YITH_INFS_Admin()->get_option('yith-infs-navselector') ? 'nav.navigation' : YITH_INFS_Admin()->get_option('yith-infs-navselector'); $nextSelector = !YITH_INFS_Admin()->get_option('yith-infs-nextselector') ? 'nav.navigation a.next' : YITH_INFS_Admin()->get_option('yith-infs-nextselector'); $itemSelector = !YITH_INFS_Admin()->get_option('yith-infs-itemselector') ? 'article.post' : YITH_INFS_Admin()->get_option('yith-infs-itemselector'); $contentSelector = !YITH_INFS_Admin()->get_option('yith-infs-contentselector') ? '#main' : YITH_INFS_Admin()->get_option('yith-infs-contentselector'); $loader = !YITH_INFS_Admin()->get_option('yith-infs-loader-image') ? YITH_INFS_ASSETS_URL . '/images/loader.gif' : YITH_INFS_Admin()->get_option('yith-infs-loader-image'); wp_localize_script('yith-infs', 'yith_infs', array('navSelector' => $navSelector, 'nextSelector' => $nextSelector, 'itemSelector' => $itemSelector, 'contentSelector' => $contentSelector, 'loader' => $loader, 'shop' => function_exists('WC') && (is_shop() || is_product_category() || is_product_tag()))); }
<?php /* Copyright 2013 Your Inspiration Themes (email : plugins@yithemes.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ if (!defined('YITH_INFS')) { exit; } // Exit if accessed directly return array('name' => __('Upgrade to the PREMIUM VERSION', 'yith-infs'), 'type' => 'videobox', 'default' => array('plugin_name' => __('YITH Infinite Scrolling', 'yith-infs'), 'title_first_column' => __('Discover the Advanced Features', 'yith-infs'), 'description_first_column' => __('Upgrade to the PREMIUM VERSION of YITH Infinite Scrolling to benefit from all features!', 'yith-infs'), 'video' => array('video_id' => '122518813', 'video_image_url' => YITH_INFS_ASSETS_URL . '/images/video-yith-infinite-scrolling.jpg', 'video_description' => __('YITH Infinite Scrolling', 'yith-infs')), 'title_second_column' => __('Get Support and Pro Features', 'yith-infs'), 'description_second_column' => __('By 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-infs'), 'button' => array('href' => YITH_INFS_Admin()->get_premium_landing_uri(), 'title' => 'Get Support and Pro Features')), 'id' => 'yith_infs_general_videobox');