Changeset 3187645
- Timestamp:
- 11/13/2024 01:27:49 PM (17 months ago)
- Location:
- piwik-pro
- Files:
-
- 66 added
- 1 deleted
- 6 edited
-
assets/screenshot-1.png (modified) (previous)
-
tags/1.3.7 (added)
-
tags/1.3.7/.htaccess (added)
-
tags/1.3.7/AUTHORS.txt (added)
-
tags/1.3.7/LICENSE.txt (added)
-
tags/1.3.7/README.txt (added)
-
tags/1.3.7/autoload.php (added)
-
tags/1.3.7/classmap.php (added)
-
tags/1.3.7/includes (added)
-
tags/1.3.7/includes/Plugin.php (added)
-
tags/1.3.7/includes/Settings.php (added)
-
tags/1.3.7/includes/WooCommerce.php (added)
-
tags/1.3.7/includes/index.html (added)
-
tags/1.3.7/index.html (added)
-
tags/1.3.7/languages (added)
-
tags/1.3.7/languages/index.html (added)
-
tags/1.3.7/plugin.php (added)
-
tags/1.3.7/templates (added)
-
tags/1.3.7/templates/add.php (added)
-
tags/1.3.7/templates/async.php (added)
-
tags/1.3.7/templates/index.html (added)
-
tags/1.3.7/templates/link.php (added)
-
tags/1.3.7/templates/loop.php (added)
-
tags/1.3.7/templates/nonce.php (added)
-
tags/1.3.7/templates/product.php (added)
-
tags/1.3.7/templates/push.php (added)
-
tags/1.3.7/templates/remove.php (added)
-
tags/1.3.7/uninstall.php (added)
-
tags/1.3.7/vendor (added)
-
tags/1.3.7/vendor/clearcode (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/.gitignore (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/.htaccess (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/AUTHORS.txt (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/LICENSE.txt (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/README.md (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/composer.json (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/index.html (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/src (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/src/index.html (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/src/v6_1_3 (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/src/v6_1_3/Filterer.php (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/src/v6_1_3/Plugin.php (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/src/v6_1_3/Singleton.php (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/src/v6_1_3/Templater.php (added)
-
tags/1.3.7/vendor/clearcode/wordpress-framework/src/v6_1_3/index.html (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/.gitignore (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/.htaccess (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/AUTHORS.txt (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/LICENSE.txt (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/README.md (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/composer.json (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/index.html (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src/index.html (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src/v1_1_3 (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src/v1_1_3/Settings.php (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src/v1_1_3/index.html (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src/v1_1_3/templates (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src/v1_1_3/templates/index.html (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src/v1_1_3/templates/input.php (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src/v1_1_3/templates/menu.php (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src/v1_1_3/templates/page.php (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src/v1_1_3/templates/section.php (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src/v1_1_3/templates/select.php (added)
-
tags/1.3.7/vendor/clearcode/wordpress-settings/src/v1_1_3/templates/textarea.php (added)
-
trunk/README.txt (modified) (4 diffs)
-
trunk/includes/Plugin.php (modified) (3 diffs)
-
trunk/includes/Settings.php (modified) (1 diff)
-
trunk/includes/WooCommerce.php (modified) (1 diff)
-
trunk/plugin.php (modified) (1 diff)
-
trunk/templates/sync.php (deleted)
Legend:
- Unmodified
- Added
- Removed
-
piwik-pro/trunk/README.txt
r3146367 r3187645 3 3 Tags: Piwik PRO, Piwik, analytics, website stats, woocommerce 4 4 Requires at least: 5.7 5 Tested up to: 6. 6.16 Stable tag: 1.3. 65 Tested up to: 6.7 6 Stable tag: 1.3.7 7 7 Requires PHP: 7.4 8 8 License: GPLv3 … … 40 40 41 41 Make sure your WordPress theme has the `wp_body_open()` function right after the opening `<body>` tag, otherwise the container won't work. 42 43 = What's the difference between the containers? =44 45 * **Basic container (async):** This container holds your tracking code and is used to handle most tags.46 * **Additional container (sync):** Add this container if you want to use sync tags. It loads tags before the page content loads.47 42 48 43 = WooCommerce: Does this plugin automatically track ecommerce? = … … 92 87 3. Type in your **Site ID**. [Where to find it?](https://help.piwik.pro/support/questions/find-website-id/) 93 88 4. Leave **Basic container (async)** checked. This container holds your tracking code and is used to handle most tags. 94 5. Check **Additional container (sync)** if you want to add the container for sync tags. 95 6. Optionally rename the **Data layer**. 96 7. Click **Save changes**. 89 5. Optionally rename the **Data layer**. 90 6. Click **Save changes**. 97 91 98 92 = Multisite = … … 108 102 109 103 == Changelog == 104 105 = 1.3.7 = 106 **Release date: 13.11.2024** 107 108 * Info: Removed sync container. 109 * Test: Tested up to WordPress 6.7 110 110 111 111 = 1.3.6 = -
piwik-pro/trunk/includes/Plugin.php
r3146367 r3187645 35 35 'id' => '', 36 36 'layer' => 'dataLayer', 37 'sync' => false,38 37 'async' => true, 39 38 'woocommerce' => true … … 69 68 } 70 69 71 public function action_wp_head() {72 foreach ( [ 'url', 'id', 'layer', 'sync' ] as $key ) if ( ! $this->settings[ $key ] ) return;73 74 if ( strtotime( '2024-10-07' ) > time() )75 echo wp_get_inline_script_tag(76 ( $this->settings[ 'nonce' ] ? self::render( 'nonce', $this->settings ) : '' ) .77 self::render( 'sync', $this->settings ),78 $this->settings[ 'nonce' ] ? [ 'nonce' => $this->settings[ 'nonce' ] ] : []79 );80 }81 82 70 public function action_wp_body_open() { 83 71 foreach ( [ 'url', 'id', 'layer', 'async' ] as $key ) if ( ! $this->settings[ $key ] ) return; … … 90 78 91 79 public function action_wp_footer() { 92 foreach ( [ 'url', 'id', 'layer' ] as $key ) if ( ! $this->settings[ $key ] ) return; 93 if ( ! $this->settings[ 'sync' ] and ! $this->settings[ 'async' ] ) return; 80 foreach ( [ 'url', 'id', 'layer', 'async' ] as $key ) if ( ! $this->settings[ $key ] ) return; 94 81 95 82 echo wp_get_inline_script_tag( -
piwik-pro/trunk/includes/Settings.php
r3146367 r3187645 106 106 ] 107 107 ] 108 ], ( strtotime( '2024-10-07' ) > time() ) ? [ 109 'sync' => [ 110 'title' => '', 111 'default' => false, 112 'sanitize' => [ $this, 'sanitize_checkbox' ], 113 'render' => [ 114 'callback' => [ $this, 'render_checkbox' ], 115 'template' => 'input', 116 'args' => [ 117 'field' => 'sync', 118 'value' => true, 119 'atts' => [ 120 'type' => 'checkbox' 121 ], 122 'after' => Plugin::__( 'Additional container (sync)' ), 123 'description' => Plugin::__( 'Add this container if you want to use sync tags. It loads tags before the page content loads.' ) . '<br />' . 124 '<p><span class="notice notice-warning">' . Plugin::__( 'Support for the sync tags will be sunset on October 7, 2024. We recommend using async tags instead.' ) . '</span></p>' 125 ] 126 ] 127 ] 128 ] : [], [ 108 ], [ 129 109 'layer' => [ 130 110 'title' => Plugin::__( 'Data layer' ), -
piwik-pro/trunk/includes/WooCommerce.php
r2983740 r3187645 36 36 static public function enabled() { 37 37 if ( ! class_exists( 'WooCommerce' ) ) return false; 38 if ( ! Plugin::instance()->settings( 'sync' ) and ! Plugin::instance()->settings( 'async' ) ) return false; 39 foreach ( [ 'url', 'id', 'layer', 'woocommerce' ] as $key ) if ( ! Plugin::instance()->settings( $key ) ) return false; 38 foreach ( [ 'url', 'id', 'layer', 'async', 'woocommerce' ] as $key ) if ( ! Plugin::instance()->settings( $key ) ) return false; 40 39 41 40 return true; -
piwik-pro/trunk/plugin.php
r3146367 r3187645 5 5 * Plugin URI: https://wordpress.org/plugins/piwik-pro/ 6 6 * Description: Adds the Piwik PRO container (with tracking code) to your WordPress site. 7 * Version: 1.3. 67 * Version: 1.3.7 8 8 * Requires at least: 5.7 9 9 * Requires PHP: 7.4
Note: See TracChangeset
for help on using the changeset viewer.