Пример #1
0
 function includes()
 {
     if (!empty($this->username) && !empty($this->apikey)) {
         require_once 'class-pixelentity-theme-update.php';
         PixelentityThemeUpdate::init($this->username, $this->apikey, $this->author);
     }
 }
 function zn_check_updates()
 {
     $username = zget_option('zn_theme_username', $this->config['admin_parent'], false, null);
     $apikey = zget_option('zn_theme_api', $this->config['admin_parent'], false, null);
     if (!empty($username) && !empty($apikey) && !empty($this->config['author'])) {
         require_once FW_PATH . '/modules/envato_theme_updater/class-pixelentity-theme-update.php';
         PixelentityThemeUpdate::init($username, $apikey, $this->config['author']);
     }
 }
Пример #3
0
 function zn_check_updates()
 {
     $option_name = ZN()->theme_data['theme_id'] . '_update_config';
     $saved_config = get_option($option_name);
     if (!empty($saved_config['tf_username']) && !empty($saved_config['tf_api']) && !empty($this->config['author'])) {
         require_once FW_PATH . '/modules/envato_theme_updater/class-pixelentity-theme-update.php';
         PixelentityThemeUpdate::init($saved_config['tf_username'], $saved_config['tf_api'], $this->config['author']);
     }
 }
Пример #4
0
 function vce_run_updater()
 {
     $user = vce_get_option('theme_update_username');
     $apikey = vce_get_option('theme_update_apikey');
     if (!empty($user) && !empty($apikey)) {
         include_once 'classes/class-pixelentity-theme-update.php';
         PixelentityThemeUpdate::init($user, $apikey);
     }
 }
Пример #5
0
 public function admin_menu()
 {
     if (PE_THEME_MODE) {
         $options_page = add_theme_page(__('Theme Options', 'Pixelentity Theme/Plugin'), __('Theme Options', 'Pixelentity Theme/Plugin'), 'edit_theme_options', 'pe_theme_options', array(&$this, "theme_options"));
     } else {
         $options_page = false;
     }
     $this->registerAssets();
     wp_enqueue_style("pe_theme_admin_icons");
     if ($options_page) {
         add_action("load-{$options_page}", array(&$this, "page"));
     }
     if ($this->options->updateCheck == "yes" && ($username = $this->master->options->updateUsername) && ($key = $this->master->options->updateAPIKey)) {
         require_once PE_FRAMEWORK . "/php/lib/pixelentity-theme-update/class-pixelentity-theme-update.php";
         PixelentityThemeUpdate::init($username, $key, apply_filters("pe_theme_author", "Pixelentity"));
     }
 }
            foreach ($purchased as $theme) {
                if (isset($filtered[$theme->theme_name])) {
                    // gotcha, compare version now
                    $current = $filtered[$theme->theme_name];
                    if (version_compare($current->Version, $theme->version, '<')) {
                        // bingo, inject the update
                        if ($url = $api->wp_download($theme->item_id)) {
                            $update = array("url" => "http://themeforest.net/item/theme/{$theme->item_id}", "new_version" => $theme->version, "package" => $url);
                            $updates->response[$current->Stylesheet] = $update;
                        }
                    }
                }
            }
            remove_filter("http_request_args", array(&$this, "http_timeout"));
            return $updates;
        }
        public function http_timeout($req)
        {
            // increase timeout for api request
            $req["timeout"] = 300;
            return $req;
        }
        public static function init($username = null, $apiKey = null, $authors = null)
        {
            new PixelentityThemeUpdate($username, $apiKey, $authors);
        }
    }
}
if (get_theme_option('buyer_username') != '' && get_theme_option('buyer_api') != '') {
    PixelentityThemeUpdate::init(get_theme_option('buyer_username'), get_theme_option('buyer_api'), 'PixelBook');
}
Пример #7
0
 /**
  * Include external class
  *
  * @access private
  * @return void
  */
 private function includes()
 {
     if (!empty($this->user_name) && !empty($this->api_key)) {
         \PixelentityThemeUpdate::init($this->user_name, $this->api_key, $this->author);
     }
 }
Пример #8
0
function brad_themes_update($updates)
{
    global $brad_data;
    if (isset($updates->checked) && !empty($brad_data['themeforest_username']) && !empty($brad_data['themeforest_apikey'])) {
        require_once get_template_directory() . "/framework/theme-update/class-pixelentity-theme-update.php";
        $username = trim($brad_data['themeforest_username']);
        $apikey = trim($brad_data['themeforest_apikey']);
        $updater = new PixelentityThemeUpdate($username, $apikey, "bradweb");
        $updates = $updater->check($updates);
    }
    return $updates;
}
Пример #9
0
<?php

add_filter('ot_show_pages', '__return_false');
add_filter('ot_theme_mode', '__return_true');
include_once 'option-tree/ot-loader.php';
if (ot_get_option('rb_buyer_user') != '' && ot_get_option('rb_buyer_api') != '') {
    require_once 'pixelentity-theme-update/class-pixelentity-theme-update.php';
    PixelentityThemeUpdate::init(ot_get_option('rb_buyer_user'), ot_get_option('rb_buyer_api'), 'RubenBristian');
}
/*********************************************************************

	This file contains the most important functions of the theme. Edit carefully! :)

*********************************************************************/
/*---------------------------------
	Make some adjustments on theme setup
------------------------------------*/
if (!function_exists('ikaros_setup')) {
    function ikaros_setup()
    {
        //Make theme available for translation
        load_theme_textdomain('ikaros', get_template_directory() . '/lang');
        //Define content width
        if (!isset($content_width)) {
            $content_width = 940;
        }
        //This theme styles the visual editor with editor-style.css to match the theme style.
        add_editor_style();
        //This theme uses post thumbnails
        add_theme_support('post-thumbnails');
        //Add default posts and comments RSS feed links to head
Пример #10
0
 public function theme_updater()
 {
     if (bon_get_framework_option('bon_framework_update_notification') == true) {
         require_once trailingslashit(BON_CLASSES) . 'class-pixelentity-theme-update.php';
         $username = bon_get_framework_option('bon_framework_envato_username');
         $apikey = bon_get_framework_option('bon_framework_envato_api');
         $author = $this->author_name;
         if (!empty($username) && !empty($apikey)) {
             PixelentityThemeUpdate::init($username, $apikey, $author);
         }
     }
 }
Пример #11
0
 /**
  * Sets up theme defaults and registers support for various WordPress features.
  *
  * Note that this function is hooked into the after_setup_theme hook, which runs
  * before the init hook. The init hook is too late for some features, such as indicating
  * support post thumbnails.
  *
  * @since Astrum 1.0
  */
 function astrum_setup()
 {
     $apikey = ot_get_option('pp_api_key');
     if ($apikey) {
         $username = ot_get_option('pp_username');
         PixelentityThemeUpdate::init($username, $apikey, 'purethemes');
     }
     $catalogmode = ot_get_option('pp_woo_catalog');
     if ($catalogmode == "yes") {
         remove_filter('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30);
         remove_action('woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
     }
     /* Change number of items */
     $wooitems = ot_get_option('pp_wooitems', '9');
     add_filter('loop_shop_per_page', create_function('$cols', 'return ' . $wooitems . ';'), 20);
     /**
      * Custom template tags for this theme.
      */
     require get_template_directory() . '/inc/template-tags.php';
     /**
      * Custom blocks for Aqua Page Builder.
      */
     require get_template_directory() . '/inc/pagebuilder.php';
     /**
      * Custom functions that act independently of the theme templates
      */
     require get_template_directory() . '/inc/extras.php';
     /**
      * Custom functions that act independently of the theme templates
      */
     require get_template_directory() . '/inc/tgmpa.php';
     /**
      * Customizer additions
      */
     require get_template_directory() . '/inc/customizer.php';
     /**
      * Shortcodes
      */
     require get_template_directory() . '/inc/shortcodes.php';
     /**
      * Widgets
      */
     require get_template_directory() . '/inc/widgets.php';
     /**
      * Make theme available for translation
      * Translations can be filed in the /languages/ directory
      * If you're building a theme based on Astrum, use a find and replace
      * to change 'purepress' to the name of your theme in all the template files
      */
     load_theme_textdomain('purepress', get_template_directory() . '/languages');
     /**
      * Add default posts and comments RSS feed links to head
      */
     add_theme_support('automatic-feed-links');
     /**
      * Enable support for Post Thumbnails
      */
     add_theme_support('post-thumbnails');
     set_post_thumbnail_size(860, 0, true);
     //size of thumbs
     add_image_size('blog-medium', 320, 0, true);
     //4col
     //set to 472
     add_image_size('portfolio-wide', 1180, 0, true);
     //slider
     add_image_size('portfolio-half', 775, 0, true);
     //2col
     add_image_size('portfolio-3col', 380, 271, true);
     //3col
     add_image_size('portfolio-4col', 280, 200, true);
     //4col
     add_image_size('square-thumb', 130, 130, true);
     //4col
     /**
      * This theme uses wp_nav_menu() in one location.
      */
     register_nav_menus(array('primary' => __('Primary Menu', 'purepress')));
     /**
      * Enable support for Post Formats
      */
     add_theme_support('post-formats', array('image', 'video', 'gallery'));
     /**
      * Enable support for WooCommerce
      */
     add_theme_support('woocommerce');
     //define( 'WOOCOMMERCE_USE_CSS', false );
     add_filter('woocommerce_enqueue_styles', '__return_false');
 }
Пример #12
0
    exit;
}
/*
	1 - THEMEFOREST
		1.1 - Userdata
		1.2 - Include
		1.3 - Init
*/
/*= 1 ===========================================

	T H E M E F O R E S T
	Plugin activation class

===============================================*/
/*-------------------------------------------
		1.1 - Userdata
	-------------------------------------------*/
$st_['apikey'] = !empty($st_Settings['apikey']) ? $st_Settings['apikey'] : '';
$st_['username'] = !empty($st_Settings['username']) ? $st_Settings['username'] : '';
/*-------------------------------------------
		1.2 - Include
	-------------------------------------------*/
if ($st_['apikey']) {
    require_once dirname(__FILE__) . '/classes/class-pixelentity-theme-update.php';
}
/*-------------------------------------------
		1.3 - Init
	-------------------------------------------*/
if ($st_['apikey']) {
    PixelentityThemeUpdate::init($st_['username'], $st_['apikey'], 'StrictThemes');
}
Пример #13
0
/*-----------------------------------------------------------------------------------*/
/* Create Dynamic Js*/
/*-----------------------------------------------------------------------------------*/
function generate_options_js($newdata)
{
    return;
}
/*-----------------------------------------------------------------------------------*/
/* Auto Update the theme
/*-----------------------------------------------------------------------------------*/
if (!empty($data['zn_theme_username']) && !empty($data['zn_theme_api'])) {
    $username = $data['zn_theme_username'];
    $apikey = $data['zn_theme_api'];
    $author = 'Hogash';
    require_once "class-pixelentity-theme-update.php";
    PixelentityThemeUpdate::init($username, $apikey, $author);
}
/*-----------------------------------------------------------------------------------*/
/* CHECK IF REQUIRED FILES ARE WRITEABLE
/*-----------------------------------------------------------------------------------*/
global $zn_has_error;
$zn_has_error = array();
$css_dir = get_template_directory() . '/css/';
$uploads = wp_upload_dir();
if (is_multisite()) {
    $zn_uploads_dir = trailingslashit($uploads['basedir']);
} else {
    $zn_uploads_dir = $css_dir;
}
$css_file = $zn_uploads_dir . 'options.css';
if (!is_writable($css_file)) {