Plugin Directory

Changeset 3259805


Ignore:
Timestamp:
03/21/2025 03:24:03 PM (12 months ago)
Author:
widgetlogics
Message:

update to v6.0.5

Location:
widget-logic
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • widget-logic/tags/6.0.5/block_widget/index.php

    r3254708 r3259805  
    44
    55function widget_logic_register_block() {
     6    register_logic_live_match_widget_service();
    67    register_block_type(__DIR__ . '/block.json');
    78}
  • widget-logic/tags/6.0.5/widget.php

    r3254708 r3259805  
    7777}
    7878
     79function register_logic_live_match_widget_service() {
     80    // Check if the script is already registered
     81    if ( !wp_script_is('widget-logic_live_match_widget', 'registered') ) {
     82        $cfg = require('widget_cfg.php');
     83        $url = $cfg['base'];
     84        $ver = $cfg['ver'];
     85        $t = time();
     86        $t = $t - $t % (12 * 60 * 60);
     87
     88        wp_register_script('widget-logic_live_match_widget', "{$url}{$ver}/js/data.js?t={$t}", array(),  '6.0.5', true);
     89    }
     90}
     91
     92add_action('wp_enqueue_scripts', 'register_logic_live_match_widget_service');
     93
    7994if (version_compare(get_bloginfo('version'), '5.0', '>=')) {
    8095    include_once 'block_widget/index.php';
     
    8499    });
    85100}
    86 
    87 add_action('wp_enqueue_scripts', function() {
    88     $cfg = require('widget_cfg.php');
    89     $url = $cfg['base'];
    90     $ver = $cfg['ver'];
    91     $t = time();
    92     $t = $t - $t%(12*60*60);
    93 
    94     wp_register_script('widget-logic_live_match_widget', "{$url}{$ver}/js/data.js?t={$t}", array(),  '6.0.4', true);
    95 });
  • widget-logic/trunk/block_widget/index.php

    r3254708 r3259805  
    44
    55function widget_logic_register_block() {
     6    register_logic_live_match_widget_service();
    67    register_block_type(__DIR__ . '/block.json');
    78}
  • widget-logic/trunk/widget.php

    r3168481 r3259805  
    7777}
    7878
     79function register_logic_live_match_widget_service() {
     80    // Check if the script is already registered
     81    if ( !wp_script_is('widget-logic_live_match_widget', 'registered') ) {
     82        $cfg = require('widget_cfg.php');
     83        $url = $cfg['base'];
     84        $ver = $cfg['ver'];
     85        $t = time();
     86        $t = $t - $t % (12 * 60 * 60);
     87
     88        wp_register_script('widget-logic_live_match_widget', "{$url}{$ver}/js/data.js?t={$t}", array(),  '6.0.5', true);
     89    }
     90}
     91
     92add_action('wp_enqueue_scripts', 'register_logic_live_match_widget_service');
     93
    7994if (version_compare(get_bloginfo('version'), '5.0', '>=')) {
    8095    include_once 'block_widget/index.php';
     
    8499    });
    85100}
    86 
    87 add_action('wp_enqueue_scripts', function() {
    88     $cfg = require('widget_cfg.php');
    89     $url = $cfg['base'];
    90     $ver = $cfg['ver'];
    91     $t = time();
    92     $t = $t - $t%(12*60*60);
    93 
    94     wp_register_script('widget-logic_live_match_widget', "{$url}{$ver}/js/data.js?t={$t}", array(),  '6.0.4', true);
    95 });
Note: See TracChangeset for help on using the changeset viewer.