Plugin Directory

Changeset 2905921


Ignore:
Timestamp:
04/29/2023 12:08:42 AM (3 years ago)
Author:
rickey29
Message:

2.28.0

Location:
hyper-pwa/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • hyper-pwa/trunk/admin/admin.php

    r2903550 r2905921  
    178178                'enable'
    179179            ],
    180             'supplimental' => 'Provide an offline fallback HTML page.  <a href="https://developers.google.com/web/tools/workbox/guides/advanced-recipes#offline_page_only" target="_blank">More description</a>.'
     180            'supplimental' => 'Provide an offline fallback HTML page.  <a href="https://developer.chrome.com/docs/workbox/managing-fallback-responses/#offline-page-only" target="_blank">More description</a>.'
    181181        ],
    182182        [
     
    193193                'enable'
    194194            ],
    195             'supplimental' => 'Setup Default Handler.  <a href="https://developers.google.com/web/tools/workbox/modules/workbox-routing#set_a_default_handler" target="_blank">More description</a>.'
     195            'supplimental' => 'Setup Default Handler.  <a href="https://developer.chrome.com/docs/workbox/modules/workbox-routing/#set-a-default-handler" target="_blank">More description</a>.'
    196196        ],
    197197        [
     
    208208                'enable'
    209209            ],
    210             'supplimental' => 'Setup Precaching.  <a href="https://developers.google.com/web/tools/workbox/modules/workbox-precaching" target="_blank">More description</a>.'
     210            'supplimental' => 'Setup Precaching.  <a href="https://developer.chrome.com/docs/workbox/modules/workbox-precaching/" target="_blank">More description</a>.'
    211211        ],
    212212        [
     
    217217            'type' => 'textarea',
    218218            'default' => '',
    219             'supplimental' => 'Setup Precaching List.  Each URL occupies one line.  <a href="https://developers.google.com/web/tools/workbox/modules/workbox-precaching" target="_blank">More description</a>.'
     219            'supplimental' => 'Setup Precaching List.  Each URL occupies one line.  <a href="https://developer.chrome.com/docs/workbox/modules/workbox-precaching/" target="_blank">More description</a>.'
    220220        ],
    221221        [
     
    232232                'enable'
    233233            ],
    234             'supplimental' => 'Setup Periodic Background Sync.  <a href="https://web.dev/periodic-background-sync/" target="_blank">More description</a>.'
     234            'supplimental' => 'Setup Periodic Background Sync.  <a href="https://developer.chrome.com/articles/periodic-background-sync/" target="_blank">More description</a>.'
    235235        ],
    236236        [
     
    241241            'type' => 'textarea',
    242242            'default' => '',
    243             'supplimental' => 'Setup Periodic Background Sync List.  Each URL occupies one line.  <a href="https://web.dev/periodic-background-sync/" target="_blank">More description</a>.'
     243            'supplimental' => 'Setup Periodic Background Sync List.  Each URL occupies one line.  <a href="https://developer.chrome.com/articles/periodic-background-sync/" target="_blank">More description</a>.'
    244244        ],
    245245        [
     
    256256                'enable'
    257257            ],
    258             'supplimental' => 'Setup Background Sync.  <a href="https://developers.google.com/web/tools/workbox/modules/workbox-background-sync" target="_blank">More description</a>.'
     258            'supplimental' => 'Setup Background Sync.  <a href="https://developer.chrome.com/docs/workbox/modules/workbox-background-sync/" target="_blank">More description</a>.'
    259259        ],
    260260        [
     
    271271                'enable'
    272272            ],
    273             'supplimental' => 'Setup Google Analytics.  <a href="https://developers.google.com/web/tools/workbox/modules/workbox-google-analytics" target="_blank">More description</a>.'
     273            'supplimental' => 'Setup Google Analytics.  <a href="https://developer.chrome.com/docs/workbox/modules/workbox-google-analytics/" target="_blank">More description</a>.'
    274274        ],
    275275        [
     
    286286                'disable'
    287287            ],
    288             'supplimental' => 'Show a prompt banner when the service worker has been updated and is waiting for installation.  <a href="https://developers.google.com/web/tools/workbox/guides/advanced-recipes#offer_a_page_reload_for_users" target="_blank">More description</a>.'
     288            'supplimental' => 'Show a prompt banner when the service worker has been updated and is waiting for installation.  <a href="https://developer.chrome.com/docs/workbox/handling-service-worker-updates/#do-you-need-to-show-a-prompt" target="_blank">More description</a>.'
    289289        ],
    290290        [
     
    301301                'disable'
    302302            ],
    303             'supplimental' => '<strong>Debug Builds:</strong> Come un-minified, have additional logging and performs rigorous assertion checking to make development as easy as possible.  <strong>Production Builds:</strong> Are minified with any optional logging and assertions stripped from the build.  <a href="https://developers.google.com/web/tools/workbox/guides/configure-workbox#configure_debug_builds_vs_production_builds" target="_blank">More description</a>.'
     303            'supplimental' => '<strong>Debug Builds:</strong> Come un-minified, have additional logging and performs rigorous assertion checking to make development as easy as possible.  <strong>Production Builds:</strong> Are minified with any optional logging and assertions stripped from the build.  <a href="https://developer.chrome.com/docs/workbox/modules/workbox-sw/#force-use-of-debug-or-production-builds" target="_blank">More description</a>.'
    304304        ]
    305305    ];
     
    332332    private $home_url = '';
    333333
     334    private $time_now = 0;
     335
    334336    private $tab = '';
    335337
     
    341343
    342344        $this->home_url = home_url();
     345
     346        $this->time_now = time();
    343347    }
    344348
     
    470474        $register_js_url = HYPER_PWA_REGISTER_JS . '?ver=' . HYPER_PWA_VERSION;
    471475        $service_worker_html_url = HYPER_PWA_SERVICE_WORKER_HTML;
    472         $service_worker_js_url = HYPER_PWA_SERVICE_WORKER_JS . '?ver=' . HYPER_PWA_VERSION;
    473         $manifest_json_url = HYPER_PWA_MANIFEST_JSON . '?ver=' . HYPER_PWA_VERSION;
     476        $service_worker_js_url = HYPER_PWA_SERVICE_WORKER_JS;
     477        $manifest_json_url = HYPER_PWA_MANIFEST_JSON;
    474478        $unregister_js_url = HYPER_PWA_UNREGISTER_JS . '?ver=' . HYPER_PWA_VERSION;
    475479        $offline_html_url = HYPER_PWA_OFFLINE_HTML;
     
    492496        </div>
    493497        <div style="float:right;width:70%;line-height:2em;">
    494             <div style="padding-left:20px;padding-right:20px;">' . ( !empty( $register_js ) ? 'Connected' : 'NOT Connected' ) . '</div>
    495             <div style="padding-left:20px;padding-right:20px;">' . ( !empty( $service_worker_html ) ? 'Connected' : 'NOT Connected' ) . '</div>
    496             <div style="padding-left:20px;padding-right:20px;">' . ( !empty( $service_worker_js ) ? 'Connected' : 'NOT Connected' ) . '</div>
    497             <div style="padding-left:20px;padding-right:20px;">' . ( !empty( $manifest_json ) ? 'Connected' : 'NOT Connected' ) . '</div>
    498             <div style="padding-left:20px;padding-right:20px;">' . ( !empty( $unregister_js ) ? 'Connected' : 'NOT Connected' ) . '</div>
    499             <div style="padding-left:20px;padding-right:20px;">' . ( !empty( $offline_html ) ? 'Connected' : 'NOT Connected' ) . '</div>
     498            <div style="padding-left:20px;padding-right:20px;">' . ( !empty( trim( $register_js ) ) ? 'Connected' : 'NOT Connected' ) . '</div>
     499            <div style="padding-left:20px;padding-right:20px;">' . ( !empty( trim( $service_worker_html ) ) ? 'Connected' : 'NOT Connected' ) . '</div>
     500            <div style="padding-left:20px;padding-right:20px;">' . ( !empty( trim( $service_worker_js ) ) ? 'Connected' : 'NOT Connected' ) . '</div>
     501            <div style="padding-left:20px;padding-right:20px;">' . ( !empty( trim( $manifest_json ) ) ? 'Connected' : 'NOT Connected' ) . '</div>
     502            <div style="padding-left:20px;padding-right:20px;">' . ( !empty( trim( $unregister_js ) ) ? 'Connected' : 'NOT Connected' ) . '</div>
     503            <div style="padding-left:20px;padding-right:20px;">' . ( !empty( trim( $offline_html ) ) ? 'Connected' : 'NOT Connected' ) . '</div>
    500504        </div>
    501505        <div style="clear: both;"></div>
     
    626630        if ( !empty( $_GET['settings-updated'] ) )
    627631        {
    628             $timestamp = wp_next_scheduled( 'hyper-pwa-cron-hook' );
    629             wp_unschedule_event( $timestamp, 'hyper-pwa-cron-hook' );
    630 
    631632            $this->retrieve->reset_transient();
    632633
    633             $time_now = time();
    634             wp_schedule_event( $time_now, HYPER_PWA_SCHEDULE_RECURRENCE, 'hyper-pwa-cron-hook' );
     634            update_option( HYPER_PWA_TRANSIENT_TIMESTAMP, $this->time_now );
     635
    635636
    636637            echo '
  • hyper-pwa/trunk/cfg/cfg.php

    r2904784 r2905921  
    55}
    66
    7 define( 'HYPER_PWA_VERSION', '2.27.0' );
     7define( 'HYPER_PWA_VERSION', '2.28.0' );
     8define( 'HYPER_PWA_VERSION_ID', 'hyper-pwa-version-id' );
     9
     10define( 'HYPER_PWA_TRANSIENT_TIMESTAMP', 'hyper-pwa-transient-timestamp' );
     11define( 'HYPER_PWA_TRANSIENT_SCHEDULE_RECURRENCE', HOUR_IN_SECONDS );
     12define( 'HYPER_PWA_TRANSIENT_EXPIRATION', DAY_IN_SECONDS );
     13
     14define( 'HYPER_PWA_PAGE_VIEW', 'hyper-pwa-page-view' );
     15define( 'HYPER_PWA_PAGE_VIEW_SIZE', 30 );
     16
     17define( 'HYPER_PWA_PAGE_VIEW_TIMESTAMP', 'hyper-pwa-page-view-timestamp' );
     18define( 'HYPER_PWA_PAGE_VIEW_SCHEDULE_RECURRENCE', WEEK_IN_SECONDS );
     19define( 'HYPER_PWA_PAGE_VIEW_EXPIRATION', MONTH_IN_SECONDS );
     20
     21define( 'HYPER_PWA_VERBOSE', FALSE );
    822
    923
     
    5266define( 'HYPER_PWA_UPDATE_PROMPT', 'hyper-pwa-update-prompt' );
    5367define( 'HYPER_PWA_DEBUG', 'hyper-pwa-debug' );
    54 
    55 
    56 define( 'HYPER_PWA_SCHEDULE_RECURRENCE', 'daily' );
    57 
    58 define( 'HYPER_PWA_TRANSIENT_EXPIRATION', WEEK_IN_SECONDS );
    59 
    60 define( 'HYPER_PWA_PAGE_VIEW_COUNT', 'hyper-pwa-page-view-count' );
    61 define( 'HYPER_PWA_PAGE_VIEW_COUNT_SIZE', 30 );
    62 define( 'HYPER_PWA_PAGE_VIEW_COUNT_EXPIRATION', WEEK_IN_SECONDS );
    63 
    64 
    65 define( 'HYPER_PWA_VERBOSE', FALSE );
  • hyper-pwa/trunk/flx/cfg.php

    r2891861 r2905921  
    55}
    66
    7 define( 'HYPER_PWA_FLX_PROJECT', 'hyper-pwa-wordpress' );
     7define( 'HYPER_PWA_FLX_SERVER_1', 'https://flx04.flexplat.com' );
     8define( 'HYPER_PWA_FLX_SERVER_2', 'https://flx05.flexplat.com' );
     9define( 'HYPER_PWA_FLX_SERVER_3', 'https://flx06.flexplat.com' );
    810
    911define( 'HYPER_PWA_FLX_REGISTER_JS_ROUTE', '/api/hyper-pwa/register-js' );
     
    1416define( 'HYPER_PWA_FLX_OFFLINE_HTML_ROUTE', '/api/hyper-pwa/offline-html' );
    1517
    16 define( 'HYPER_PWA_FLX_SERVER_1', 'https://flx04.flexplat.com' );
    17 define( 'HYPER_PWA_FLX_SERVER_2', 'https://flx05.flexplat.com' );
    18 define( 'HYPER_PWA_FLX_SERVER_3', 'https://flx06.flexplat.com' );
     18define( 'HYPER_PWA_FLX_PROJECT', 'hyper-pwa' );
  • hyper-pwa/trunk/hyper-pwa.php

    r2904784 r2905921  
    44Plugin URI:  https://github.com/rickey29/hyper-pwa
    55Description: Provide custom Manifest and Service Worker, convert WordPress into Progressive Web Apps (PWA).
    6 Version:     2.27.0
     6Version:     2.28.0
    77Author:      Rickey Gu
    88Author URI:  https://flexplat.com
     
    3636    private $page_url = '';
    3737
     38    private $time_now = 0;
     39
    3840    private $other_pwa_plugin_is_active = FALSE;
    3941
     
    5153        $this->page_url = $parts['scheme'] . '://' . $parts['host'] . add_query_arg( [] );
    5254
     55        $this->time_now = time();
     56
    5357
    5458        require_once ABSPATH . 'wp-admin/includes/plugin.php';
     
    152156        if ( 'GET' === $_SERVER['REQUEST_METHOD'] )
    153157        {
    154             $this->lib->set_page_view_count( $this->page_url );
     158            $this->lib->set_page_view( $this->page_url );
    155159        }
    156160
     
    185189
    186190
    187         $version = get_option( 'hyper-pwa-version' );
     191        $version = get_option( HYPER_PWA_VERSION_ID );
     192        $transient_timestamp = get_option( HYPER_PWA_TRANSIENT_TIMESTAMP );
     193        $page_view_timestamp = get_option( HYPER_PWA_PAGE_VIEW_TIMESTAMP );
     194
    188195        if ( HYPER_PWA_VERSION !== $version )
    189196        {
    190             $timestamp = wp_next_scheduled( 'hyper-pwa-cron-hook' );
    191             wp_unschedule_event( $timestamp, 'hyper-pwa-cron-hook' );
    192 
    193197            $this->retrieve->reset_transient();
    194198
    195             $time_now = time();
    196             wp_schedule_event( $time_now, HYPER_PWA_SCHEDULE_RECURRENCE, 'hyper-pwa-cron-hook' );
    197 
    198             update_option( 'hyper-pwa-version', HYPER_PWA_VERSION );
     199            update_option( HYPER_PWA_VERSION_ID, HYPER_PWA_VERSION );
     200            update_option( HYPER_PWA_TRANSIENT_TIMESTAMP, $this->time_now );
     201        }
     202        elseif ( HYPER_PWA_TRANSIENT_SCHEDULE_RECURRENCE <= $this->time_now - $transient_timestamp )
     203        {
     204            $this->retrieve->reset_transient();
     205
     206            update_option( HYPER_PWA_TRANSIENT_TIMESTAMP, $this->time_now );
     207        }
     208
     209        if ( HYPER_PWA_PAGE_VIEW_SCHEDULE_RECURRENCE <= $this->time_now - $page_view_timestamp )
     210        {
     211            $this->lib->save_page_view();
     212
     213            update_option( HYPER_PWA_PAGE_VIEW_TIMESTAMP, $this->time_now );
    199214        }
    200215
     
    330345        $page_type = $this->get_page_type();
    331346
    332         $head = '<link rel="manifest" href="' . $this->home_url . '/' . HYPER_PWA_MANIFEST_JSON . '?ver=' . HYPER_PWA_VERSION . '" crossorigin="use-credentials" />
     347        $head = '<link rel="manifest" href="' . $this->home_url . '/' . HYPER_PWA_MANIFEST_JSON . '" crossorigin="use-credentials" />
    333348<meta name="theme-color" content="' . $theme_color . '" />
    334349<link rel="apple-touch-icon" href="' . $this->home_url . $icons['icon_192'] . '" />
     
    353368    <div><button id="hyper-pwa-a2hs-close-button"><svg width="24px" height="24px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg></button></div>
    354369</div>
    355 <amp-install-serviceworker src="' . $this->home_url . '/' . HYPER_PWA_SERVICE_WORKER_JS . '?ver=' . HYPER_PWA_VERSION . '" data-iframe-src="' . $this->home_url . '/hyper-pwa-service-worker.html" layout="nodisplay"></amp-install-serviceworker>' . "\n";
     370<amp-install-serviceworker src="' . $this->home_url . '/' . HYPER_PWA_SERVICE_WORKER_JS . '" data-iframe-src="' . $this->home_url . '/hyper-pwa-service-worker.html" layout="nodisplay"></amp-install-serviceworker>' . "\n";
    356371
    357372        echo $footer;
    358     }
    359 
    360     public function cron_hook()
    361     {
    362         $this->lib->save_page_view_count();
    363 
    364         $this->retrieve->reset_transient();
    365373    }
    366374
     
    399407    public function register_activation()
    400408    {
    401         add_option( 'hyper-pwa-version', HYPER_PWA_VERSION );
    402 
    403         $time_now = time();
    404         setcookie( 'hyper-pwa-admin-tab', '', $time_now - 1, COOKIEPATH, COOKIE_DOMAIN );
    405         setcookie( 'hyper-pwa-disable-a2hs', '', $time_now - 1, COOKIEPATH, COOKIE_DOMAIN );
     409        add_option( HYPER_PWA_VERSION_ID, HYPER_PWA_VERSION );
     410        add_option( HYPER_PWA_TRANSIENT_TIMESTAMP, $this->time_now );
     411        add_option( HYPER_PWA_PAGE_VIEW, [] );
     412        add_option( HYPER_PWA_PAGE_VIEW_TIMESTAMP, $this->time_now );
    406413
    407414        $this->retrieve->reset_transient();
    408415
    409         if ( !wp_next_scheduled( 'hyper-pwa-cron-hook' ) )
    410         {
    411             $time_now = time();
    412             wp_schedule_event( $time_now, HYPER_PWA_SCHEDULE_RECURRENCE, 'hyper-pwa-cron-hook' );
    413         }
     416        setcookie( 'hyper-pwa-admin-tab', '', $this->time_now - 1, COOKIEPATH, COOKIE_DOMAIN );
     417        setcookie( 'hyper-pwa-disable-a2hs', '', $this->time_now - 1, COOKIEPATH, COOKIE_DOMAIN );
    414418    }
    415419
    416420    public function register_deactivation()
    417421    {
    418         $timestamp = wp_next_scheduled( 'hyper-pwa-cron-hook' );
    419         wp_unschedule_event( $timestamp, 'hyper-pwa-cron-hook' );
     422        setcookie( 'hyper-pwa-admin-tab', '', $this->time_now - 1, COOKIEPATH, COOKIE_DOMAIN );
     423        setcookie( 'hyper-pwa-disable-a2hs', '', $this->time_now - 1, COOKIEPATH, COOKIE_DOMAIN );
    420424
    421425        $this->retrieve->remove_transient();
    422426
    423         $time_now = time();
    424         setcookie( 'hyper-pwa-admin-tab', '', $time_now - 1, COOKIEPATH, COOKIE_DOMAIN );
    425         setcookie( 'hyper-pwa-disable-a2hs', '', $time_now - 1, COOKIEPATH, COOKIE_DOMAIN );
    426 
    427         delete_option( 'hyper-pwa-version' );
     427        delete_option( HYPER_PWA_VERSION_ID );
     428        delete_option( HYPER_PWA_TRANSIENT_TIMESTAMP );
     429        delete_option( HYPER_PWA_PAGE_VIEW );
     430        delete_option( HYPER_PWA_PAGE_VIEW_TIMESTAMP );
    428431    }
    429432}
     
    455458    add_action( 'admin_enqueue_scripts', [ $hyper_pwa, 'enqueue_admin_scripts' ] );
    456459}
    457 add_action( 'hyper-pwa-cron-hook', [ $hyper_pwa, 'cron_hook' ] );
    458460
    459461add_filter( 'script_loader_tag', [ $hyper_pwa, 'script_loader_tag' ], 10, 3 );
  • hyper-pwa/trunk/lib/lib.php

    r2903550 r2905921  
    224224        else
    225225        {
    226             $precaching_list = $this->load_page_view_list();
     226            $precaching_list = $this->load_page_view();
    227227        }
    228228
     
    338338
    339339
    340     private function load_page_view_list()
    341     {
    342         $urls = get_transient( HYPER_PWA_PAGE_VIEW_COUNT );
     340    private function load_page_view()
     341    {
     342        $urls = get_transient( HYPER_PWA_PAGE_VIEW );
    343343        $urls = !empty( $urls ) ? $urls : [];
    344344
    345345        arsort( $urls );
    346         $urls = array_slice( $urls, 0, HYPER_PWA_PAGE_VIEW_COUNT_SIZE );
     346        $urls = array_slice( $urls, 0, HYPER_PWA_PAGE_VIEW_SIZE );
    347347
    348348        $urls2 = [];
     
    356356    }
    357357
    358     public function set_page_view_count( $page_url )
    359     {
    360         $urls = get_option( HYPER_PWA_PAGE_VIEW_COUNT );
     358    public function set_page_view( $page_url )
     359    {
     360        $urls = get_option( HYPER_PWA_PAGE_VIEW );
    361361        $urls = !empty( $urls ) ? $urls : [];
    362362
     
    367367        $urls[$page_url] += 1;
    368368
    369         delete_option( HYPER_PWA_PAGE_VIEW_COUNT );
    370         add_option( HYPER_PWA_PAGE_VIEW_COUNT, $urls, '', 'no' );
    371     }
    372 
    373     public function save_page_view_count()
    374     {
    375         $urls = get_option( HYPER_PWA_PAGE_VIEW_COUNT );
     369        delete_option( HYPER_PWA_PAGE_VIEW );
     370        add_option( HYPER_PWA_PAGE_VIEW, $urls );
     371    }
     372
     373    public function save_page_view()
     374    {
     375        $urls = get_option( HYPER_PWA_PAGE_VIEW );
    376376        $urls = !empty( $urls ) ? $urls : [];
    377377
    378         set_transient( HYPER_PWA_PAGE_VIEW_COUNT, $urls, HYPER_PWA_PAGE_VIEW_COUNT_EXPIRATION );
    379 
    380         delete_option( HYPER_PWA_PAGE_VIEW_COUNT );
     378        set_transient( HYPER_PWA_PAGE_VIEW, $urls, HYPER_PWA_PAGE_VIEW_EXPIRATION );
     379
     380        delete_option( HYPER_PWA_PAGE_VIEW );
    381381    }
    382382
  • hyper-pwa/trunk/pwa/register.php

    r2903046 r2905921  
    4747        $page .= "\n
    4848if ('serviceWorker' in navigator) {
    49   const wb = new Workbox('/" . HYPER_PWA_SERVICE_WORKER_JS . "?ver=" . HYPER_PWA_VERSION . "');";
     49  const wb = new Workbox('/" . HYPER_PWA_SERVICE_WORKER_JS . "');";
    5050
    5151        $page .= "\n
  • hyper-pwa/trunk/readme.txt

    r2904784 r2905921  
    66Tested up to: 6.2
    77Requires PHP: 7.2
    8 Stable tag: 2.27.0
     8Stable tag: 2.28.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    109109
    110110== Changelog ==
     111= 2.28.0
     112(Fri., Apr. 28, 2023)
     113* Improvement: Simulate cron job.
     114
    111115= 2.27.0
    112116(Wed., Apr. 26, 2023)
Note: See TracChangeset for help on using the changeset viewer.