예제 #1
0
 public static function init()
 {
     static $inited = false;
     if (!$inited) {
         N2Pluggable::addAction('afterApplicationContent', 'N2BackgroundAnimationManager::load');
         $inited = true;
     }
 }
예제 #2
0
파일: browse.php 프로젝트: MBerguer/wp-demo
 public static function init()
 {
     static $inited = false;
     if (!$inited) {
         N2Pluggable::addAction('afterApplicationContent', 'N2Browse::load');
         $inited = true;
     }
 }
예제 #3
0
 public static function init()
 {
     static $inited = false;
     if (!$inited) {
         self::$model = new N2StorageImage();
         N2Pluggable::addAction('afterApplicationContent', 'N2ImageManager::load');
         $inited = true;
     }
 }
예제 #4
0
 public static function init()
 {
     N2Pluggable::addAction('fontStorage', 'N2SmartSliderStorage::fontStorage');
     N2Pluggable::addAction('styleStorage', 'N2SmartSliderStorage::styleStorage');
     N2Pluggable::addAction('animationStorage', 'N2SmartSliderStorage::animationStorage');
     N2Pluggable::addAction('splitTextAnimationStorage', 'N2SmartSliderStorage::splitTextAnimationStorage');
     N2Pluggable::addAction('backgroundAnimationStorage', 'N2SmartSliderStorage::backgroundAnimationStorage');
     N2Pluggable::addAction('postBackgroundAnimationStorage', 'N2SmartSliderStorage::postBackgroundAnimationStorage');
     N2Pluggable::addAction('layoutStorage', 'N2SmartSliderStorage::layoutStorage');
 }
예제 #5
0
파일: google.php 프로젝트: MBerguer/wp-demo
 function onFontManagerLoad($force = false)
 {
     static $loaded;
     if (!$loaded || $force) {
         $loaded = true;
         $settings = N2Fonts::loadSettings();
         $parameters = $settings['plugins'];
         $parameters->fillDefault(self::getDefaults());
         if ($parameters->get('google-enabled', 1)) {
             N2GoogleFonts::$enabled = 1;
             for ($i = 100; $i < 1000; $i += 100) {
                 $this->addStyle($parameters, $i);
                 $this->addStyle($parameters, $i . 'italic');
             }
             if (empty(self::$styles)) {
                 self::$styles[] = '400';
             }
             $this->addSubset($parameters, 'latin');
             $this->addSubset($parameters, 'latin-ext');
             $this->addSubset($parameters, 'greek');
             $this->addSubset($parameters, 'greek-ext');
             $this->addSubset($parameters, 'cyrillic');
             $this->addSubset($parameters, 'devanagari');
             $this->addSubset($parameters, 'arabic');
             $this->addSubset($parameters, 'khmer');
             $this->addSubset($parameters, 'telugu');
             $this->addSubset($parameters, 'vietnamese');
             if (empty(self::$subsets)) {
                 self::$subsets[] = 'latin';
             }
             foreach (self::$subsets as $subset) {
                 N2GoogleFonts::addSubset($subset);
             }
             N2Pluggable::addAction('fontFamily', array($this, 'onFontFamily'));
         }
     }
 }
예제 #6
0
파일: base.php 프로젝트: vicpril/rep_bidqa
 public function __construct()
 {
     N2Loader::addPath($this->getName(), $this->getPath());
     $platformPath = N2Filesystem::realpath($this->getPath() . '/../' . N2Platform::getPlatform());
     if ($platformPath) {
         N2Loader::addPath($this->getName() . '.platform', $platformPath);
     }
     $this->loadLocale();
     $filterClass = 'N2' . ucfirst($this->getName()) . 'ApplicationInfoFilter';
     N2Loader::import($filterClass, $this->getName() . '.platform');
     $callable = $filterClass . '::filter';
     if (is_callable($callable)) {
         call_user_func($filterClass . '::filter', $this);
     }
     if (N2Base::$isReady) {
         $this->onNextendBaseReady();
     } else {
         N2Pluggable::addAction('nextendBaseReady', array($this, 'onNextendBaseReady'));
     }
 }
예제 #7
0
 public static function init()
 {
     N2Pluggable::addAction('smartsliderbackgroundanimationset', 'N2SmartSliderBackgroundAnimationStorage::animationSet');
     N2Pluggable::addAction('smartsliderbackgroundanimation', 'N2SmartSliderBackgroundAnimationStorage::animations');
     N2Pluggable::addAction('backgroundanimation', 'N2SmartSliderBackgroundAnimationStorage::animation');
 }
예제 #8
0
 public static function init()
 {
     N2Pluggable::addAction('systemstyleset', 'N2StyleStorage::styleSet');
     N2Pluggable::addAction('systemstyle', 'N2StyleStorage::styles');
     N2Pluggable::addAction('style', 'N2StyleStorage::style');
 }
예제 #9
0
        self::initDefaultFont();
        self::initDefaultStyle();
        return array('content' => n2_('MORE'), 'nowrap' => 1, 'fullwidth' => 0, 'link' => '#|*|_self', 'font' => self::$font, 'style' => self::$style, 'class' => '');
    }
    function getPath()
    {
        return dirname(__FILE__) . DIRECTORY_SEPARATOR . $this->_identifier . DIRECTORY_SEPARATOR;
    }
    public function getFilled($slide, $data)
    {
        $data->set('content', $slide->fill($data->get('content', '')));
        $data->set('link', $slide->fill($data->get('link', '#|*|')));
        return $data;
    }
    public function prepareExport($export, $data)
    {
        $export->addVisual($data->get('font'));
        $export->addVisual($data->get('style'));
        $export->addLightbox($data->get('link'));
    }
    public function prepareImport($import, $data)
    {
        $data->set('font', $import->fixSection($data->get('font')));
        $data->set('style', $import->fixSection($data->get('style')));
        $data->set('link', $import->fixLightbox($data->get('link')));
        return $data;
    }
}
N2Plugin::addPlugin('ssitem', 'N2SSPluginItemButton');
N2Pluggable::addAction('smartsliderDefault', 'N2SSPluginItemButton::onSmartsliderDefaultSettings');
예제 #10
0
 public static function init()
 {
     N2Pluggable::addAction('systemanimationset', 'N2AnimationsStorage::animationSet');
     N2Pluggable::addAction('systemanimation', 'N2AnimationsStorage::animations');
     N2Pluggable::addAction('animation', 'N2AnimationsStorage::animation');
 }
예제 #11
0
 public static function init()
 {
     N2Pluggable::addAction('smartsliderlayoutset', 'N2SmartSliderLayoutStorage::visualSet');
     N2Pluggable::addAction('smartsliderlayout', 'N2SmartSliderLayoutStorage::visuals');
     N2Pluggable::addAction('layout', 'N2SmartSliderLayoutStorage::visual');
 }
예제 #12
0
 public static function init()
 {
     N2Pluggable::addAction('systemfontset', 'N2FontStorage::fontSet');
     N2Pluggable::addAction('systemfont', 'N2FontStorage::fonts');
     N2Pluggable::addAction('font', 'N2FontStorage::font');
 }
예제 #13
0
            self::$success = array();
        }
        self::loadSessionNotice();
        if (is_array(self::$notice) && count(self::$notice)) {
            $messages['notice'] = array();
            foreach (self::$notice as $notice) {
                $messages['notice'][] = $notice;
            }
            self::$notice = array();
        }
        self::$flushed = true;
        if (count($messages)) {
            return $messages;
        }
        return false;
    }
    public static function storeInSession()
    {
        if (self::$flushed) {
            N2Session::delete('error');
            N2Session::delete('success');
            N2Session::delete('notice');
        } else {
            N2Session::set('error', self::$error);
            N2Session::set('success', self::$success);
            N2Session::set('notice', self::$notice);
        }
    }
}
N2Pluggable::addAction('beforeSessionSave', 'N2Message::storeInSession');
예제 #14
0
 /**
  * Register our method for PHP shut down
  */
 protected function register()
 {
     N2Pluggable::addAction('exit', array($this, 'shutdown'));
 }
예제 #15
0
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die('Restricted access');
if (!defined("N2_PLATFORM_LIBRARY")) {
    define('N2_PLATFORM_LIBRARY', dirname(__FILE__));
}
define('N2WORDPRESS', 0);
define('N2JOOMLA', 1);
define('N2MAGENTO', 0);
define('N2NATIVE', 0);
if (!defined('N2PRO')) {
    define('N2PRO', 0);
}
if (!defined('JPATH_NEXTEND_IMAGES')) {
    define('JPATH_NEXTEND_IMAGES', '/' . trim(JComponentHelper::getParams('com_media')->get('image_path', 'images'), "/"));
}
require_once N2_PLATFORM_LIBRARY . '/../library/library.php';
N2Base::registerApplication(N2_PLATFORM_LIBRARY . '/../library/applications/system/N2SystemApplicationInfo.php');
function N2JoomlaExit()
{
    if (N2Platform::$isAdmin) {
        $lifetime = JFactory::getConfig()->get('lifetime');
        if (empty($lifetime)) {
            $lifetime = 60;
        }
        $lifetime = min(max(intval($lifetime) - 1, 9), 60 * 24);
        N2JS::addInline('setInterval(function(){$.ajax({url: "' . JURI::current() . '", cache: false});}, ' . $lifetime * 60 * 1000 . ');');
    }
}
N2Pluggable::addAction('exit', 'N2JoomlaExit');
예제 #16
0
  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 (!class_exists('N2_SMARTSLIDER_3')) {
    define('N2PRO', 0);
    define('N2SSPRO', 0);
    define('N2GSAP', 0);
    define('NEXTEND_SMARTSLIDER_3__FILE__', __FILE__);
    define('NEXTEND_SMARTSLIDER_3', dirname(__FILE__) . DIRECTORY_SEPARATOR);
    define('NEXTEND_SMARTSLIDER_3_URL_PATH', 'smart-slider-3');
    require_once dirname(NEXTEND_SMARTSLIDER_3__FILE__) . DIRECTORY_SEPARATOR . 'includes/smartslider3.php';
    add_action('activated_plugin', 'N2_SMARTSLIDER_3_DEACTIVATE_ON_PRO');
    function N2_SMARTSLIDER_3_DEACTIVATE_ON_PRO($plugin)
    {
        if (strstr($plugin, 'nextend-smart-slider3-pro.php') !== false) {
            deactivate_plugins(__FILE__);
        }
    }
    add_filter("plugin_action_links_" . plugin_basename(__FILE__), 'N2_SMARTSLIDER_3_UPGRADE_TO_PRO');
    function N2_SMARTSLIDER_3_UPGRADE_TO_PRO($links)
    {
        if (function_exists('is_plugin_active') && !is_plugin_active('ml-slider-pro/ml-slider-pro.php')) {
            $links[] = '<a href="' . N2SS3::getProUrlPricing() . '" target="_blank">' . "Go Pro" . '</a>';
        }
        return $links;
    }
    N2Pluggable::addAction('animationFramework', 'N2AssetsPredefined::custom_animation_framework');
}