function __construct() { self::$instance = $this; // To use this, define the THEME_ASSETS_VERSION constant in the wp-config.php (or wherever you want) $this->ver = defined('THEME_ASSETS_VERSION') ? THEME_ASSETS_VERSION : false; add_action('customize_register', array($this, 'register_settings')); add_action('customize_preview_init', array($this, 'live_preview')); }
<?php // get the custom layout $class = Skrollr_Customize_Layout::get_instance()->get_layout_classes(); $main_title_class = Skrollr_Title::get_instance()->get_layout_classes(); // translators: Anchor for top of the page, this string will appear in a URL $top_anchor = _x('top', 'anchor', 'skrollr'); ?> <header id="<?php echo $top_anchor; ?> " class="block block-0 row"> <h1 class="<?php echo esc_attr($main_title_class); ?> " data-top="opacity:1;transform:scale(1);display:<?php if (display_header_text()) { ?> block<?php } else { ?> none<?php } ?> " data-top-bottom="opacity:0;transform:scale(2);display:none" data-anchor-target="#<?php echo $top_anchor; ?> "> <span class="slabtext"><?php bloginfo('name'); ?>