Plugin Directory

Changeset 1963299


Ignore:
Timestamp:
10/26/2018 07:33:09 AM (7 years ago)
Author:
wp-buddy
Message:

Added Gutenberg Block; Updated screenshots and images

Location:
google-analytics-opt-out/trunk
Files:
8 added
8 edited

Legend:

Unmodified
Added
Removed
  • google-analytics-opt-out/trunk

    • Property svn:ignore set to
      .idea
      node_modules
  • google-analytics-opt-out/trunk/google-analytics-opt-out.php

    r1880705 r1963299  
    44Plugin URI: https://wp-buddy.com/products/plugins/google-analytics-opt-out
    55Description: Provides an Opt-Out functionality for Google Analytics
    6 Version: 2.1.4
     6Version: 2.2.0
    77Author: WP-Buddy
    88Author URI: https://wp-buddy.com
  • google-analytics-opt-out/trunk/inc/admin.php

    r1809016 r1963299  
    112112
    113113add_action( 'admin_init', 'gaoop_import_from_old_version' );
     114
     115add_action( 'init', 'gaoop_gutenberg_init' );
     116
     117function gaoop_gutenberg_init() {
     118    if ( ! function_exists( 'register_block_type' ) ) {
     119        return;
     120    }
     121
     122    add_action( 'enqueue_block_editor_assets', 'gaoop_gutenberg_editor_assets' );
     123}
     124
     125function gaoop_gutenberg_editor_assets() {
     126    wp_enqueue_script(
     127        'gaoop-block',
     128        plugin_dir_url( GAOOP_FILE ) . 'js/opt-out-block.js',
     129        array( 'wp-blocks', 'wp-i18n', 'wp-element' ),
     130        filemtime( plugin_dir_path( GAOOP_FILE ) . 'js/opt-out-block.js' ),
     131        true
     132    );
     133   
     134    wp_add_inline_script(
     135        'gaoop-block',
     136        'wp.i18n.setLocaleData( ' . wp_json_encode( wp_get_jed_locale_data( 'gaoop' ) ) . ', "gaoop" );',
     137        'before'
     138    );
     139}
  • google-analytics-opt-out/trunk/inc/settings.php

    r1880699 r1963299  
    7777    register_setting( 'gaoop_options_page', 'gaoop_property', 'sanitize_text_field' );
    7878
    79     add_settings_field( 'gaoop_editor_button', __( 'Show Editor button', 'google-analytics-opt-out' ), 'gaoop_options_editor_button', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_editor_button' ) );
     79    add_settings_field( 'gaoop_editor_button', __( 'Show Editor button (Classic Editor)', 'google-analytics-opt-out' ), 'gaoop_options_editor_button', 'gaoop_options_page', 'gaoop_settings_section', array( 'label_for' => 'gaoop_options_editor_button' ) );
    8080    register_setting( 'gaoop_options_page', 'gaoop_editor_button', 'intval' );
    8181
  • google-analytics-opt-out/trunk/js/editor-button.js

    r1475587 r1963299  
    1515                title: 'Analytics Opt-Out',
    1616                cmd:   'wpb_analytics_opt_out',
    17                 image: url + '/../images/optout-editor-icon.png'
     17                image: url + '/../images/optout-editor-icon.svg'
    1818            } );
    1919
  • google-analytics-opt-out/trunk/readme.txt

    r1880705 r1963299  
    22Contributors: wp-buddy, floriansimeth
    33Donate link: https://wp-buddy.com/products/plugins/google-analytics-opt-out/
    4 Tags: google analytics, analytics, analytics opt-out, analytics opt out, monster insights, monster insight, yoast analytics
    5 Version: 2.1.4
    6 Stable tag: 2.1.4
     4Tags: google analytics opt-out, monster insights, gdpr
     5Version: 2.2.0
     6Stable tag: 2.2.0
    77Requires at least: 4.8.0
    88Requires PHP: 5.6.0
    9 Tested up to: 4.9.6
     9Tested up to: 5.0
    1010License: GPLv2
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1616== Description ==
    1717
    18 This plugin provides an Opt-Out functionality for Google Analytics by setting a cookie that prevents analytics.js to collect data.
     18This plugin provides an Opt-Out functionality for Google Analytics by setting a cookie that prevents analytics.js to collect data. The new GDPR rules requier an opt-out.
    1919
    20 Works perfectly together with the [Google Analytics by MonsterInsights Plugin](http://wordpress.org/plugins/google-analytics-for-wordpress/ "Google Analytics by MonsterInsights Plugin").
     20Works perfectly together with the [Google Analytics by MonsterInsights Plugin](http://wordpress.org/plugins/google-analytics-for-wordpress/ "Google Analytics by MonsterInsights Plugin"). However the plugin is not necessary to configure the opt-out feature. Just enter your UA-Code manually. That's it!
    2121
    2222The free and the pro version have now been merged together. So you now can have the option to activate a banner, too! Enjoy!
     
    3333== Screenshots ==
    3434
    35 1. The Opt-Out link can be added with this little button (shortcode)
     351. The Opt-Out link can be added with the Opt-Out block in WordPress new block editor (that came with version 5.0).
    3636
    37 2. This is how the code looks like
     372. If you're using the classic editor, click this little button to add the shortcode.
    3838
    39 3. This is the settings page
     393. This is how the code looks like
     40
     414. This is the settings page
    4042
    4143== Changelog ==
     44
     45= 2.2.0 =
     46* Added a block for WordPress' 5.0 new block editor.
    4247
    4348= 2.1.4 =
Note: See TracChangeset for help on using the changeset viewer.