Changeset 3137611
- Timestamp:
- 08/19/2024 12:32:19 PM (20 months ago)
- Location:
- open-rdw-kenteken-voertuiginformatie/tags/5.0.4
- Files:
-
- 6 edited
-
admin/AdminDashboard.php (modified) (5 diffs)
-
admin/logs/log.txt (modified) (1 diff)
-
app/Includes/Widget.php (modified) (1 diff)
-
config/plugin.php (modified) (1 diff)
-
public/PublicDashboard.php (modified) (2 diffs)
-
views/dashboard/dashboard.home.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
open-rdw-kenteken-voertuiginformatie/tags/5.0.4/admin/AdminDashboard.php
r3137471 r3137611 18 18 use Admin\Partials\TinyMceDisplay; 19 19 use App\MainConfig; 20 use Carbon\Carbon; 20 21 21 22 class AdminDashboard extends Kernel … … 39 40 public function __construct() 40 41 { 41 $this->initializeUpdateChecker();42 43 // Save our Ajax data44 42 add_action('wp_ajax_rdw_save_changes', [$this, 'rdw_save_changes']); 45 43 … … 64 62 } 65 63 66 public function initializeUpdateChecker()67 {68 $reflector = new \ReflectionClass(get_parent_class($this));69 $plugin_file = $reflector->getFileName();70 $base_url = 'https://tussendoor.nl/get-the-request/wp-updates/9c6346eea1c1ce749e3bff?id=24';71 72 UpdateChecker::init(73 $base_url,74 $plugin_file,75 ORK_PLUGIN_TAG,76 get_option('puc_license_rdw')77 );78 }79 80 64 /** 81 65 * Function that adds a dismiss option so we don't nag our users with admin notices. … … 85 69 public function admin_notice_dismiss() 86 70 { 87 update_option('open-rdw-notice-dismissed', strtotime("+1 day")); 71 $now = Carbon::now(); 72 update_option('open-rdw-notice-dismissed', $now->addDay()->toDateString()); 88 73 } 89 74 … … 126 111 public function rdw_lisence_check($license_code = '', $force = false) 127 112 { 128 // Set action to license check129 113 UpdateChecker::license($license_code); 130 114 $info = UpdateChecker::getLicenseInfo($force); -
open-rdw-kenteken-voertuiginformatie/tags/5.0.4/admin/logs/log.txt
r3137471 r3137611 1 2024-08-12 08:07:41 - Deactivating Open RDW PRO. Byebye!2 2024-08-12 11:18:01 - Open RDW PRO activation..3 2024-08-12 11:18:01 - Open RDW PRO activated. -
open-rdw-kenteken-voertuiginformatie/tags/5.0.4/app/Includes/Widget.php
r3137471 r3137611 15 15 use App\Api; 16 16 use App\Fields; 17 use Utilities\UpdateChecker;18 17 19 18 class Widget extends \WP_Widget -
open-rdw-kenteken-voertuiginformatie/tags/5.0.4/config/plugin.php
r3137471 r3137611 54 54 'textversion' => '2.0.0', 55 55 'version' => 'v2', 56 'url' => 'https://tussendoor. test',56 'url' => 'https://tussendoor.nl', 57 57 'timezone' => 'Europe/Amsterdam', 58 58 'endpoints' => [ -
open-rdw-kenteken-voertuiginformatie/tags/5.0.4/public/PublicDashboard.php
r3137471 r3137611 6 6 use App\Fields; 7 7 use App\Http\Kernel; 8 use Utilities\UpdateChecker;9 8 use Public\Partials\KentekenWidgetView; 10 9 … … 18 17 * @subpackage open_rdw_kenteken_voertuiginformatie/public 19 18 */ 20 21 // use Tussendoor\Updates\UpdateChecker;22 19 23 20 class PublicDashboard extends Kernel -
open-rdw-kenteken-voertuiginformatie/tags/5.0.4/views/dashboard/dashboard.home.php
r3137471 r3137611 1 1 <?php 2 2 3 use Carbon\Carbon; 3 4 use App\MainConfig; 4 5 … … 10 11 ); 11 12 12 $dismissTime = strtotime(get_option('open-rdw-notice-dismissed'));13 $currentTime = strtotime("now");13 $dismissTime = get_option('open-rdw-notice-dismissed'); 14 $currentTime = Carbon::now()->toDateString(); 14 15 15 if (($dismissTime === '') || ( $currentTime > $dismissTime)) : ?>16 if (($dismissTime === '') || (Carbon::parse($currentTime)->greaterThan($dismissTime))) : ?> 16 17 <script> 17 18 document.addEventListener('DOMContentLoaded', function() { … … 19 20 const parsedUrl = new URL(url); 20 21 const queryParams = new URLSearchParams(parsedUrl.search); 21 if ((queryParams.get('tab') === 'home-tab') ||(queryParams.get('page') === 'tsd-rdw')) {22 if ((queryParams.get('tab') === 'home-tab') && (queryParams.get('page') === 'tsd-rdw')) { 22 23 var modalElement = document.getElementById('staticBackdrop'); 23 24 if (modalElement) {
Note: See TracChangeset
for help on using the changeset viewer.