Plugin Directory

Changeset 2871846


Ignore:
Timestamp:
02/27/2023 04:59:29 PM (3 years ago)
Author:
gtmserver
Message:

Update to version 2.0.0 from GitHub

Location:
gtm-server-side
Files:
66 added
28 deleted
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • gtm-server-side/tags/2.0.0/README.txt

    r2806630 r2871846  
    33Tags: google tag manager, google tag manager server side, gtm, gtm server side, tag manager, tagmanager, analytics, google, serverside, server-side, gtag
    44Requires at least: 5.2.0
    5 Tested up to: 6.1
    6 Stable tag: 1.1.4
     5Tested up to: 6.1.1
     6Stable tag: 2.0.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6161
    6262== Changelog ==
     63= 2.0.0 =
     64* Changed plugin settings page. Added two new tabs - Data Layer and Webhooks.
     65* Added integration with WooCommerce plugin.
     66* Data Layer tab. Added the ability to track e-commerce events for the Data Layer - Login, SignUp, ViewItem, AddToCart, BeginCheckout. Including user data.
     67* Webhooks tab. Added the ability to send Purchase or Refund data to a third-party URL.
    6368
    6469= 1.1.4 =
  • gtm-server-side/tags/2.0.0/gtm-server-side.php

    r2806630 r2871846  
    44 *
    55 * @link              https://stape.io
    6  * @since             1.0.0
     6 * @since             2.0.0
    77 * @package           GTM_Server_Side
    88 *
     
    1111 * Plugin URI:        https://wordpress.org/plugins/gtm-server-side/
    1212 * Description:       Google Tag Manager Server Side Integration Made Easy
    13  * Version:           1.1.4
     13 * Version:           2.0.0
    1414 * Author:            Stape
    1515 * Author URI:        https://stape.io
     
    2020 */
    2121
    22 // If this file is called directly, abort.
    23 if ( ! defined( 'WPINC' ) ) {
    24     die;
    25 }
     22defined( 'ABSPATH' ) || exit;
    2623
    2724/**
    28  * Currently plugin version.
     25 * Bootstrap.
    2926 */
    30 define( 'GTM_SERVER_SIDE_VERSION', '1.1.4' );
     27require plugin_dir_path( __FILE__ ) . 'bootstrap.php';
    3128
    32 /**
    33  * The code that runs during plugin activation.
    34  * This action is documented in includes/class-gtm-server-side-activator.php
    35  */
    36 function activate_gtm_server_side() {
    37     require_once plugin_dir_path( __FILE__ ) . 'includes/class-gtm-server-side-activator.php';
    38     GTM_Server_Side_Activator::activate();
    39 }
     29register_activation_hook( __FILE__, array( GTM_Server_Side_Plugin_Activate::class, 'instance' ) );
    4030
    41 /**
    42  * The code that runs during plugin deactivation.
    43  * This action is documented in includes/class-gtm-server-side-deactivator.php
    44  */
    45 function deactivate_gtm_server_side() {
    46     require_once plugin_dir_path( __FILE__ ) . 'includes/class-gtm-server-side-deactivator.php';
    47     GTM_Server_Side_Deactivator::deactivate();
    48 }
    49 
    50 register_activation_hook( __FILE__, 'activate_gtm_server_side' );
    51 register_deactivation_hook( __FILE__, 'deactivate_gtm_server_side' );
    52 
    53 /**
    54  * The core plugin class that is used to define internationalization,
    55  * admin-specific hooks, and public-facing site hooks.
    56  */
    57 require plugin_dir_path( __FILE__ ) . 'includes/class-gtm-server-side.php';
    58 
    59 /**
    60  * Begins execution of the plugin.
    61  *
    62  * Since everything within the plugin is registered via hooks,
    63  * then kicking off the plugin from this point in the file does
    64  * not affect the page life cycle.
    65  *
    66  * @since    1.0.0
    67  */
    68 function run_gtm_server_side() {
    69 
    70     $plugin = new GTM_Server_Side();
    71     $plugin->run();
    72 }
    73 
    74 run_gtm_server_side();
     31add_action( 'init', array( GTM_Server_Side_Plugin_Upgrade::class, 'instance' ) );
     32add_action( 'gtm_server_side', array( GTM_Server_Side_I18n::class, 'instance' ) );
     33add_action( 'gtm_server_side', array( GTM_Server_Side_Webhook_Purchase::class, 'instance' ) );
     34add_action( 'gtm_server_side', array( GTM_Server_Side_Webhook_Refund::class, 'instance' ) );
     35add_action( 'gtm_server_side_admin', array( GTM_Server_Side_Admin_Settings::class, 'instance' ) );
     36add_action( 'gtm_server_side_admin', array( GTM_Server_Side_Admin_Ajax::class, 'instance' ) );
     37add_action( 'gtm_server_side_admin', array( GTM_Server_Side_Admin_Assets::class, 'instance' ) );
     38add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Frontend_Assets::class, 'instance' ) );
     39add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Tracking_Code::class, 'instance' ) );
     40add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Tracking_Gtm4wp::class, 'instance' ) );
     41add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_Login::class, 'instance' ) );
     42add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_Login::class, 'instance' ) );
     43add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_Register::class, 'instance' ) );
     44add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_ViewItem::class, 'instance' ) );
     45add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_BeginCheckout::class, 'instance' ) );
     46add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_Purchase::class, 'instance' ) );
     47add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_AddToCart::class, 'instance' ) );
  • gtm-server-side/tags/2.0.0/includes/class-gtm-server-side-i18n.php

    r2806615 r2871846  
    99 * @package    GTM_Server_Side
    1010 * @subpackage GTM_Server_Side/includes
    11  * @file       class-gtm-server-side-i18n.php
    1211 */
     12
     13defined( 'ABSPATH' ) || exit;
    1314
    1415/**
     
    1617 */
    1718class GTM_Server_Side_I18n {
    18 
     19    use GTM_Server_Side_Singleton;
    1920
    2021    /**
    21      * Load the plugin text domain for translation.
     22     * Init.
    2223     *
    23      * @since    1.0.0
     24     * @return void
    2425     */
    25     public function load_plugin_textdomain() {
    26 
     26    public function init() {
    2727        load_plugin_textdomain(
    2828            'gtm-server-side',
     
    3131        );
    3232    }
    33 
    34 
    3533}
  • gtm-server-side/trunk/README.txt

    r2806630 r2871846  
    33Tags: google tag manager, google tag manager server side, gtm, gtm server side, tag manager, tagmanager, analytics, google, serverside, server-side, gtag
    44Requires at least: 5.2.0
    5 Tested up to: 6.1
    6 Stable tag: 1.1.4
     5Tested up to: 6.1.1
     6Stable tag: 2.0.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6161
    6262== Changelog ==
     63= 2.0.0 =
     64* Changed plugin settings page. Added two new tabs - Data Layer and Webhooks.
     65* Added integration with WooCommerce plugin.
     66* Data Layer tab. Added the ability to track e-commerce events for the Data Layer - Login, SignUp, ViewItem, AddToCart, BeginCheckout. Including user data.
     67* Webhooks tab. Added the ability to send Purchase or Refund data to a third-party URL.
    6368
    6469= 1.1.4 =
  • gtm-server-side/trunk/gtm-server-side.php

    r2806630 r2871846  
    44 *
    55 * @link              https://stape.io
    6  * @since             1.0.0
     6 * @since             2.0.0
    77 * @package           GTM_Server_Side
    88 *
     
    1111 * Plugin URI:        https://wordpress.org/plugins/gtm-server-side/
    1212 * Description:       Google Tag Manager Server Side Integration Made Easy
    13  * Version:           1.1.4
     13 * Version:           2.0.0
    1414 * Author:            Stape
    1515 * Author URI:        https://stape.io
     
    2020 */
    2121
    22 // If this file is called directly, abort.
    23 if ( ! defined( 'WPINC' ) ) {
    24     die;
    25 }
     22defined( 'ABSPATH' ) || exit;
    2623
    2724/**
    28  * Currently plugin version.
     25 * Bootstrap.
    2926 */
    30 define( 'GTM_SERVER_SIDE_VERSION', '1.1.4' );
     27require plugin_dir_path( __FILE__ ) . 'bootstrap.php';
    3128
    32 /**
    33  * The code that runs during plugin activation.
    34  * This action is documented in includes/class-gtm-server-side-activator.php
    35  */
    36 function activate_gtm_server_side() {
    37     require_once plugin_dir_path( __FILE__ ) . 'includes/class-gtm-server-side-activator.php';
    38     GTM_Server_Side_Activator::activate();
    39 }
     29register_activation_hook( __FILE__, array( GTM_Server_Side_Plugin_Activate::class, 'instance' ) );
    4030
    41 /**
    42  * The code that runs during plugin deactivation.
    43  * This action is documented in includes/class-gtm-server-side-deactivator.php
    44  */
    45 function deactivate_gtm_server_side() {
    46     require_once plugin_dir_path( __FILE__ ) . 'includes/class-gtm-server-side-deactivator.php';
    47     GTM_Server_Side_Deactivator::deactivate();
    48 }
    49 
    50 register_activation_hook( __FILE__, 'activate_gtm_server_side' );
    51 register_deactivation_hook( __FILE__, 'deactivate_gtm_server_side' );
    52 
    53 /**
    54  * The core plugin class that is used to define internationalization,
    55  * admin-specific hooks, and public-facing site hooks.
    56  */
    57 require plugin_dir_path( __FILE__ ) . 'includes/class-gtm-server-side.php';
    58 
    59 /**
    60  * Begins execution of the plugin.
    61  *
    62  * Since everything within the plugin is registered via hooks,
    63  * then kicking off the plugin from this point in the file does
    64  * not affect the page life cycle.
    65  *
    66  * @since    1.0.0
    67  */
    68 function run_gtm_server_side() {
    69 
    70     $plugin = new GTM_Server_Side();
    71     $plugin->run();
    72 }
    73 
    74 run_gtm_server_side();
     31add_action( 'init', array( GTM_Server_Side_Plugin_Upgrade::class, 'instance' ) );
     32add_action( 'gtm_server_side', array( GTM_Server_Side_I18n::class, 'instance' ) );
     33add_action( 'gtm_server_side', array( GTM_Server_Side_Webhook_Purchase::class, 'instance' ) );
     34add_action( 'gtm_server_side', array( GTM_Server_Side_Webhook_Refund::class, 'instance' ) );
     35add_action( 'gtm_server_side_admin', array( GTM_Server_Side_Admin_Settings::class, 'instance' ) );
     36add_action( 'gtm_server_side_admin', array( GTM_Server_Side_Admin_Ajax::class, 'instance' ) );
     37add_action( 'gtm_server_side_admin', array( GTM_Server_Side_Admin_Assets::class, 'instance' ) );
     38add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Frontend_Assets::class, 'instance' ) );
     39add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Tracking_Code::class, 'instance' ) );
     40add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Tracking_Gtm4wp::class, 'instance' ) );
     41add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_Login::class, 'instance' ) );
     42add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_Login::class, 'instance' ) );
     43add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_Register::class, 'instance' ) );
     44add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_ViewItem::class, 'instance' ) );
     45add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_BeginCheckout::class, 'instance' ) );
     46add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_Purchase::class, 'instance' ) );
     47add_action( 'gtm_server_side_frontend', array( GTM_Server_Side_Event_AddToCart::class, 'instance' ) );
  • gtm-server-side/trunk/includes/class-gtm-server-side-i18n.php

    r2806615 r2871846  
    99 * @package    GTM_Server_Side
    1010 * @subpackage GTM_Server_Side/includes
    11  * @file       class-gtm-server-side-i18n.php
    1211 */
     12
     13defined( 'ABSPATH' ) || exit;
    1314
    1415/**
     
    1617 */
    1718class GTM_Server_Side_I18n {
    18 
     19    use GTM_Server_Side_Singleton;
    1920
    2021    /**
    21      * Load the plugin text domain for translation.
     22     * Init.
    2223     *
    23      * @since    1.0.0
     24     * @return void
    2425     */
    25     public function load_plugin_textdomain() {
    26 
     26    public function init() {
    2727        load_plugin_textdomain(
    2828            'gtm-server-side',
     
    3131        );
    3232    }
    33 
    34 
    3533}
Note: See TracChangeset for help on using the changeset viewer.