Plugin Directory

Changeset 2690508


Ignore:
Timestamp:
03/08/2022 04:20:27 AM (4 years ago)
Author:
flippy101
Message:

Analytics Cat 1.1.0

Location:
analytics-cat/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • analytics-cat/trunk/fca-ga.php

    r2479486 r2690508  
    99    Author URI: https://fatcatapps.com/
    1010    License: GPLv2
    11     Version: 1.0.9
     11    Version: 1.1.0
    1212*/
    1313
     
    2121   
    2222    //DEFINE SOME USEFUL CONSTANTS
    23     define( 'FCA_GA_PLUGIN_VER', '1.0.9' );
     23    define( 'FCA_GA_PLUGIN_VER', '1.1.0' );
    2424    define( 'FCA_GA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    2525    define( 'FCA_GA_PLUGINS_URL', plugins_url( '', __FILE__ ) );
     
    5252       
    5353        $options = get_option( 'fca_ga', true );
    54         $id = empty ( $options['id'] ) ? '' : $options['id'];
     54        $id = empty ( $options['id'] ) ? '' : esc_attr( $options['id'] );
    5555        $atts = apply_filters( 'fca_ga_attributes', '' );
    5656        $exclude = empty ( $options['exclude'] ) ? array() : $options['exclude'];
    5757        $do_script = count( array_intersect( array_map( 'strtolower', $roles), array_map( 'strtolower', $exclude ) ) ) == 0;
    5858               
    59         if ( !empty( $options['id'] ) && $do_script ) {
     59        if ( $id && $do_script ) {
    6060           
    6161            ob_start(); ?>
     
    9292    function fca_ga_input ( $name, $placeholder = '', $value = '', $type = 'text' ) {
    9393   
     94        $name = esc_attr( $name );
     95        $placeholder = esc_attr( $placeholder );
     96        $value = esc_attr( $value );
     97
    9498        $html = "<div class='fca-ga-field fca-ga-field-$type'>";
    9599       
  • analytics-cat/trunk/includes/editor/editor.php

    r2324099 r2690508  
    5151   
    5252    if ( isSet( $_POST['fca_ga_save'] ) ) {
     53
     54        $nonce = sanitize_text_field( $_POST['fca_ga']['nonce'] );
     55
     56        if( wp_verify_nonce( $nonce, 'fca_ga_admin_nonce' ) === false ){
     57            wp_die( 'Unauthorized, please log in and try again.' );
     58        }
     59
    5360        fca_ga_settings_save();
    5461        fca_ga_admin_notice_save();     
     
    6168   
    6269    $html = '<form style="display: none" action="" method="post" id="fca_ga_main_form">';
     70
     71        $html .= wp_nonce_field( 'fca_ga_admin_nonce', 'fca_ga[nonce]' );
    6372       
    6473        $html .= '<h1>' .  __('Google Analytics by Fatcat Apps', 'fca-ga') . '</h1>';
  • analytics-cat/trunk/readme.txt

    r2664130 r2690508  
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    11 Stable tag: 1.0.9
     11Stable tag: 1.1.0
    1212
    1313Analytics Cat - Google Analytics Lets You Add Your Google Analytics / Universal Analytics Tracking Code To Your Site With Ease.
     
    123123== Changelog ==
    124124
     125= Analytics Cat - Google Analytics 1.1.0 =
     126* Improved security for Editor page
     127* Tested up to WordPress 5.9.1
     128
    125129= Analytics Cat - Google Analytics 1.0.9 =
    126130* Updated feedback form
Note: See TracChangeset for help on using the changeset viewer.