Changeset 1360586
- Timestamp:
- 02/29/2016 09:17:09 AM (10 years ago)
- Location:
- stetic/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
stetic.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
stetic/trunk/readme.txt
r1197784 r1360586 3 3 Tags: analytics, statistics, stats, tracking, widget, pageviews, visits, counter, visitors 4 4 Requires at least: 3.3 5 Tested up to: 4. 25 Tested up to: 4.4 6 6 Stable tag: trunk 7 7 … … 59 59 == Changelog == 60 60 61 = 1.0.3 = 62 * Limit viewing of the stats to users, who can edit the dashboard 63 64 = 1.0.2 = 65 * PHP short open tag fix. 66 61 67 = 1.0.0 = 62 68 * Initial version -
stetic/trunk/stetic.php
r1197826 r1360586 5 5 Description: Adds real-time Web Analytics from Stetic with event tracking of all important actions to Wordpress. It comes with a dashboard to show you the important reports and numbers. 6 6 Author: Stetic 7 Version: 1.0. 27 Version: 1.0.3 8 8 Author URI: https://www.stetic.com/ 9 9 */ … … 32 32 add_action( 'admin_menu', array( $this, 'add_page_to_navi' ) ); 33 33 34 if ( empty($GLOBALS['pagenow']) or ( !empty($GLOBALS['pagenow']) && $GLOBALS['pagenow'] == 'index.php' ) )34 if ( empty($GLOBALS['pagenow']) or ( !empty($GLOBALS['pagenow']) && $GLOBALS['pagenow'] == 'index.php' ) && current_user_can('edit_dashboard') ) 35 35 { 36 36 add_action( … … 92 92 { 93 93 global $wpdb; 94 if ( function_exists('add_options_page') )94 if ( function_exists('add_options_page') && current_user_can('edit_dashboard') ) 95 95 { 96 96 add_options_page('stetic', 'Stetic', 'manage_options', 'stetic/stetic.php&tab=settings', array('Stetic', 'config_page')); 97 97 } 98 98 99 if ( function_exists('add_menu_page') )99 if ( function_exists('add_menu_page') && current_user_can('edit_dashboard') ) 100 100 { 101 101 add_menu_page('stetic', 'Stetic', 'read', __FILE__, array( 'Stetic', 'stats_page' ), plugins_url('stetic/img/icon.png')); … … 133 133 public static function stats_page() 134 134 { 135 if( ! current_user_can('edit_dashboard') ) 136 { 137 return; 138 } 139 135 140 if(isset($_POST['submit'])) 136 141 { … … 209 214 210 215 wp_enqueue_style('stetic-css', 211 plugins_url('css/stetic.css', __FILE__),212 false,213 $plugin_info['Version'],214 false);216 plugins_url('css/stetic.css', __FILE__), 217 false, 218 $plugin_info['Version'], 219 false); 215 220 ?> 216 221 <div class="wrap"> … … 271 276 public static function add_dashboard_stats() 272 277 { 273 if ( !current_user_can('level_8') ) { 278 if ( !current_user_can('edit_dashboard') ) 279 { 274 280 return; 275 281 } … … 304 310 305 311 wp_enqueue_style('stetic-css', 306 plugins_url('css/dashboard.css', __FILE__),307 false,308 $plugin_info['Version'],309 false);312 plugins_url('css/dashboard.css', __FILE__), 313 false, 314 $plugin_info['Version'], 315 false); 310 316 311 317 } … … 320 326 public static function show_dashboard_stats() 321 327 { 328 if ( !current_user_can('edit_dashboard') ) 329 { 330 return; 331 } 322 332 $options = get_option('stetic'); 323 333 ?>
Note: See TracChangeset
for help on using the changeset viewer.