siteorigin_setting( 'premium_order_number' ), 'action' => 'validate_order_number', ), SITEORIGIN_THEME_ENDPOINT . '/premium/' . $theme . '/' ) ); $valid = null; if ( !is_wp_error( $result ) ) { $validation_result = unserialize( $result['body'] ); $valid = isset( $validation_result['valid'] ) ? $validation_result['valid'] : null; if ( $valid ) { // Trigger a refresh of the theme update information set_site_transient( 'update_themes', null ); } else { // Clear the order number if it is not valid siteorigin_settings_set('premium_order_number', ''); } } ?>
id) ) $teaser_required = true; if( siteorigin_premium_teaser_get_support('page', $prefix) || $prefix == 'appearance_page_theme_settings_page') $teaser_required = true; if($teaser_required){ wp_enqueue_style( 'siteorigin-premium-teaser', get_template_directory_uri() . '/extras/premium/css/premium-teaser.css', array(), SITEORIGIN_THEME_VERSION ); wp_enqueue_script( 'siteorigin-premium-teaser', get_template_directory_uri() . '/extras/premium/js/premium-teaser' . $js_suffix . '.js', array( 'jquery' ), SITEORIGIN_THEME_VERSION ); } // Enqueue the page templates teaser, which works slightly differently if( siteorigin_premium_teaser_get_support('page-templates') ){ wp_enqueue_script( 'siteorigin-premium-teaser-templates', get_template_directory_uri() . '/extras/premium/js/premium-teaser-templates' . $js_suffix . '.js', array( 'jquery' ), SITEORIGIN_THEME_VERSION ); wp_localize_script( 'siteorigin-premium-teaser-templates', 'siteoriginTeaserTemplates' , array( 'code' => ''.siteorigin_premium_teaser( __('Get Additional Templates', 'vantage'), array( 'description' => sprintf(__('%s Premium includes additional templates', 'vantage'), ucfirst(get_option('stylesheet'))) ), true ).'
' ) ); } } add_action( 'admin_enqueue_scripts', 'siteorigin_premium_admin_enqueue' ); /** * Adds one or more post types to the list that are requesting the premium teaser scripts. * * @param $post_types */ function siteorigin_premium_teaser_post_types( $post_types ) { $post_types = (array)$post_types; if ( empty( $GLOBALS[ 'siteorigin_premium_teaser_post_types' ] ) ) $GLOBALS[ 'siteorigin_premium_teaser_post_types' ] = array(); $GLOBALS[ 'siteorigin_premium_teaser_post_types' ] = array_merge( $GLOBALS[ 'siteorigin_premium_teaser_post_types' ], $post_types ); } function siteorigin_premium_call_function($callback, $param_array, $args = array()){ if(function_exists($callback) && defined('SITEORIGIN_IS_PREMIUM')){ call_user_func_array($callback, $param_array); } else{ $theme = basename( get_template_directory() ); if(!empty($args['before'])) echo $args['before']; ?> %s - Upgrade Now', 'vantage' ), apply_filters('siteorigin_premium_theme_name', ucfirst($theme) . ' ' . __( 'Premium', 'vantage' ) ) ) ?> add_section($teaser_customizer); } add_action('customize_controls_init', 'siteorigin_premium_teaser_customizer', 100); if(class_exists('WP_Customize_Section')) : class SiteOrigin_Premium_Teaser_Customizer extends WP_Customize_Section{ function render() { ?> 10, 'title' => sprintf(__('A Copy of %s Premium', 'vantage'), ucfirst($theme)), 'text' => sprintf(__('You get a copy of %s, delivered instantly to your PayPal email address. This includes the same basic support we offer users of our free themes.', 'vantage'), $premium_name ), ); $content['rewards'][] = array( 'amount' => 20, 'title' => __('Premium Support', 'vantage'), 'text' => sprintf(__("This includes Premium email support from our support team for a single site. We'll help you as quickly as possible with all your setup and configuration questions.", 'vantage'), ucfirst($theme)), ); $content['rewards'][] = array( 'amount' => 40, 'title' => __('Advanced Premium Support', 'vantage'), 'text' => sprintf(__("We'll go the extra mile and help you with minor CSS customizations, plugin conflicts and anything else that falls outside standard %s support.", 'vantage'), $premium_name ), ); $content['rewards'][] = array( 'amount' => 60, 'title' => __('A Special Thank You', 'vantage'), 'text' => sprintf(__("Our highest level of support. If you need it, you'll get support directly from the developer of %s. We'll also include your name on our contributors list.", 'vantage'), ucfirst($theme)), ); return $content; } add_filter('siteorigin_premium_content', 'siteorigin_premium_default_content', 8);