diff --git a/git-updater.php b/git-updater.php index e3d5582..567790d 100644 --- a/git-updater.php +++ b/git-updater.php @@ -1,9 +1,9 @@ ] + * @see https://www.smashingmagazine.com/2015/08/deploy-wordpress-plugins-with-github-using-transients/#writing-the-code-for-our-filters [] */ -class Smashing_Updater { +class Github_Updater { private $file; @@ -115,16 +115,21 @@ public function plugin_popup( $result, $action, $args ) { $this->get_repository_info(); // Get our repo info + date_default_timezone_set('America/Sao_Paulo'); + + $date_added = new DateTime( $this->github_response['created_at'] ); // convert UNIX timestamp to PHP DateTime + $date_added->format('Y-m-d'); // output = 2017-12-15 + // Set it to an array $plugin = array( 'name' => $this->plugin["Name"], 'slug' => $this->basename, - 'requires' => '3.3.8', - 'tested' => '3.3.5', + 'requires' => '4.5.2', + 'tested' => '4.9.1', 'rating' => '100.0', 'num_ratings' => '10823', 'downloaded' => '14249', - 'added' => '2017-12-15', + 'added' => $date_added, //'2017-12-15', 'version' => $this->github_response['tag_name'], 'author' => $this->plugin["AuthorName"], 'author_profile' => $this->plugin["AuthorURI"], diff --git a/index.php b/index.php index 9eb747b..850f638 100755 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ Plugin Name: Foodstack Framework Plugin URI: https://github.com/monecchi/FoodStack-Framework Description: Derived from Ebor Framework by TommusRhodus Theme, this alternate version was specially crafted for WooCommerce Restaurant & Food Store websites -Version: 1.3.8 +Version: 1.3.9 Author: Adriano Monecchi Author URI: http://www.plandesign.com.br/ License: GPL2 @@ -17,7 +17,7 @@ * Plugin definitions */ define( 'EBOR_FRAMEWORK_PATH', trailingslashit(plugin_dir_path(__FILE__)) ); -define( 'EBOR_FRAMEWORK_VERSION', '1.3.8'); +define( 'EBOR_FRAMEWORK_VERSION', '1.3.9'); /** * Styles & Scripts @@ -86,13 +86,12 @@ function ebor_ajax_import_data() { /** * Github updater class - * @see https://www.smashingmagazine.com/2015/08/deploy-wordpress-plugins-with-github-using-transients/#writing-the-code-for-our-filters */ -if( ! class_exists( 'Smashing_Updater' ) ){ +if( ! class_exists( 'Github_Updater' ) ) { include_once( plugin_dir_path( __FILE__ ) . 'git-updater.php' ); } -$updater = new Smashing_Updater( __FILE__ ); +$updater = new Github_Updater( __FILE__ ); $updater->set_username( 'monecchi' ); $updater->set_repository( 'FoodStack-Framework' );