Plugin Directory

Changeset 2070849


Ignore:
Timestamp:
04/18/2019 04:32:31 PM (7 years ago)
Author:
red8developers
Message:

Changing capability for which admin notices appear

Location:
tracking-script-manager/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tracking-script-manager/trunk/readme.txt

    r2061634 r2070849  
    44Tags: adwords, analytics, conversion pixel, conversion tracking, facebook pixel, google adwords, google analytics, google tag manager, Marketo tracking scripts, Hubspot tracking scripts, Pardot tracking script, Eloqua tracking script, javascript, pixel tracking, remarketing, retargeting, tracking code, tracking script
    55Requires at least: 3.0.1
    6 Tested up to: 5.1
    7 Stable tag: 2.0.3
     6Tested up to: 5.1.1
     7Stable tag: 2.0.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5555
    5656== Changelog ==
     57
     58= 2.0.4 =
     59* Changing capability for which admin notices appear
    5760
    5861= 2.0.3 =
  • tracking-script-manager/trunk/tracking-scripts-manager.php

    r2061228 r2070849  
    44    * Plugin URI: http://wordpress.org/plugins/tracking-script-manager/
    55    * Description: A plugin that allows you to add tracking scripts to your site.
    6     * Version: 2.0.3
     6    * Version: 2.0.4
    77    * Author: Red8 Interactive
    88    * Author URI: http://red8interactive.com
     
    144144                $is_processing = get_option('tsm_is_processing');
    145145                $has_tracking_scripts = ( $header_scripts || $page_scripts || $footer_scripts ) ? true : false;
     146                $is_admin = current_user_can('manage_options') ? true : false;
    146147               
    147                 if ( $has_tracking_scripts && $is_processing ) {
     148                if ( $has_tracking_scripts && $is_processing && $is_admin ) {
    148149                    $message = __( 'Your scripts are currently processing. This may take several minutes. If you don’t see all of your scripts please wait a moment and refresh the page.', TRACKING_SCRIPT_TEXTDOMAIN );
    149150                    $notice = sprintf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
     
    151152                }
    152153
    153                 if ( $has_tracking_scripts && ! $is_processing ) {
     154                if ( $has_tracking_scripts && ! $is_processing && $is_admin ) {
    154155                    $url = wp_nonce_url( admin_url('edit.php?post_type=r8_tracking_scripts&tsm_update_scripts=true&tsm_is_processing=true'), 'tsm_update_scripts' );
    155156                    $message = __( 'Tracking Scripts Manager has updated to a new version, click OK to update your scripts to the updated version.', TRACKING_SCRIPT_TEXTDOMAIN );
     
    433434                    'query_var'          => false,
    434435                    'rewrite'            => array( 'slug' => 'tracking-scripts' ),
    435                     'capability_type'    => 'post',
     436                    'capability_type'    => 'post',
     437                    'capabilities' => array(
     438                        'edit_post'          => 'manage_options',
     439                        'read_post'          => 'manage_options',
     440                        'delete_post'        => 'manage_options',
     441                        'edit_posts'         => 'manage_options',
     442                        'edit_others_posts'  => 'manage_options',
     443                        'delete_posts'       => 'manage_options',
     444                        'publish_posts'      => 'manage_options',
     445                        'read_private_posts' => 'manage_options'
     446                    ),
    436447                    'has_archive'        => false,
    437448                    'hierarchical'       => false,
Note: See TracChangeset for help on using the changeset viewer.