Skip to content

Commit

Permalink
IE11 bugfix, disabled theme updater
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisblakley committed Apr 15, 2021
1 parent 98eeacb commit 15e6e42
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nebula-wp",
"title": "Nebula",
"description": "Advanced Starter WordPress Theme for Developers",
"version": "8.9.5",
"version": "8.9.32",
"homepage": "https://gearside.com/nebula/",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion assets/js/nebula.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ nebula.registerServiceWorker = function(){
} else { //If the Service Worker option is disabled
//Force unregister any existing SWs
navigator.serviceWorker.getRegistrations().then(function(registrations){
for ( let registration of registrations ){
for ( var registration of registrations ){
registration.unregister();
}
});
Expand Down
2 changes: 1 addition & 1 deletion assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Description: Nebula is a springboard WordPress theme framework for developers. Like other WordPress startup themes, it has custom functionality built-in (like shortcodes, styles, and JS/PHP functions), but unlike other themes Nebula is not meant for the end-user.
Author: Pinckney Hugo Group
Author URI: http://www.pinckneyhugo.com
Version: 8.9.5.7626
Version: 8.9.32.001
License: GNU General Public License v2.0 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, threaded-comments, theme-options, sticky-post, post-formats, microformats, full-width-template, front-page-post-form, flexible-header, featured-images, featured-image-header, editor-style, custom-menu, custom-colors, accessibility-ready
Expand Down
2 changes: 1 addition & 1 deletion inc/data/nebula_theme.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "8.9.5.7625",
"version": "8.9.32.001",
"details_url": "https://github.com/chrisblakley/Nebula/commits/main",
"download_url": "https://github.com/chrisblakley/Nebula/archive/main.zip"
}
16 changes: 4 additions & 12 deletions libs/Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function hooks(){
add_filter('nebula_brain', array($this, 'admin_brain'));
add_action('save_post', array($this, 'clear_transients'));
add_action('profile_update', array($this, 'clear_transients'));
add_action('upgrader_process_complete', array($this, 'theme_update_automation'), 10, 2); //Action 'upgrader_post_install' also exists.
//add_action('upgrader_process_complete', array($this, 'theme_update_automation'), 10, 2); //Action 'upgrader_post_install' also exists.
add_filter('auth_cookie_expiration', array($this, 'session_expire'));
add_action('after_setup_theme', array($this, 'custom_media_display_settings'));

Expand All @@ -43,8 +43,8 @@ public function hooks(){

if ( current_user_can('edit_others_posts') ){
add_action('admin_init', array($this, 'theme_json'));
add_filter('puc_request_update_result_theme-Nebula', array($this, 'theme_update_version_store'), 10, 2); //This hook is found in UpdateChecker.php in the filterUpdateResult() function.
add_filter('site_transient_update_themes', array($this, 'force_nebula_theme_update'), 99, 1);
//add_filter('puc_request_update_result_theme-Nebula', array($this, 'theme_update_version_store'), 10, 2); //This hook is found in UpdateChecker.php in the filterUpdateResult() function.
//add_filter('site_transient_update_themes', array($this, 'force_nebula_theme_update'), 99, 1);
}
}

Expand Down Expand Up @@ -1098,22 +1098,14 @@ public function theme_json(){
$this->update_data('current_version_date', $this->version('date'));
}

if ( !$this->allow_theme_update() ){
//Check for unsupported version: if newer version of Nebula has a "u" at the end of the version number, disable automated updates.
if ( 1==1 ){ //No longer allow theme updates on this branch
$remote_version_info = get_option('external_theme_updates-Nebula-main');
if ( !empty($remote_version_info->checkedVersion) && strpos($remote_version_info->checkedVersion, 'u') && str_replace('u', '', $remote_version_info->checkedVersion) !== str_replace('u', '', $this->version('raw')) ){
$this->update_data('version_legacy', 'true');
$this->update_data('current_version', $this->version('raw'));
$this->update_data('current_version_date', $this->version('date'));
$this->update_data('next_version', 'INCOMPATIBLE');
}
} elseif ( current_user_can('update_themes') && is_child_theme() ){
require_once get_template_directory() . '/inc/vendor/plugin-update-checker/plugin-update-checker.php';
$theme_update_checker = Puc_v4_Factory::buildUpdateChecker(
'https://raw.githubusercontent.com/chrisblakley/Nebula/main/inc/data/nebula_theme.json',
get_template_directory() . '/functions.php',
'Nebula' //The filter hook above must match this
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion libs/Utilities/Utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function is_nebula(){
//Generate Nebula Session ID
public function nebula_session_id(){
$timer_name = $this->timer('Session ID');
$server_generated_session_id = ( session_id() )? session_id() : '!' . uniqid(); //@todo "nebula" 0: decommission for session
$server_generated_session_id = '!' . uniqid();

//Check object cache first
$session_id = wp_cache_get('nebula_session_id', $server_generated_session_id); //If session_id() is not available, it will re-generate the Nebula session ID
Expand Down
2 changes: 1 addition & 1 deletion style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 15e6e42

Please sign in to comment.