Changeset 3047542
- Timestamp:
- 03/08/2024 12:52:34 AM (2 years ago)
- Location:
- jmitch-tinylytics
- Files:
-
- 4 edited
- 15 copied
-
tags/1.1.0 (copied) (copied from jmitch-tinylytics/trunk)
-
tags/1.1.0/css (copied) (copied from jmitch-tinylytics/trunk/css)
-
tags/1.1.0/css/style.css (copied) (copied from jmitch-tinylytics/trunk/css/style.css)
-
tags/1.1.0/inc (copied) (copied from jmitch-tinylytics/trunk/inc)
-
tags/1.1.0/inc/admin-settings.php (copied) (copied from jmitch-tinylytics/trunk/inc/admin-settings.php)
-
tags/1.1.0/inc/admin-shortcodes.php (copied) (copied from jmitch-tinylytics/trunk/inc/admin-shortcodes.php)
-
tags/1.1.0/inc/admin-support.php (copied) (copied from jmitch-tinylytics/trunk/inc/admin-support.php)
-
tags/1.1.0/inc/user-shortcodes.php (copied) (copied from jmitch-tinylytics/trunk/inc/user-shortcodes.php) (1 diff)
-
tags/1.1.0/index.php (copied) (copied from jmitch-tinylytics/trunk/index.php)
-
tags/1.1.0/jmitch-tinylytics.php (copied) (copied from jmitch-tinylytics/trunk/jmitch-tinylytics.php) (13 diffs)
-
tags/1.1.0/languages (copied) (copied from jmitch-tinylytics/trunk/languages)
-
tags/1.1.0/languages/jmitch-tinylytics.pot (copied) (copied from jmitch-tinylytics/trunk/languages/jmitch-tinylytics.pot) (2 diffs)
-
tags/1.1.0/license.txt (copied) (copied from jmitch-tinylytics/trunk/license.txt)
-
tags/1.1.0/readme.txt (copied) (copied from jmitch-tinylytics/trunk/readme.txt) (2 diffs)
-
tags/1.1.0/uninstall.php (copied) (copied from jmitch-tinylytics/trunk/uninstall.php)
-
trunk/inc/user-shortcodes.php (modified) (1 diff)
-
trunk/jmitch-tinylytics.php (modified) (13 diffs)
-
trunk/languages/jmitch-tinylytics.pot (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jmitch-tinylytics/tags/1.1.0/inc/user-shortcodes.php
r3039297 r3047542 70 70 $options = get_option( 'jmitch_tinylytics_settings' ); 71 71 $stats = $options['display_stats']; 72 $stats_label = $options['stats_label']; 72 73 $hits = $options['display_hits']; 73 74 $uptime = $options['display_uptime']; 74 75 if ( $stats && $hits ) { 75 $output .= '<span class="tiny_counter"><a href="" target="_blank" class="tinylytics_public_stats">' . esc_html__( 'My Stats', 'jmitch-tinylytics' ) . '</a>: <span class="tinylytics_hits"></span></span>'; 76 if ( $stats_label == '' || $stats_label == NULL ) { 77 $stats_label = esc_html__( 'My Stats', 'jmitch-tinylytics' ); 78 } 79 $output .= '<span class="tiny_counter"><a href="" target="_blank" class="tinylytics_public_stats">' . $stats_label . '</a>: <span class="tinylytics_hits"></span></span>'; 76 80 } 77 81 else if ( $hits ) { -
jmitch-tinylytics/tags/1.1.0/jmitch-tinylytics.php
r3039479 r3047542 3 3 * Plugin Name: Tinylytics 4 4 * Plugin URI: https://jimmitchell.org/tinylytics-wp-plugin/ 5 * Description: A simple plugin for embedding the Tinylytics script.6 * Tags: analytics, ga, google, google analytics, tracking, statistics, stats 5 * Description: A simple plugin to embed a <a href="https://tinylytics.app">Tinylytics</a> tracking script to your site. 6 * Tags: analytics, ga, google, google analytics, tracking, statistics, stats, hits 7 7 * Author: Jim Mitchell 8 8 * Author URI: https://jimmitchell.org … … 10 10 * Requires at least: 4.6 11 11 * Test up to: 6.4.3 12 * Version: 1. 0.612 * Version: 1.1.0 13 13 * Requires PHP: 5.6.20 14 14 * Text Domain: jmitch-tinylytics … … 34 34 */ 35 35 36 if ( ! defined( 'ABSPATH' )) die();37 38 define( 'TINYLYTICS__VERSION', '1. 0.6' );36 if ( ! defined( 'ABSPATH' )) die(); 37 38 define( 'TINYLYTICS__VERSION', '1.1.0' ); 39 39 40 40 // Hook functions into WordPress 41 add_action( 'init', 'jmitch_tinylytics_start_session', 1 ); 42 add_action( 'init', 'jmitch_tinylytics_load_i18n' ); 41 43 add_action( 'admin_init', 'jmitch_tinylytics_register_settings' ); 42 44 add_action( 'admin_menu', 'jmitch_tinylytics_add_menu_page' ); 43 add_action( 'init', 'jmitch_tinylytics_load_i18n' ); 45 add_action( 'wp_logout', 'jmitch_tinylytics_end_session' ); 46 add_action( 'wp_login', 'jmitch_tinylytics_end_session' ); 44 47 45 48 // Register the settings … … 52 55 53 56 add_settings_field( 'site_id', esc_html__( 'Site ID','jmitch-tinylytics' ), 'jmitch_tinylytics_site_id_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_general_section' ); 54 add_settings_field( 'display_hits', esc_html__( 'Display hits?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_hits_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 57 add_settings_field( 'ignore_hits', esc_html__( 'Ignore admin hits?','jmitch-tinylytics' ), 'jmitch_tinylytics_ignore_hits_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 58 add_settings_field( 'display_hits', esc_html__( 'Display visitor hits?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_hits_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 55 59 add_settings_field( 'display_stats', esc_html__( 'Link to your public stats?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_stats_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 60 add_settings_field( 'stats_label', esc_html__( 'Public stats label','jmitch-tinylytics' ), 'jmitch_tinylytics_stats_label_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 56 61 add_settings_field( 'display_uptime', esc_html__( 'Display uptime?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_uptime_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 57 62 add_settings_field( 'display_kudos', esc_html__( 'Display Kudos?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_kudos_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); … … 73 78 } 74 79 80 if ( isset( $input['stats_label'] ) ) { 81 $sanitized_input['stats_label'] = sanitize_text_field( $input['stats_label'] ); 82 } 83 75 84 if ( isset( $input['kudos_label'] ) ) { 76 85 $sanitized_input['kudos_label'] = sanitize_text_field( $input['kudos_label'] ); … … 81 90 } 82 91 92 $sanitized_input['ignore_hits'] = isset( $input['ignore_hits'] ) ? true : false; 83 93 $sanitized_input['display_hits'] = isset( $input['display_hits'] ) ? true : false; 84 94 $sanitized_input['display_stats'] = isset( $input['display_stats'] ) ? true : false; … … 110 120 111 121 $options = get_option( 'jmitch_tinylytics_settings' ); 112 echo '<input type="text" id="site_id" size="40" name="jmitch_tinylytics_settings[site_id]" placeholder="' . esc_html__( 'Enter your Tinylytics unique site id...','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['site_id'] ?? '' ) . '" />'; 122 echo '<input type="text" id="site_id" size="50" name="jmitch_tinylytics_settings[site_id]" placeholder="' . esc_html__( 'Enter your Tinylytics unique site id...','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['site_id'] ?? '' ) . '" />'; 123 124 } 125 126 // Public stats label callback 127 function jmitch_tinylytics_stats_label_callback() { 128 129 $options = get_option( 'jmitch_tinylytics_settings' ); 130 echo '<input type="text" id="stats_label" size="50" name="jmitch_tinylytics_settings[stats_label]" placeholder="' . esc_html__( 'Add a custom public stats label','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['stats_label'] ?? '' ) . '" />'; 113 131 114 132 } … … 118 136 119 137 $options = get_option( 'jmitch_tinylytics_settings' ); 120 echo '<input type="text" id="kudos_label" size=" 40" name="jmitch_tinylytics_settings[kudos_label]" placeholder="' . esc_html__( 'Enter any combination of text or emoji 👋','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['kudos_label'] ?? '' ) . '" />';138 echo '<input type="text" id="kudos_label" size="50" name="jmitch_tinylytics_settings[kudos_label]" placeholder="' . esc_html__( 'Enter any combination of text or emoji 👋','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['kudos_label'] ?? '' ) . '" />'; 121 139 122 140 } … … 126 144 127 145 $options = get_option( 'jmitch_tinylytics_settings' ); 128 echo '<input type="text" id="webring_label" size="40" name="jmitch_tinylytics_settings[webring_label]" placeholder="' . esc_html__( 'Enter any combination of text or emoji 🕸️💍','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['webring_label'] ?? '' ) . '" />'; 146 echo '<input type="text" id="webring_label" size="50" name="jmitch_tinylytics_settings[webring_label]" placeholder="' . esc_html__( 'Enter any combination of text or emoji 🕸️💍','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['webring_label'] ?? '' ) . '" />'; 147 148 } 149 150 // Ignore Hits callback 151 function jmitch_tinylytics_ignore_hits_callback() { 152 153 $options = get_option( 'jmitch_tinylytics_settings' ); 154 echo '<input type="checkbox" id="ignore_hits" name="jmitch_tinylytics_settings[ignore_hits]" ' . checked( true, $options['ignore_hits'] ?? false, false ) . ' />'; 129 155 130 156 } … … 240 266 241 267 $options = get_option( 'jmitch_tinylytics_settings' ); 268 269 $ignore = false; 270 if( isset( $_SESSION['isAdmin'] ) && $options['ignore_hits'] == true ) { 271 $ignore = $_SESSION['isAdmin']; 272 } 242 273 243 274 if ( $options && esc_attr( $options['site_id'] ) != '' ) { … … 253 284 $avatars = $options['display_avatars']; 254 285 $flags = $options['display_flags']; 255 286 256 287 $script_url = "https://tinylytics.app/embed/{$site_id}.js?"; 288 $script_url .= $ignore ? 'ignore&' : ''; 257 289 $script_url .= $hits ? 'hits&' : ''; 258 290 $script_url .= $stats ? 'publicstats&' : ''; … … 279 311 add_action( 'wp_footer', 'jmitch_tinylytics_output_script' ); 280 312 313 281 314 // *** Enqueue user scripts 282 315 function jmitch_tinylytics_user_scripts() { … … 332 365 333 366 367 // *** Session management 368 function jmitch_tinylytics_start_session() { 369 if(!session_id()) { 370 session_start(); 371 } 372 if ( current_user_can( 'manage_options' ) ) { 373 $_SESSION[ 'isAdmin' ] = true; 374 } 375 } 376 function jmitch_tinylytics_end_session() { 377 session_destroy (); 378 } 379 380 334 381 // *** Wordpress shortcodes to use in posts and pages 335 382 include plugin_dir_path( __FILE__ ) . '/inc/user-shortcodes.php'; -
jmitch-tinylytics/tags/1.1.0/languages/jmitch-tinylytics.pot
r3037227 r3047542 15 15 "X-Generator: Loco https://localise.biz/" 16 16 17 #: jmitch-tinylytics.php:5 017 #: jmitch-tinylytics.php:53 18 18 msgid "General Settings" 19 19 msgstr "" 20 20 21 #: jmitch-tinylytics.php:5 121 #: jmitch-tinylytics.php:54 22 22 msgid "Tinylytics Options" 23 23 msgstr "" 24 24 25 #: jmitch-tinylytics.php:5 325 #: jmitch-tinylytics.php:56 26 26 msgid "Site ID" 27 27 msgstr "" 28 28 29 #: jmitch-tinylytics.php:5 430 msgid " Displayhits?"29 #: jmitch-tinylytics.php:57 30 msgid "Ignore admin hits?" 31 31 msgstr "" 32 32 33 #: jmitch-tinylytics.php:55 33 #: jmitch-tinylytics.php:58 34 msgid "Display visitor hits?" 35 msgstr "" 36 37 #: jmitch-tinylytics.php:59 34 38 msgid "Link to your public stats?" 35 39 msgstr "" 36 40 37 #: jmitch-tinylytics.php:56 41 #: jmitch-tinylytics.php:60 42 msgid "Public stats label" 43 msgstr "" 44 45 #: jmitch-tinylytics.php:61 38 46 msgid "Display uptime?" 39 47 msgstr "" 40 48 41 #: jmitch-tinylytics.php: 5749 #: jmitch-tinylytics.php:62 42 50 msgid "Display Kudos?" 43 51 msgstr "" 44 52 45 #: jmitch-tinylytics.php: 5853 #: jmitch-tinylytics.php:63 46 54 msgid "Kudos label" 47 55 msgstr "" 48 56 49 #: jmitch-tinylytics.php: 5957 #: jmitch-tinylytics.php:64 50 58 msgid "Display webring?" 51 59 msgstr "" 52 60 53 #: jmitch-tinylytics.php:6 061 #: jmitch-tinylytics.php:65 54 62 msgid "Webring label" 55 63 msgstr "" 56 64 57 #: jmitch-tinylytics.php:6 165 #: jmitch-tinylytics.php:66 58 66 msgid "Display webring avatars?" 59 67 msgstr "" 60 68 61 #: jmitch-tinylytics.php:6 269 #: jmitch-tinylytics.php:67 62 70 msgid "Display country flags?" 63 71 msgstr "" 64 72 65 #: jmitch-tinylytics.php: 9873 #: jmitch-tinylytics.php:108 66 74 msgid "Your unique site id can be found on your" 67 75 msgstr "" 68 76 69 #: jmitch-tinylytics.php: 9877 #: jmitch-tinylytics.php:108 70 78 msgid "site page" 71 79 msgstr "" 72 80 73 #: jmitch-tinylytics.php:1 0481 #: jmitch-tinylytics.php:114 74 82 msgid "These settings enable the various tracking features of" 75 83 msgstr "" 76 84 77 #: jmitch-tinylytics.php:1 1285 #: jmitch-tinylytics.php:122 78 86 msgid "Enter your Tinylytics unique site id..." 79 87 msgstr "" 80 88 81 #: jmitch-tinylytics.php:120 89 #: jmitch-tinylytics.php:130 90 msgid "Add a custom public stats label" 91 msgstr "" 92 93 #: jmitch-tinylytics.php:138 82 94 msgid "Enter any combination of text or emoji 👋" 83 95 msgstr "" 84 96 85 #: jmitch-tinylytics.php:1 2897 #: jmitch-tinylytics.php:146 86 98 msgid "Enter any combination of text or emoji 🕸️💍" 87 99 msgstr "" 88 100 89 #: jmitch-tinylytics.php:2 04101 #: jmitch-tinylytics.php:230 90 102 msgid "Settings Saved" 91 103 msgstr "" 92 104 93 #: jmitch-tinylytics.php:2 14105 #: jmitch-tinylytics.php:240 94 106 msgid "for" 95 107 msgstr "" 96 108 97 #: jmitch-tinylytics.php: 298109 #: jmitch-tinylytics.php:331 98 110 msgid "Settings" 99 111 msgstr "" 100 112 101 #: jmitch-tinylytics.php: 299113 #: jmitch-tinylytics.php:332 102 114 msgid "Donate" 103 115 msgstr "" … … 179 191 msgstr "" 180 192 181 #: user-shortcodes.php:7 5193 #: user-shortcodes.php:77 182 194 msgid "My Stats" 183 195 msgstr "" -
jmitch-tinylytics/tags/1.1.0/readme.txt
r3039479 r3047542 10 10 Requires at least: 4.6 11 11 Tested up to: 6.4.3 12 Stable tag: 1. 0.613 Version: 1. 0.612 Stable tag: 1.1.0 13 Version: 1.1.0 14 14 Requires PHP: 5.6.20 15 15 Text Domain: jmitch-tinylytics … … 142 142 If you like Tinylytics, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/jmitch-tinylytics/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you! 143 143 144 **Version 1.1.0 (02-21-2024)** 145 146 * Add option to ignore hits for WordPress admins who are logged into their site. 147 * Add the ability to set a custom link label when the display public stats option is enabled. 148 144 149 **Version 1.0.6 (02-21-2024)** 145 150 -
jmitch-tinylytics/trunk/inc/user-shortcodes.php
r3039297 r3047542 70 70 $options = get_option( 'jmitch_tinylytics_settings' ); 71 71 $stats = $options['display_stats']; 72 $stats_label = $options['stats_label']; 72 73 $hits = $options['display_hits']; 73 74 $uptime = $options['display_uptime']; 74 75 if ( $stats && $hits ) { 75 $output .= '<span class="tiny_counter"><a href="" target="_blank" class="tinylytics_public_stats">' . esc_html__( 'My Stats', 'jmitch-tinylytics' ) . '</a>: <span class="tinylytics_hits"></span></span>'; 76 if ( $stats_label == '' || $stats_label == NULL ) { 77 $stats_label = esc_html__( 'My Stats', 'jmitch-tinylytics' ); 78 } 79 $output .= '<span class="tiny_counter"><a href="" target="_blank" class="tinylytics_public_stats">' . $stats_label . '</a>: <span class="tinylytics_hits"></span></span>'; 76 80 } 77 81 else if ( $hits ) { -
jmitch-tinylytics/trunk/jmitch-tinylytics.php
r3039479 r3047542 3 3 * Plugin Name: Tinylytics 4 4 * Plugin URI: https://jimmitchell.org/tinylytics-wp-plugin/ 5 * Description: A simple plugin for embedding the Tinylytics script.6 * Tags: analytics, ga, google, google analytics, tracking, statistics, stats 5 * Description: A simple plugin to embed a <a href="https://tinylytics.app">Tinylytics</a> tracking script to your site. 6 * Tags: analytics, ga, google, google analytics, tracking, statistics, stats, hits 7 7 * Author: Jim Mitchell 8 8 * Author URI: https://jimmitchell.org … … 10 10 * Requires at least: 4.6 11 11 * Test up to: 6.4.3 12 * Version: 1. 0.612 * Version: 1.1.0 13 13 * Requires PHP: 5.6.20 14 14 * Text Domain: jmitch-tinylytics … … 34 34 */ 35 35 36 if ( ! defined( 'ABSPATH' )) die();37 38 define( 'TINYLYTICS__VERSION', '1. 0.6' );36 if ( ! defined( 'ABSPATH' )) die(); 37 38 define( 'TINYLYTICS__VERSION', '1.1.0' ); 39 39 40 40 // Hook functions into WordPress 41 add_action( 'init', 'jmitch_tinylytics_start_session', 1 ); 42 add_action( 'init', 'jmitch_tinylytics_load_i18n' ); 41 43 add_action( 'admin_init', 'jmitch_tinylytics_register_settings' ); 42 44 add_action( 'admin_menu', 'jmitch_tinylytics_add_menu_page' ); 43 add_action( 'init', 'jmitch_tinylytics_load_i18n' ); 45 add_action( 'wp_logout', 'jmitch_tinylytics_end_session' ); 46 add_action( 'wp_login', 'jmitch_tinylytics_end_session' ); 44 47 45 48 // Register the settings … … 52 55 53 56 add_settings_field( 'site_id', esc_html__( 'Site ID','jmitch-tinylytics' ), 'jmitch_tinylytics_site_id_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_general_section' ); 54 add_settings_field( 'display_hits', esc_html__( 'Display hits?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_hits_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 57 add_settings_field( 'ignore_hits', esc_html__( 'Ignore admin hits?','jmitch-tinylytics' ), 'jmitch_tinylytics_ignore_hits_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 58 add_settings_field( 'display_hits', esc_html__( 'Display visitor hits?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_hits_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 55 59 add_settings_field( 'display_stats', esc_html__( 'Link to your public stats?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_stats_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 60 add_settings_field( 'stats_label', esc_html__( 'Public stats label','jmitch-tinylytics' ), 'jmitch_tinylytics_stats_label_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 56 61 add_settings_field( 'display_uptime', esc_html__( 'Display uptime?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_uptime_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 57 62 add_settings_field( 'display_kudos', esc_html__( 'Display Kudos?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_kudos_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); … … 73 78 } 74 79 80 if ( isset( $input['stats_label'] ) ) { 81 $sanitized_input['stats_label'] = sanitize_text_field( $input['stats_label'] ); 82 } 83 75 84 if ( isset( $input['kudos_label'] ) ) { 76 85 $sanitized_input['kudos_label'] = sanitize_text_field( $input['kudos_label'] ); … … 81 90 } 82 91 92 $sanitized_input['ignore_hits'] = isset( $input['ignore_hits'] ) ? true : false; 83 93 $sanitized_input['display_hits'] = isset( $input['display_hits'] ) ? true : false; 84 94 $sanitized_input['display_stats'] = isset( $input['display_stats'] ) ? true : false; … … 110 120 111 121 $options = get_option( 'jmitch_tinylytics_settings' ); 112 echo '<input type="text" id="site_id" size="40" name="jmitch_tinylytics_settings[site_id]" placeholder="' . esc_html__( 'Enter your Tinylytics unique site id...','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['site_id'] ?? '' ) . '" />'; 122 echo '<input type="text" id="site_id" size="50" name="jmitch_tinylytics_settings[site_id]" placeholder="' . esc_html__( 'Enter your Tinylytics unique site id...','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['site_id'] ?? '' ) . '" />'; 123 124 } 125 126 // Public stats label callback 127 function jmitch_tinylytics_stats_label_callback() { 128 129 $options = get_option( 'jmitch_tinylytics_settings' ); 130 echo '<input type="text" id="stats_label" size="50" name="jmitch_tinylytics_settings[stats_label]" placeholder="' . esc_html__( 'Add a custom public stats label','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['stats_label'] ?? '' ) . '" />'; 113 131 114 132 } … … 118 136 119 137 $options = get_option( 'jmitch_tinylytics_settings' ); 120 echo '<input type="text" id="kudos_label" size=" 40" name="jmitch_tinylytics_settings[kudos_label]" placeholder="' . esc_html__( 'Enter any combination of text or emoji 👋','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['kudos_label'] ?? '' ) . '" />';138 echo '<input type="text" id="kudos_label" size="50" name="jmitch_tinylytics_settings[kudos_label]" placeholder="' . esc_html__( 'Enter any combination of text or emoji 👋','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['kudos_label'] ?? '' ) . '" />'; 121 139 122 140 } … … 126 144 127 145 $options = get_option( 'jmitch_tinylytics_settings' ); 128 echo '<input type="text" id="webring_label" size="40" name="jmitch_tinylytics_settings[webring_label]" placeholder="' . esc_html__( 'Enter any combination of text or emoji 🕸️💍','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['webring_label'] ?? '' ) . '" />'; 146 echo '<input type="text" id="webring_label" size="50" name="jmitch_tinylytics_settings[webring_label]" placeholder="' . esc_html__( 'Enter any combination of text or emoji 🕸️💍','jmitch-tinylytics' ) . '" value="' . esc_attr( $options['webring_label'] ?? '' ) . '" />'; 147 148 } 149 150 // Ignore Hits callback 151 function jmitch_tinylytics_ignore_hits_callback() { 152 153 $options = get_option( 'jmitch_tinylytics_settings' ); 154 echo '<input type="checkbox" id="ignore_hits" name="jmitch_tinylytics_settings[ignore_hits]" ' . checked( true, $options['ignore_hits'] ?? false, false ) . ' />'; 129 155 130 156 } … … 240 266 241 267 $options = get_option( 'jmitch_tinylytics_settings' ); 268 269 $ignore = false; 270 if( isset( $_SESSION['isAdmin'] ) && $options['ignore_hits'] == true ) { 271 $ignore = $_SESSION['isAdmin']; 272 } 242 273 243 274 if ( $options && esc_attr( $options['site_id'] ) != '' ) { … … 253 284 $avatars = $options['display_avatars']; 254 285 $flags = $options['display_flags']; 255 286 256 287 $script_url = "https://tinylytics.app/embed/{$site_id}.js?"; 288 $script_url .= $ignore ? 'ignore&' : ''; 257 289 $script_url .= $hits ? 'hits&' : ''; 258 290 $script_url .= $stats ? 'publicstats&' : ''; … … 279 311 add_action( 'wp_footer', 'jmitch_tinylytics_output_script' ); 280 312 313 281 314 // *** Enqueue user scripts 282 315 function jmitch_tinylytics_user_scripts() { … … 332 365 333 366 367 // *** Session management 368 function jmitch_tinylytics_start_session() { 369 if(!session_id()) { 370 session_start(); 371 } 372 if ( current_user_can( 'manage_options' ) ) { 373 $_SESSION[ 'isAdmin' ] = true; 374 } 375 } 376 function jmitch_tinylytics_end_session() { 377 session_destroy (); 378 } 379 380 334 381 // *** Wordpress shortcodes to use in posts and pages 335 382 include plugin_dir_path( __FILE__ ) . '/inc/user-shortcodes.php'; -
jmitch-tinylytics/trunk/languages/jmitch-tinylytics.pot
r3037227 r3047542 15 15 "X-Generator: Loco https://localise.biz/" 16 16 17 #: jmitch-tinylytics.php:5 017 #: jmitch-tinylytics.php:53 18 18 msgid "General Settings" 19 19 msgstr "" 20 20 21 #: jmitch-tinylytics.php:5 121 #: jmitch-tinylytics.php:54 22 22 msgid "Tinylytics Options" 23 23 msgstr "" 24 24 25 #: jmitch-tinylytics.php:5 325 #: jmitch-tinylytics.php:56 26 26 msgid "Site ID" 27 27 msgstr "" 28 28 29 #: jmitch-tinylytics.php:5 430 msgid " Displayhits?"29 #: jmitch-tinylytics.php:57 30 msgid "Ignore admin hits?" 31 31 msgstr "" 32 32 33 #: jmitch-tinylytics.php:55 33 #: jmitch-tinylytics.php:58 34 msgid "Display visitor hits?" 35 msgstr "" 36 37 #: jmitch-tinylytics.php:59 34 38 msgid "Link to your public stats?" 35 39 msgstr "" 36 40 37 #: jmitch-tinylytics.php:56 41 #: jmitch-tinylytics.php:60 42 msgid "Public stats label" 43 msgstr "" 44 45 #: jmitch-tinylytics.php:61 38 46 msgid "Display uptime?" 39 47 msgstr "" 40 48 41 #: jmitch-tinylytics.php: 5749 #: jmitch-tinylytics.php:62 42 50 msgid "Display Kudos?" 43 51 msgstr "" 44 52 45 #: jmitch-tinylytics.php: 5853 #: jmitch-tinylytics.php:63 46 54 msgid "Kudos label" 47 55 msgstr "" 48 56 49 #: jmitch-tinylytics.php: 5957 #: jmitch-tinylytics.php:64 50 58 msgid "Display webring?" 51 59 msgstr "" 52 60 53 #: jmitch-tinylytics.php:6 061 #: jmitch-tinylytics.php:65 54 62 msgid "Webring label" 55 63 msgstr "" 56 64 57 #: jmitch-tinylytics.php:6 165 #: jmitch-tinylytics.php:66 58 66 msgid "Display webring avatars?" 59 67 msgstr "" 60 68 61 #: jmitch-tinylytics.php:6 269 #: jmitch-tinylytics.php:67 62 70 msgid "Display country flags?" 63 71 msgstr "" 64 72 65 #: jmitch-tinylytics.php: 9873 #: jmitch-tinylytics.php:108 66 74 msgid "Your unique site id can be found on your" 67 75 msgstr "" 68 76 69 #: jmitch-tinylytics.php: 9877 #: jmitch-tinylytics.php:108 70 78 msgid "site page" 71 79 msgstr "" 72 80 73 #: jmitch-tinylytics.php:1 0481 #: jmitch-tinylytics.php:114 74 82 msgid "These settings enable the various tracking features of" 75 83 msgstr "" 76 84 77 #: jmitch-tinylytics.php:1 1285 #: jmitch-tinylytics.php:122 78 86 msgid "Enter your Tinylytics unique site id..." 79 87 msgstr "" 80 88 81 #: jmitch-tinylytics.php:120 89 #: jmitch-tinylytics.php:130 90 msgid "Add a custom public stats label" 91 msgstr "" 92 93 #: jmitch-tinylytics.php:138 82 94 msgid "Enter any combination of text or emoji 👋" 83 95 msgstr "" 84 96 85 #: jmitch-tinylytics.php:1 2897 #: jmitch-tinylytics.php:146 86 98 msgid "Enter any combination of text or emoji 🕸️💍" 87 99 msgstr "" 88 100 89 #: jmitch-tinylytics.php:2 04101 #: jmitch-tinylytics.php:230 90 102 msgid "Settings Saved" 91 103 msgstr "" 92 104 93 #: jmitch-tinylytics.php:2 14105 #: jmitch-tinylytics.php:240 94 106 msgid "for" 95 107 msgstr "" 96 108 97 #: jmitch-tinylytics.php: 298109 #: jmitch-tinylytics.php:331 98 110 msgid "Settings" 99 111 msgstr "" 100 112 101 #: jmitch-tinylytics.php: 299113 #: jmitch-tinylytics.php:332 102 114 msgid "Donate" 103 115 msgstr "" … … 179 191 msgstr "" 180 192 181 #: user-shortcodes.php:7 5193 #: user-shortcodes.php:77 182 194 msgid "My Stats" 183 195 msgstr "" -
jmitch-tinylytics/trunk/readme.txt
r3039479 r3047542 10 10 Requires at least: 4.6 11 11 Tested up to: 6.4.3 12 Stable tag: 1. 0.613 Version: 1. 0.612 Stable tag: 1.1.0 13 Version: 1.1.0 14 14 Requires PHP: 5.6.20 15 15 Text Domain: jmitch-tinylytics … … 142 142 If you like Tinylytics, please take a moment to [give a 5-star rating](https://wordpress.org/support/plugin/jmitch-tinylytics/reviews/?rate=5#new-post). It helps to keep development and support going strong. Thank you! 143 143 144 **Version 1.1.0 (02-21-2024)** 145 146 * Add option to ignore hits for WordPress admins who are logged into their site. 147 * Add the ability to set a custom link label when the display public stats option is enabled. 148 144 149 **Version 1.0.6 (02-21-2024)** 145 150
Note: See TracChangeset
for help on using the changeset viewer.