Skip to content

Commit

Permalink
Updated version number in style.css and changelog.txt, along with som…
Browse files Browse the repository at this point in the history
…e debugging for the upgrade mechanism
  • Loading branch information
maumoura committed Apr 3, 2024
1 parent e2ae19e commit 956a1e0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
18 changes: 13 additions & 5 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
/*
Theme Name: Lensa
Theme URI: http://colorlabsproject.com/themes/lensa/
Theme URI: https://github.com/colorlabsproject/lensa/
Theme Upgrade URI: https://github.com/maumoura/lensa/
Author: ColorLabs & Company
Author URI: http://colorlabsproject.com
Author URI: https://github.com/colorlabsproject/lensa/
Author Upgrade: Mauricio Moura da Silva
Author Upgrade URI: https://mauriciomoura.com/
Release Date: 30 November 2012
Designer: Andrie Pasca Hendradewa
Requirements: WordPress 3.0 or higher, PHP 5
Compatibility: WordPress 3.5
Requirements: WordPress 6.4 or higher, PHP 7
Compatibility: WordPress 6.4+
Tags: photography, instagram, blog, full-screen, slider, responsive
Last Update Date: 06 August 2014
Last Update Date: 03 April 2024
*/

/**** Changelog ****/

"Please backup your theme pack files at first before you update the theme into the latest version"

2024.04.03 - Version 1.1.8
- Lots of fixes, to make it work with WordPress 6+
File Affected: too many to list
Might work with other versions of WordPress, but was tested only with version 6.4.3 and 6.5

2015.07.06 - Version 1.1.5
- Add: Pagination for Flickr Gallery
File Affected: template-gallery.php
Expand Down
9 changes: 7 additions & 2 deletions functions/admin-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function lensa_automatic_github_updates($data) {
$file = @json_decode(@file_get_contents('https://api.github.com/repos/'.$user.'/'.$repo.'/releases/latest', false,
stream_context_create(['http' => ['header' => "User-Agent: ".$user."\r\n"]])
));
if($file) {
if ($file) {
$update = filter_var($file->tag_name, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
// Only return a response if the new version number is higher than the current version
if($update > $current) {
Expand Down Expand Up @@ -162,10 +162,15 @@ function colabsthemes_themes_update_page_set(){

// Get the latest release tag from the repository. The User-Agent header must be sent, as per
// GitHub's API documentation: https://developer.github.com/v3/#user-agent-required
$file = @json_decode(@file_get_contents('https://api.github.com/repos/'.$user.'/'.$repo.'/releases/latest', false,
$github_url = 'https://api.github.com/repos/'.$user.'/'.$repo.'/releases/latest';
$file = json_decode(file_get_contents($github_url, false,
stream_context_create(['http' => ['header' => "User-Agent: ".$user."\r\n"]])
));

printf( __('<div style="display:none;">','colabsthemes') );
var_dump($file);
printf( __('</div>','colabsthemes') );

$backup = esc_url( add_query_arg(array( 'page' => 'colabsthemes_framework_update','theme_backup'=>'true' )) );

if ($file) {
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: http://demo.colorlabsproject.com/lensa
Description: WordPress Photography Themes by ColorLabs & Company
Author: ColorLabs & Company
Author URI: http://colorlabsproject.com
Version: 1.1.5
Version: 1.1.8
Tags: photography, instagram, blog, full-screen, slider, responsive, pinterest, flickr, picasa, custom_post_type
*/
/* ===================================================================
Expand Down

0 comments on commit 956a1e0

Please sign in to comment.