コード例 #1
0
ファイル: editor.updates.php プロジェクト: taeche/SoDoEx
 function register_core()
 {
     // if we are parent theme OR a child theme, register as DMS.
     // if we are a standalone, register as the standalone.
     $themeslug = $this->get_themeslug();
     global $registered_pagelines_updates;
     if (!is_array($registered_pagelines_updates)) {
         $registered_pagelines_updates = array();
     }
     $registered_pagelines_updates['dmspro'] = array('type' => 'theme', 'product_file_path' => 'dmspro', 'product_name' => __('PageLines Club Membership', 'pagelines'), 'product_version' => '', 'product_desc' => __('Activating this will automatically give you updates to any PageLines Product detected.', 'pagelines'));
     $registered_pagelines_updates[$themeslug] = array('type' => 'theme', 'product_file_path' => $themeslug, 'product_name' => pl_get_theme_data(get_template_directory(), 'Name'), 'product_version' => pl_get_theme_data(get_template_directory(), 'Version'), 'product_desc' => pl_get_theme_data(get_template_directory(), 'Description'));
 }
コード例 #2
0
ファイル: run.versioning.php プロジェクト: taeche/SoDoEx
$actual = PL_CORE_VERSION;
// if new version do some housekeeping.
if (version_compare($actual, $installed) > 0) {
    $dms_cache = new DMS_Cache();
    // we want to purge the cache during a theme update.
    $dms_cache->purge_all();
    // special function that runs once during upgrade from 1.x to 2.x series.
    if (version_compare($installed, '1.5.0', '<')) {
        add_action('after_setup_theme', 'dms_update_two_point_ohh');
    }
}
function dms_update_two_point_ohh()
{
    if (!is_user_logged_in()) {
        return false;
    }
    if (pl_is_wporg()) {
        return false;
    }
    if (get_theme_mod('pl_installed')) {
        return false;
    }
    // run the 2.0 install routine.
    $install = new PageLinesInstall();
    $url = $install->run_installation_routine();
    wp_safe_redirect($url);
    exit;
}
set_theme_mod('pagelines_version', $actual);
set_theme_mod('pagelines_child_version', pl_get_theme_data(get_stylesheet_directory(), 'Version'));
コード例 #3
0
    $pl_start_mem = memory_get_usage();
}
/**
 * Define framework version
 */
global $platform_build;
define('PL_CORE_VERSION', $platform_build);
define('PL_CHILD_VERSION', get_theme_mod('pagelines_child_version'));
/**
 * Set Theme Name
 */
$theme = 'PageLines';
define('PL_THEMENAME', $theme);
define('PL_CHILDTHEMENAME', get_option('stylesheet'));
define('PL_NICETHEMENAME', pl_get_theme_data(get_template_directory(), 'Name'));
define('PL_NICECHILDTHEMENAME', pl_get_theme_data(get_stylesheet_directory(), 'Name'));
define('PL_PARENT_DIR', pl_get_template_directory());
define('PL_THEME_DIR', get_template_directory());
define('PL_CHILD_DIR', get_stylesheet_directory());
define('PL_PARENT_URL', pl_get_template_directory_uri());
define('PL_THEME_URL', get_template_directory_uri());
define('PL_CHILD_URL', get_stylesheet_directory_uri());
define('PL_CHILD_IMAGES', PL_CHILD_URL . '/images');
// if( ! defined( 'PL_LESS_DEV' ) )
// 	define( 'PL_LESS_DEV', false );
// Define Settings Constants for option DB storage
define('PAGELINES_SETTINGS', apply_filters('pagelines_settings_field', 'pagelines-settings-two'));
define('PAGELINES_EXTENSION', apply_filters('pagelines_settings_extension', 'pagelines-extension'));
define('PAGELINES_ACCOUNT', apply_filters('pagelines_settings_account', 'pagelines-account'));
define('PAGELINES_SPECIAL', apply_filters('pagelines_settings_special', 'pagelines-special'));
define('PAGELINES_TEMPLATES', apply_filters('pagelines_settings_templates', 'pagelines-templates'));
コード例 #4
0
function pagelines_set_versions()
{
    if (current_user_can('edit_themes')) {
        delete_transient('pagelines_sections_cache');
        if (defined('PL_LESS_DEV') && PL_LESS_DEV) {
            PageLinesRenderCSS::flush_version(false);
        }
    }
    set_theme_mod('pagelines_version', pl_get_theme_data(get_template_directory(), 'Version'));
    set_theme_mod('pagelines_child_version', pl_get_theme_data(get_stylesheet_directory(), 'Version'));
}
コード例 #5
0
function pagelines_set_versions()
{
    set_theme_mod('pagelines_version', PL_CORE_VERSION);
    set_theme_mod('pagelines_child_version', pl_get_theme_data(get_stylesheet_directory(), 'Version'));
}
コード例 #6
0
 /**
  *
  * @TODO document
  *
  */
 function is_installed($type, $key, $ext, $tab = '')
 {
     if ('dash_rss' == $tab && 'plugin' == $type) {
         if (is_dir(sprintf('%s/%s', WP_PLUGIN_DIR, $ext['slug'])) && file_exists(sprintf('%s/%s/%s.php', WP_PLUGIN_DIR, $ext['slug'], $ext['slug']))) {
             return true;
         }
     }
     if ($type == 'section') {
         $status = isset($ext['status']) ? true : false;
         if (isset($ext['base_file'])) {
             $path = $ext['base_file'];
         } else {
             $path = sprintf('%s/%s/section.php', PL_EXTEND_DIR, $ext['slug']);
         }
         if (is_file($path)) {
             return true;
         } else {
             return false;
         }
     } elseif ($type == 'plugin') {
         if (isset($ext['status']['status']) && $ext['status']['status'] != '') {
             return true;
         } else {
             return false;
         }
     } elseif ($type == 'theme') {
         $check_file = sprintf('%s/themes/%s/style.css', WP_CONTENT_DIR, $key);
         if (is_file($check_file)) {
             $exists = true;
         }
         if (isset($exists) && ($data = pl_get_theme_data($key))) {
             return true;
         } else {
             return false;
         }
     }
 }