Changeset 3039297
- Timestamp:
- 02/21/2024 03:32:51 PM (2 years ago)
- Location:
- jmitch-tinylytics
- Files:
-
- 12 edited
- 11 copied
-
tags/1.0.5 (copied) (copied from jmitch-tinylytics/trunk)
-
tags/1.0.5/css (copied) (copied from jmitch-tinylytics/trunk/css)
-
tags/1.0.5/css/style.css (modified) (1 diff)
-
tags/1.0.5/inc (copied) (copied from jmitch-tinylytics/trunk/inc)
-
tags/1.0.5/inc/admin-settings.php (modified) (1 diff)
-
tags/1.0.5/inc/admin-shortcodes.php (modified) (1 diff)
-
tags/1.0.5/inc/admin-support.php (copied) (copied from jmitch-tinylytics/trunk/inc/admin-support.php) (1 diff)
-
tags/1.0.5/inc/user-shortcodes.php (modified) (1 diff)
-
tags/1.0.5/index.php (copied) (copied from jmitch-tinylytics/trunk/index.php)
-
tags/1.0.5/jmitch-tinylytics.php (copied) (copied from jmitch-tinylytics/trunk/jmitch-tinylytics.php) (20 diffs)
-
tags/1.0.5/languages (copied) (copied from jmitch-tinylytics/trunk/languages)
-
tags/1.0.5/languages/jmitch-tinylytics.pot (copied) (copied from jmitch-tinylytics/trunk/languages/jmitch-tinylytics.pot)
-
tags/1.0.5/license.txt (copied) (copied from jmitch-tinylytics/trunk/license.txt)
-
tags/1.0.5/readme.txt (copied) (copied from jmitch-tinylytics/trunk/readme.txt) (2 diffs)
-
tags/1.0.5/uninstall.php (copied) (copied from jmitch-tinylytics/trunk/uninstall.php) (1 diff)
-
trunk/css/style.css (modified) (1 diff)
-
trunk/inc/admin-settings.php (modified) (1 diff)
-
trunk/inc/admin-shortcodes.php (modified) (1 diff)
-
trunk/inc/admin-support.php (modified) (1 diff)
-
trunk/inc/user-shortcodes.php (modified) (1 diff)
-
trunk/jmitch-tinylytics.php (modified) (20 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
jmitch-tinylytics/tags/1.0.5/css/style.css
r3035382 r3039297 1 .wp-admin .tiny-warning-message {2 color: crimson;3 font-weight: bold;4 text-decoration: underline;5 }6 1 .wp-admin .tab-content { 7 2 display: flex; -
jmitch-tinylytics/tags/1.0.5/inc/admin-settings.php
r3035382 r3039297 13 13 <form method="post" action="options.php"> 14 14 <?php 15 settings_fields( 'jmitch_tinylytics_settings_group');16 do_settings_sections( 'jmitch-tinylytics');15 settings_fields( 'jmitch_tinylytics_settings_group' ); 16 do_settings_sections( 'jmitch-tinylytics' ); 17 17 submit_button(); 18 18 ?> -
jmitch-tinylytics/tags/1.0.5/inc/admin-shortcodes.php
r3035382 r3039297 12 12 ?> 13 13 14 <h2><?php esc_html_e( 'Shortcodes', 'jmitch-tinylytics' ); ?></h2>14 <h2><?php esc_html_e( 'Shortcodes', 'jmitch-tinylytics' ); ?></h2> 15 15 16 <p>Tinylytics <?php esc_html_e( 'comes comes with a variety of shortcodes which can be embedded directly in a post, page, or theme block to reduce the need for extensive HTML customizations', 'jmitch-tinylytics' ); ?>.</p>16 <p>Tinylytics <?php esc_html_e( 'comes comes with a variety of shortcodes which can be embedded directly in a post, page, or theme block to reduce the need for extensive HTML customizations', 'jmitch-tinylytics' ); ?>.</p> 17 17 18 18 <table class="form-table" role="presentation" style="width:100%;"> 19 <tr><th style="width:20%;">[tinykudos]</th><td><?php esc_html_e( 'Displays an interactive button to track "kudos" given by readers. Best used directly in posts and pages', 'jmitch-tinylytics' ); ?>.</td></tr>20 <tr><th>[tinyhits]</th><td><?php esc_html_e( 'Displays a count of page loads of the page viewed. Best used directly in posts and pages', 'jmitch-tinylytics' ); ?>.</td></tr>21 <tr><th>[tinystats]</th><td><?php esc_html_e( 'Displays both overall site hits and uptime (Note: a Tinylytics subscription is required to display uptime). Best used in the footer of your site', 'jmitch-tinylytics' ); ?>.</td></tr>22 <tr><th>[tinywebring]</th><td><?php esc_html_e( 'Displays a random link to a Tinylytics webring site. Enabling the "Display webring avatars?" option will include the avatar if the site has one. Best used in the footer of your site', 'jmitch-tinylytics' ); ?>.</td></tr>23 <tr><th>[tinyflags]</th><td><?php esc_html_e( 'Displays flags from all the countries of site visitors. Best used in the footer of your site', 'jmitch-tinylytics' ); ?>.</td></tr>19 <tr><th style="width:20%;">[tinykudos]</th><td><?php esc_html_e( 'Displays an interactive button to track "kudos" given by readers. Best used directly in posts and pages', 'jmitch-tinylytics' ); ?>.</td></tr> 20 <tr><th>[tinyhits]</th><td><?php esc_html_e( 'Displays a count of page loads of the page viewed. Best used directly in posts and pages', 'jmitch-tinylytics' ); ?>.</td></tr> 21 <tr><th>[tinystats]</th><td><?php esc_html_e( 'Displays both overall site hits and uptime (Note: a Tinylytics subscription is required to display uptime). Best used in the footer of your site', 'jmitch-tinylytics' ); ?>.</td></tr> 22 <tr><th>[tinywebring]</th><td><?php esc_html_e( 'Displays a random link to a Tinylytics webring site. Enabling the "Display webring avatars?" option will include the avatar if the site has one. Best used in the footer of your site', 'jmitch-tinylytics' ); ?>.</td></tr> 23 <tr><th>[tinyflags]</th><td><?php esc_html_e( 'Displays flags from all the countries of site visitors. Best used in the footer of your site', 'jmitch-tinylytics' ); ?>.</td></tr> 24 24 </table> 25 25 26 <p><?php esc_html_e( 'Learn how to use the', 'jmitch-tinylytics' ); ?> <a href="https://wordpress.org/documentation/article/shortcode-block/" target="_blank"><?php esc_html_e( 'Shortcode Block','jmitch-tinylytics' ); ?></a> <?php esc_html_e( 'in your theme. More information about','jmitch-tinylytics' ); ?> <a href="https://tinylytics.app" target="_blank">Tinylytics</a> <?php esc_html_e( 'options can be found in the','jmitch-tinylytics' ); ?> <a href="https://tinylytics.app/docs" target="_blank"><?php esc_html_e( 'documentation','jmitch-tinylytics' ); ?></a>.</p>26 <p><?php esc_html_e( 'Learn how to use the', 'jmitch-tinylytics' ); ?> <a href="https://wordpress.org/documentation/article/shortcode-block/" target="_blank"><?php esc_html_e( 'Shortcode Block', 'jmitch-tinylytics' ); ?></a> <?php esc_html_e( 'in your theme. More information about', 'jmitch-tinylytics' ); ?> <a href="https://tinylytics.app" target="_blank">Tinylytics</a> <?php esc_html_e( 'options can be found in the', 'jmitch-tinylytics' ); ?> <a href="https://tinylytics.app/docs" target="_blank"><?php esc_html_e( 'documentation', 'jmitch-tinylytics' ); ?></a>.</p> -
jmitch-tinylytics/tags/1.0.5/inc/admin-support.php
r3037227 r3039297 12 12 ?> 13 13 14 <h2 style="text-align:center;"><?php esc_html_e( 'Your Support Matters', 'jmitch-tinylytics' ); ?></h2>14 <h2 style="text-align:center;"><?php esc_html_e( 'Your Support Matters', 'jmitch-tinylytics' ); ?></h2> 15 15 16 <p><?php esc_html_e( 'Though I freely provide this plugin to the WordPress community, consider making a small donation. A few bucks goes a long way towards making improvements', 'jmitch-tinylytics' ); ?>.</p>17 <p><strong><?php esc_html_e( 'Note:', 'jmitch-tinylytics' ); ?></strong> <?php esc_html_e( 'Making a donation gets you priority support if you need it','jmitch-tinylytics' ); ?>.</p>16 <p><?php esc_html_e( 'Though I freely provide this plugin to the WordPress community, consider making a small donation. A few bucks goes a long way towards making improvements', 'jmitch-tinylytics' ); ?>.</p> 17 <p><strong><?php esc_html_e( 'Note:', 'jmitch-tinylytics' ); ?></strong> <?php esc_html_e( 'Making a donation gets you priority support if you need it', 'jmitch-tinylytics' ); ?>.</p> 18 18 <p style="margin-top:25px;"><a href="https://donate.stripe.com/9AQ8Ab6Yr8Y67cYdQR" target="_blank" class="donate-button"><?php esc_html_e( 'Support Continued Development' ); ?></a></p> -
jmitch-tinylytics/tags/1.0.5/inc/user-shortcodes.php
r3035382 r3039297 13 13 function jmitch_tinylytics_kudos_function() { 14 14 $output = ''; 15 $options = get_option( 'jmitch_tinylytics_settings');15 $options = get_option( 'jmitch_tinylytics_settings' ); 16 16 $kudos = $options['display_kudos']; 17 if ( $kudos) {18 $output = '<button class="tinylytics_kudos" data-path="'. wp_make_link_relative( get_permalink()) .'"></button>';17 if ( $kudos ) { 18 $output = '<button class="tinylytics_kudos" data-path="'. wp_make_link_relative( get_permalink() ) .'"></button>'; 19 19 } 20 20 return $output; 21 21 } 22 add_shortcode( 'tinykudos','jmitch_tinylytics_kudos_function');22 add_shortcode( 'tinykudos', 'jmitch_tinylytics_kudos_function' ); 23 23 24 24 // *** Hits shortcode 25 25 function jmitch_tinylytics_hits_function() { 26 26 $output = ''; 27 $options = get_option( 'jmitch_tinylytics_settings');27 $options = get_option( 'jmitch_tinylytics_settings' ); 28 28 $hits = $options['display_hits']; 29 if ( $hits) {30 $output = '<span class="tinylytics_hits" data-path="'. wp_make_link_relative( get_permalink()) .'"></span>';29 if ( $hits ) { 30 $output = '<span class="tinylytics_hits" data-path="'. wp_make_link_relative( get_permalink() ) .'"></span>'; 31 31 } 32 32 return $output; 33 33 } 34 add_shortcode( 'tinyhits','jmitch_tinylytics_hits_function');34 add_shortcode( 'tinyhits', 'jmitch_tinylytics_hits_function' ); 35 35 36 36 // *** Web ring shortcode 37 37 function jmitch_tinylytics_webring_function() { 38 38 $output = ''; 39 $options = get_option( 'jmitch_tinylytics_settings');39 $options = get_option( 'jmitch_tinylytics_settings' ); 40 40 $webring = $options['display_webring']; 41 41 $webring_label = $options['webring_label']; 42 42 $avatars = $options['display_avatars']; 43 if ( $webring) {43 if ( $webring ) { 44 44 $show_avatar = $avatars ? '<img class="tinylytics_webring_avatar" src="" style="display: none"/>' : ''; 45 if ( $webring_label === '') {46 $output = '<span class="tiny_webring"><a href="" class="tinylytics_webring" target="_blank" title="Tinylytics '. esc_html__( 'Web Ring', 'jmitch-tinylytics' ) . '">🕸️' . $show_avatar . '💍</a></span>';45 if ( $webring_label === '' ) { 46 $output = '<span class="tiny_webring"><a href="" class="tinylytics_webring" target="_blank" title="Tinylytics '. esc_html__( 'Web Ring', 'jmitch-tinylytics' ) . '">🕸️' . $show_avatar . '💍</a></span>'; 47 47 } else { 48 $output = '<span class="tiny_webring"><a href="" class="tinylytics_webring" target="_blank" title="Tinylytics '. esc_html__( 'Web Ring', 'jmitch-tinylytics' ) . '">'. $show_avatar . $webring_label . '</a></span>';48 $output = '<span class="tiny_webring"><a href="" class="tinylytics_webring" target="_blank" title="Tinylytics '. esc_html__( 'Web Ring', 'jmitch-tinylytics' ) . '">'. $show_avatar . $webring_label . '</a></span>'; 49 49 } 50 50 } 51 51 return $output; 52 52 } 53 add_shortcode( 'tinywebring','jmitch_tinylytics_webring_function');53 add_shortcode( 'tinywebring', 'jmitch_tinylytics_webring_function' ); 54 54 55 55 // *** Country flags shortcode 56 56 function jmitch_tinylytics_flags_function() { 57 57 $output = ''; 58 $options = get_option( 'jmitch_tinylytics_settings');58 $options = get_option( 'jmitch_tinylytics_settings' ); 59 59 $flags = $options['display_flags']; 60 if ( $flags) {60 if ( $flags ) { 61 61 $output = '<p><span class="tinylytics_countries"></span></p>'; 62 62 } 63 63 return $output; 64 64 } 65 add_shortcode( 'tinyflags','jmitch_tinylytics_flags_function');65 add_shortcode( 'tinyflags', 'jmitch_tinylytics_flags_function' ); 66 66 67 67 // *** Stats shortcode 68 68 function jmitch_tinylytics_stats_function() { 69 69 $output = ''; 70 $options = get_option( 'jmitch_tinylytics_settings');70 $options = get_option( 'jmitch_tinylytics_settings' ); 71 71 $stats = $options['display_stats']; 72 72 $hits = $options['display_hits']; 73 73 $uptime = $options['display_uptime']; 74 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>';74 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 76 } 77 else if ( $hits) {77 else if ( $hits ) { 78 78 $output .= '<span class="tiny_counter"><a href="https://tinylytics.app">Tinylytics</a>: <span class="tinylytics_hits"></span></span>'; 79 79 } 80 if ( $uptime) {80 if ( $uptime ) { 81 81 $output .= ' <span class="tiny_uptime">Uptime: <span class="tinylytics_uptime"></span></span>'; 82 82 } 83 83 return $output; 84 84 } 85 add_shortcode( 'tinystats','jmitch_tinylytics_stats_function');85 add_shortcode( 'tinystats', 'jmitch_tinylytics_stats_function' ); 86 86 87 87 ?> -
jmitch-tinylytics/tags/1.0.5/jmitch-tinylytics.php
r3037227 r3039297 10 10 * Requires at least: 4.6 11 11 * Test up to: 6.4.3 12 * Version: 1.0. 412 * Version: 1.0.5 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.4' );36 if ( !defined( 'ABSPATH' )) die(); 37 38 define( 'TINYLYTICS__VERSION', '1.0.5' ); 39 39 40 40 // Hook functions into WordPress 41 add_action( 'admin_init', 'jmitch_tinylytics_register_settings');42 add_action( 'admin_menu', 'jmitch_tinylytics_add_menu_page');43 add_action( 'init', 'jmitch_tinylytics_load_i18n');41 add_action( 'admin_init', 'jmitch_tinylytics_register_settings' ); 42 add_action( 'admin_menu', 'jmitch_tinylytics_add_menu_page' ); 43 add_action( 'init', 'jmitch_tinylytics_load_i18n' ); 44 44 45 45 // Register the settings 46 46 function jmitch_tinylytics_register_settings() { 47 47 48 register_setting( 'jmitch_tinylytics_settings_group', 'jmitch_tinylytics_settings', 'jmitch_tinylytics_sanitize_options');49 50 add_settings_section( 'jmitch_tinylytics_general_section', esc_html__( 'General Settings','jmitch-tinylytics' ), 'jmitch_tinylytics_general_section_callback', 'jmitch-tinylytics');51 add_settings_section( 'jmitch_tinylytics_options_section', esc_html__( 'Tinylytics Options','jmitch-tinylytics' ), 'jmitch_tinylytics_options_section_callback', 'jmitch-tinylytics');52 53 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');55 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');56 add_settings_field( 'display_uptime', esc_html__( 'Display uptime?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_uptime_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');57 add_settings_field( 'display_kudos', esc_html__( 'Display Kudos?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_kudos_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');58 add_settings_field( 'kudos_label', esc_html__( 'Kudos label','jmitch-tinylytics' ), 'jmitch_tinylytics_kudos_label_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');59 add_settings_field( 'display_webring', esc_html__( 'Display webring?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_webring_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');60 add_settings_field( 'webring_label', esc_html__( 'Webring label','jmitch-tinylytics' ), 'jmitch_tinylytics_webring_label_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');61 add_settings_field( 'display_avatars', esc_html__( 'Display webring avatars?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_avatars_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');62 add_settings_field( 'display_flags', esc_html__( 'Display country flags?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_flags_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');48 register_setting( 'jmitch_tinylytics_settings_group', 'jmitch_tinylytics_settings', 'jmitch_tinylytics_sanitize_options' ); 49 50 add_settings_section( 'jmitch_tinylytics_general_section', esc_html__( 'General Settings','jmitch-tinylytics' ), 'jmitch_tinylytics_general_section_callback', 'jmitch-tinylytics' ); 51 add_settings_section( 'jmitch_tinylytics_options_section', esc_html__( 'Tinylytics Options','jmitch-tinylytics' ), 'jmitch_tinylytics_options_section_callback', 'jmitch-tinylytics' ); 52 53 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' ); 55 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' ); 56 add_settings_field( 'display_uptime', esc_html__( 'Display uptime?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_uptime_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 57 add_settings_field( 'display_kudos', esc_html__( 'Display Kudos?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_kudos_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 58 add_settings_field( 'kudos_label', esc_html__( 'Kudos label','jmitch-tinylytics' ), 'jmitch_tinylytics_kudos_label_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 59 add_settings_field( 'display_webring', esc_html__( 'Display webring?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_webring_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 60 add_settings_field( 'webring_label', esc_html__( 'Webring label','jmitch-tinylytics' ), 'jmitch_tinylytics_webring_label_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 61 add_settings_field( 'display_avatars', esc_html__( 'Display webring avatars?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_avatars_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 62 add_settings_field( 'display_flags', esc_html__( 'Display country flags?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_flags_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 63 63 64 64 } … … 69 69 $sanitized_input = array(); 70 70 71 if ( isset($input['site_id'])) {72 $sanitized_input['site_id'] = sanitize_text_field($input['site_id']);73 } 74 75 if ( isset($input['kudos_label'])) {76 $sanitized_input['kudos_label'] = sanitize_text_field($input['kudos_label']);77 } 78 79 if ( isset($input['webring_label'])) {80 $sanitized_input['webring_label'] = sanitize_text_field($input['webring_label']);81 } 82 83 $sanitized_input['display_hits'] = isset($input['display_hits']) ? true : false;84 $sanitized_input['display_stats'] = isset($input['display_stats']) ? true : false;85 $sanitized_input['display_uptime'] = isset($input['display_uptime']) ? true : false;86 $sanitized_input['display_kudos'] = isset($input['display_kudos']) ? true : false;87 $sanitized_input['display_webring'] = isset($input['display_webring']) ? true : false;88 $sanitized_input['display_avatars'] = isset($input['display_avatars']) ? true : false;89 $sanitized_input['display_flags'] = isset($input['display_flags']) ? true : false;71 if ( isset( $input['site_id'] ) ) { 72 $sanitized_input['site_id'] = sanitize_text_field( $input['site_id'] ); 73 } 74 75 if ( isset( $input['kudos_label'] ) ) { 76 $sanitized_input['kudos_label'] = sanitize_text_field( $input['kudos_label'] ); 77 } 78 79 if ( isset( $input['webring_label'] ) ) { 80 $sanitized_input['webring_label'] = sanitize_text_field( $input['webring_label'] ); 81 } 82 83 $sanitized_input['display_hits'] = isset( $input['display_hits'] ) ? true : false; 84 $sanitized_input['display_stats'] = isset( $input['display_stats'] ) ? true : false; 85 $sanitized_input['display_uptime'] = isset( $input['display_uptime'] ) ? true : false; 86 $sanitized_input['display_kudos'] = isset( $input['display_kudos'] ) ? true : false; 87 $sanitized_input['display_webring'] = isset( $input['display_webring'] ) ? true : false; 88 $sanitized_input['display_avatars'] = isset( $input['display_avatars'] ) ? true : false; 89 $sanitized_input['display_flags'] = isset( $input['display_flags'] ) ? true : false; 90 90 91 91 return $sanitized_input; … … 109 109 function jmitch_tinylytics_site_id_callback() { 110 110 111 $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'] ?? '') . '" />';111 $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'] ?? '' ) . '" />'; 113 113 114 114 } … … 117 117 function jmitch_tinylytics_kudos_label_callback() { 118 118 119 $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'] ?? '') . '" />';119 $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'] ?? '' ) . '" />'; 121 121 122 122 } … … 125 125 function jmitch_tinylytics_webring_label_callback() { 126 126 127 $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'] ?? '') . '" />';127 $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'] ?? '' ) . '" />'; 129 129 130 130 } … … 133 133 function jmitch_tinylytics_display_hits_callback() { 134 134 135 $options = get_option( 'jmitch_tinylytics_settings');136 echo '<input type="checkbox" id="display_hits" name="jmitch_tinylytics_settings[display_hits]" ' . checked( true, $options['display_hits'] ?? false, false) . ' />';135 $options = get_option( 'jmitch_tinylytics_settings' ); 136 echo '<input type="checkbox" id="display_hits" name="jmitch_tinylytics_settings[display_hits]" ' . checked( true, $options['display_hits'] ?? false, false ) . ' />'; 137 137 138 138 } … … 141 141 function jmitch_tinylytics_display_stats_callback() { 142 142 143 $options = get_option( 'jmitch_tinylytics_settings');144 echo '<input type="checkbox" id="display_stats" name="jmitch_tinylytics_settings[display_stats]" ' . checked( true, $options['display_stats'] ?? false, false) . ' />';143 $options = get_option( 'jmitch_tinylytics_settings' ); 144 echo '<input type="checkbox" id="display_stats" name="jmitch_tinylytics_settings[display_stats]" ' . checked( true, $options['display_stats'] ?? false, false ) . ' />'; 145 145 146 146 } … … 149 149 function jmitch_tinylytics_display_uptime_callback() { 150 150 151 $options = get_option( 'jmitch_tinylytics_settings');152 echo '<input type="checkbox" id="display_uptime" name="jmitch_tinylytics_settings[display_uptime]" ' . checked( true, $options['display_uptime'] ?? false, false) . ' />';151 $options = get_option( 'jmitch_tinylytics_settings' ); 152 echo '<input type="checkbox" id="display_uptime" name="jmitch_tinylytics_settings[display_uptime]" ' . checked( true, $options['display_uptime'] ?? false, false ) . ' />'; 153 153 154 154 } … … 157 157 function jmitch_tinylytics_display_kudos_callback() { 158 158 159 $options = get_option( 'jmitch_tinylytics_settings');160 echo '<input type="checkbox" id="display_kudos" name="jmitch_tinylytics_settings[display_kudos]" ' . checked( true, $options['display_kudos'] ?? false, false) . ' />';159 $options = get_option( 'jmitch_tinylytics_settings' ); 160 echo '<input type="checkbox" id="display_kudos" name="jmitch_tinylytics_settings[display_kudos]" ' . checked( true, $options['display_kudos'] ?? false, false ) . ' />'; 161 161 162 162 } … … 165 165 function jmitch_tinylytics_display_webring_callback() { 166 166 167 $options = get_option( 'jmitch_tinylytics_settings');168 echo '<input type="checkbox" id="display_webring" name="jmitch_tinylytics_settings[display_webring]" ' . checked( true, $options['display_webring'] ?? false, false) . ' />';167 $options = get_option( 'jmitch_tinylytics_settings' ); 168 echo '<input type="checkbox" id="display_webring" name="jmitch_tinylytics_settings[display_webring]" ' . checked( true, $options['display_webring'] ?? false, false ) . ' />'; 169 169 170 170 } … … 173 173 function jmitch_tinylytics_display_avatars_callback() { 174 174 175 $options = get_option( 'jmitch_tinylytics_settings');176 echo '<input type="checkbox" id="display_avatars" name="jmitch_tinylytics_settings[display_avatars]" ' . checked( true, $options['display_avatars'] ?? false, false) . ' />';175 $options = get_option( 'jmitch_tinylytics_settings' ); 176 echo '<input type="checkbox" id="display_avatars" name="jmitch_tinylytics_settings[display_avatars]" ' . checked( true, $options['display_avatars'] ?? false, false ) . ' />'; 177 177 178 178 } … … 181 181 function jmitch_tinylytics_display_flags_callback() { 182 182 183 $options = get_option( 'jmitch_tinylytics_settings');184 echo '<input type="checkbox" id="display_flags" name="jmitch_tinylytics_settings[display_flags]" ' . checked( true, $options['display_flags'] ?? false, false) . ' />';183 $options = get_option( 'jmitch_tinylytics_settings' ); 184 echo '<input type="checkbox" id="display_flags" name="jmitch_tinylytics_settings[display_flags]" ' . checked( true, $options['display_flags'] ?? false, false ) . ' />'; 185 185 186 186 } … … 189 189 function jmitch_tinylytics_add_menu_page() { 190 190 191 add_menu_page( 'Tinylytics', 'Tinylytics', 'manage_options', 'jmitch-tinylytics', 'jmitch_tinylytics_settings_page', 'dashicons-chart-bar');191 add_menu_page( 'Tinylytics', 'Tinylytics', 'manage_options', 'jmitch-tinylytics', 'jmitch_tinylytics_settings_page', 'dashicons-chart-bar' ); 192 192 193 193 } … … 208 208 209 209 $default_tab = null; 210 $tab = isset( $_GET['tab']) ? sanitize_key($_GET['tab']) : $default_tab;210 $tab = isset( $_GET['tab'] ) ? sanitize_key( $_GET['tab'] ) : $default_tab; 211 211 212 212 ?> … … 215 215 216 216 <nav class="nav-tab-wrapper"> 217 <a href="?page=jmitch-tinylytics" class="nav-tab <?php if($tab===null):?>nav-tab-active<?php endif; ?>"><?php esc_html_e( 'General Settings','jmitch-tinylytics'); ?></a>218 <a href="?page=jmitch-tinylytics&tab=shortcode" class="nav-tab <?php if($tab==='shortcode'):?>nav-tab-active<?php endif; ?>"><?php esc_html_e( 'Shortcodes','jmitch-tinylytics'); ?></a>217 <a href="?page=jmitch-tinylytics" class="nav-tab <?php if($tab===null):?>nav-tab-active<?php endif; ?>"><?php esc_html_e( 'General Settings', 'jmitch-tinylytics' ); ?></a> 218 <a href="?page=jmitch-tinylytics&tab=shortcode" class="nav-tab <?php if($tab==='shortcode'):?>nav-tab-active<?php endif; ?>"><?php esc_html_e( 'Shortcodes', 'jmitch-tinylytics' ); ?></a> 219 219 </nav> 220 220 <div class="tab-content"> 221 221 <div class="admin-left"> 222 <?php switch( $tab) :222 <?php switch( $tab ) : 223 223 case 'shortcode': 224 224 include plugin_dir_path( __FILE__ ) . '/inc/admin-shortcodes.php'; … … 239 239 function jmitch_tinylytics_output_script() { 240 240 241 $options = get_option('jmitch_tinylytics_settings'); 242 243 $site_id = esc_attr($options['site_id'] ?? ''); 244 $hits = $options['display_hits']; 245 $stats = $options['display_stats']; 246 $uptime = $options['display_uptime']; 247 $kudos = $options['display_kudos']; 248 $kudos_label = esc_attr($options['kudos_label'] ?? ''); 249 $webring = $options['display_webring']; 250 $webring_label = esc_attr($options['webring_label'] ?? ''); 251 $avatars = $options['display_avatars']; 252 $flags = $options['display_flags']; 253 254 if (!empty($site_id)) { 241 $options = get_option( 'jmitch_tinylytics_settings' ); 242 243 if ( $options ) { 244 245 $site_id = esc_attr( $options['site_id'] ?? '' ); 246 $hits = $options['display_hits']; 247 $stats = $options['display_stats']; 248 $uptime = $options['display_uptime']; 249 $kudos = $options['display_kudos']; 250 $kudos_label = esc_attr( $options['kudos_label'] ?? '' ); 251 $webring = $options['display_webring']; 252 $webring_label = esc_attr( $options['webring_label'] ?? '' ); 253 $avatars = $options['display_avatars']; 254 $flags = $options['display_flags']; 255 255 256 $script_url = "https://tinylytics.app/embed/{$site_id}.js?"; 256 257 $script_url .= $hits ? 'hits&' : ''; … … 262 263 $script_url .= $webring && $avatars ? 'webring=avatars&' : ''; 263 264 $script_url .= $flags ? 'countries&' : ''; 264 $script_url = rtrim( $script_url, '&?');265 $script_url = rtrim( $script_url, '&?' ); 265 266 266 267 wp_enqueue_script( … … 275 276 ); 276 277 } 277 278 } 279 add_action('wp_footer', 'jmitch_tinylytics_output_script'); 278 } 279 add_action( 'wp_footer', 'jmitch_tinylytics_output_script' ); 280 280 281 281 // *** Enqueue user scripts … … 312 312 313 313 $domain = 'jmitch-tinylytics'; 314 $locale = apply_filters( 'jmitch_tinylytics_locale', get_locale(), $domain);315 $dir = trailingslashit( WP_LANG_DIR);316 $file = $domain . '-'. $locale .'.mo';314 $locale = apply_filters( 'jmitch_tinylytics_locale', get_locale(), $domain ); 315 $dir = trailingslashit( WP_LANG_DIR ); 316 $file = $domain . '-' . $locale . '.mo'; 317 317 $path_1 = $dir . $file; 318 $path_2 = $dir . $domain . '/'. $file;319 $path_3 = $dir . 'plugins/'. $file;320 $path_4 = $dir . 'plugins/'. $domain .'/'. $file;321 $paths = array( $path_1, $path_2, $path_3, $path_4);322 323 foreach ( $paths as $path) {324 if ( $loaded = load_textdomain($domain, $path)) {318 $path_2 = $dir . $domain . '/' . $file; 319 $path_3 = $dir . 'plugins/' . $file; 320 $path_4 = $dir . 'plugins/' . $domain . '/' . $file; 321 $paths = array( $path_1, $path_2, $path_3, $path_4 ); 322 323 foreach ( $paths as $path ) { 324 if ( $loaded = load_textdomain( $domain, $path ) ) { 325 325 return $loaded; 326 326 } else { 327 return load_plugin_textdomain( $domain, false, dirname(plugin_basename(__FILE__)) .'/languages/');327 return load_plugin_textdomain( $domain, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/'); 328 328 } 329 329 } -
jmitch-tinylytics/tags/1.0.5/readme.txt
r3037227 r3039297 10 10 Requires at least: 4.6 11 11 Tested up to: 6.4.3 12 Stable tag: 1.0. 413 Version: 1.0. 412 Stable tag: 1.0.5 13 Version: 1.0.5 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.0.5 (02-21-2024)** 145 146 * Fix a minor site error if options have not been set in the plugin yet. 147 * Remove an unused CSS style. 148 * Code clean up for readability sake. 149 144 150 **Version 1.0.4 (02-17-2024)** 145 151 -
jmitch-tinylytics/tags/1.0.5/uninstall.php
r3035382 r3039297 1 1 <?php // delete the Tinylytics settings on uninstall... 2 2 3 if ( ! defined( 'ABSPATH') ) exit();3 if ( ! defined( 'ABSPATH' ) ) exit(); 4 4 5 5 // delete options 6 delete_option( 'jmitch_tinylytics_settings');6 delete_option( 'jmitch_tinylytics_settings' ); -
jmitch-tinylytics/trunk/css/style.css
r3035382 r3039297 1 .wp-admin .tiny-warning-message {2 color: crimson;3 font-weight: bold;4 text-decoration: underline;5 }6 1 .wp-admin .tab-content { 7 2 display: flex; -
jmitch-tinylytics/trunk/inc/admin-settings.php
r3035382 r3039297 13 13 <form method="post" action="options.php"> 14 14 <?php 15 settings_fields( 'jmitch_tinylytics_settings_group');16 do_settings_sections( 'jmitch-tinylytics');15 settings_fields( 'jmitch_tinylytics_settings_group' ); 16 do_settings_sections( 'jmitch-tinylytics' ); 17 17 submit_button(); 18 18 ?> -
jmitch-tinylytics/trunk/inc/admin-shortcodes.php
r3035382 r3039297 12 12 ?> 13 13 14 <h2><?php esc_html_e( 'Shortcodes', 'jmitch-tinylytics' ); ?></h2>14 <h2><?php esc_html_e( 'Shortcodes', 'jmitch-tinylytics' ); ?></h2> 15 15 16 <p>Tinylytics <?php esc_html_e( 'comes comes with a variety of shortcodes which can be embedded directly in a post, page, or theme block to reduce the need for extensive HTML customizations', 'jmitch-tinylytics' ); ?>.</p>16 <p>Tinylytics <?php esc_html_e( 'comes comes with a variety of shortcodes which can be embedded directly in a post, page, or theme block to reduce the need for extensive HTML customizations', 'jmitch-tinylytics' ); ?>.</p> 17 17 18 18 <table class="form-table" role="presentation" style="width:100%;"> 19 <tr><th style="width:20%;">[tinykudos]</th><td><?php esc_html_e( 'Displays an interactive button to track "kudos" given by readers. Best used directly in posts and pages', 'jmitch-tinylytics' ); ?>.</td></tr>20 <tr><th>[tinyhits]</th><td><?php esc_html_e( 'Displays a count of page loads of the page viewed. Best used directly in posts and pages', 'jmitch-tinylytics' ); ?>.</td></tr>21 <tr><th>[tinystats]</th><td><?php esc_html_e( 'Displays both overall site hits and uptime (Note: a Tinylytics subscription is required to display uptime). Best used in the footer of your site', 'jmitch-tinylytics' ); ?>.</td></tr>22 <tr><th>[tinywebring]</th><td><?php esc_html_e( 'Displays a random link to a Tinylytics webring site. Enabling the "Display webring avatars?" option will include the avatar if the site has one. Best used in the footer of your site', 'jmitch-tinylytics' ); ?>.</td></tr>23 <tr><th>[tinyflags]</th><td><?php esc_html_e( 'Displays flags from all the countries of site visitors. Best used in the footer of your site', 'jmitch-tinylytics' ); ?>.</td></tr>19 <tr><th style="width:20%;">[tinykudos]</th><td><?php esc_html_e( 'Displays an interactive button to track "kudos" given by readers. Best used directly in posts and pages', 'jmitch-tinylytics' ); ?>.</td></tr> 20 <tr><th>[tinyhits]</th><td><?php esc_html_e( 'Displays a count of page loads of the page viewed. Best used directly in posts and pages', 'jmitch-tinylytics' ); ?>.</td></tr> 21 <tr><th>[tinystats]</th><td><?php esc_html_e( 'Displays both overall site hits and uptime (Note: a Tinylytics subscription is required to display uptime). Best used in the footer of your site', 'jmitch-tinylytics' ); ?>.</td></tr> 22 <tr><th>[tinywebring]</th><td><?php esc_html_e( 'Displays a random link to a Tinylytics webring site. Enabling the "Display webring avatars?" option will include the avatar if the site has one. Best used in the footer of your site', 'jmitch-tinylytics' ); ?>.</td></tr> 23 <tr><th>[tinyflags]</th><td><?php esc_html_e( 'Displays flags from all the countries of site visitors. Best used in the footer of your site', 'jmitch-tinylytics' ); ?>.</td></tr> 24 24 </table> 25 25 26 <p><?php esc_html_e( 'Learn how to use the', 'jmitch-tinylytics' ); ?> <a href="https://wordpress.org/documentation/article/shortcode-block/" target="_blank"><?php esc_html_e( 'Shortcode Block','jmitch-tinylytics' ); ?></a> <?php esc_html_e( 'in your theme. More information about','jmitch-tinylytics' ); ?> <a href="https://tinylytics.app" target="_blank">Tinylytics</a> <?php esc_html_e( 'options can be found in the','jmitch-tinylytics' ); ?> <a href="https://tinylytics.app/docs" target="_blank"><?php esc_html_e( 'documentation','jmitch-tinylytics' ); ?></a>.</p>26 <p><?php esc_html_e( 'Learn how to use the', 'jmitch-tinylytics' ); ?> <a href="https://wordpress.org/documentation/article/shortcode-block/" target="_blank"><?php esc_html_e( 'Shortcode Block', 'jmitch-tinylytics' ); ?></a> <?php esc_html_e( 'in your theme. More information about', 'jmitch-tinylytics' ); ?> <a href="https://tinylytics.app" target="_blank">Tinylytics</a> <?php esc_html_e( 'options can be found in the', 'jmitch-tinylytics' ); ?> <a href="https://tinylytics.app/docs" target="_blank"><?php esc_html_e( 'documentation', 'jmitch-tinylytics' ); ?></a>.</p> -
jmitch-tinylytics/trunk/inc/admin-support.php
r3037227 r3039297 12 12 ?> 13 13 14 <h2 style="text-align:center;"><?php esc_html_e( 'Your Support Matters', 'jmitch-tinylytics' ); ?></h2>14 <h2 style="text-align:center;"><?php esc_html_e( 'Your Support Matters', 'jmitch-tinylytics' ); ?></h2> 15 15 16 <p><?php esc_html_e( 'Though I freely provide this plugin to the WordPress community, consider making a small donation. A few bucks goes a long way towards making improvements', 'jmitch-tinylytics' ); ?>.</p>17 <p><strong><?php esc_html_e( 'Note:', 'jmitch-tinylytics' ); ?></strong> <?php esc_html_e( 'Making a donation gets you priority support if you need it','jmitch-tinylytics' ); ?>.</p>16 <p><?php esc_html_e( 'Though I freely provide this plugin to the WordPress community, consider making a small donation. A few bucks goes a long way towards making improvements', 'jmitch-tinylytics' ); ?>.</p> 17 <p><strong><?php esc_html_e( 'Note:', 'jmitch-tinylytics' ); ?></strong> <?php esc_html_e( 'Making a donation gets you priority support if you need it', 'jmitch-tinylytics' ); ?>.</p> 18 18 <p style="margin-top:25px;"><a href="https://donate.stripe.com/9AQ8Ab6Yr8Y67cYdQR" target="_blank" class="donate-button"><?php esc_html_e( 'Support Continued Development' ); ?></a></p> -
jmitch-tinylytics/trunk/inc/user-shortcodes.php
r3035382 r3039297 13 13 function jmitch_tinylytics_kudos_function() { 14 14 $output = ''; 15 $options = get_option( 'jmitch_tinylytics_settings');15 $options = get_option( 'jmitch_tinylytics_settings' ); 16 16 $kudos = $options['display_kudos']; 17 if ( $kudos) {18 $output = '<button class="tinylytics_kudos" data-path="'. wp_make_link_relative( get_permalink()) .'"></button>';17 if ( $kudos ) { 18 $output = '<button class="tinylytics_kudos" data-path="'. wp_make_link_relative( get_permalink() ) .'"></button>'; 19 19 } 20 20 return $output; 21 21 } 22 add_shortcode( 'tinykudos','jmitch_tinylytics_kudos_function');22 add_shortcode( 'tinykudos', 'jmitch_tinylytics_kudos_function' ); 23 23 24 24 // *** Hits shortcode 25 25 function jmitch_tinylytics_hits_function() { 26 26 $output = ''; 27 $options = get_option( 'jmitch_tinylytics_settings');27 $options = get_option( 'jmitch_tinylytics_settings' ); 28 28 $hits = $options['display_hits']; 29 if ( $hits) {30 $output = '<span class="tinylytics_hits" data-path="'. wp_make_link_relative( get_permalink()) .'"></span>';29 if ( $hits ) { 30 $output = '<span class="tinylytics_hits" data-path="'. wp_make_link_relative( get_permalink() ) .'"></span>'; 31 31 } 32 32 return $output; 33 33 } 34 add_shortcode( 'tinyhits','jmitch_tinylytics_hits_function');34 add_shortcode( 'tinyhits', 'jmitch_tinylytics_hits_function' ); 35 35 36 36 // *** Web ring shortcode 37 37 function jmitch_tinylytics_webring_function() { 38 38 $output = ''; 39 $options = get_option( 'jmitch_tinylytics_settings');39 $options = get_option( 'jmitch_tinylytics_settings' ); 40 40 $webring = $options['display_webring']; 41 41 $webring_label = $options['webring_label']; 42 42 $avatars = $options['display_avatars']; 43 if ( $webring) {43 if ( $webring ) { 44 44 $show_avatar = $avatars ? '<img class="tinylytics_webring_avatar" src="" style="display: none"/>' : ''; 45 if ( $webring_label === '') {46 $output = '<span class="tiny_webring"><a href="" class="tinylytics_webring" target="_blank" title="Tinylytics '. esc_html__( 'Web Ring', 'jmitch-tinylytics' ) . '">🕸️' . $show_avatar . '💍</a></span>';45 if ( $webring_label === '' ) { 46 $output = '<span class="tiny_webring"><a href="" class="tinylytics_webring" target="_blank" title="Tinylytics '. esc_html__( 'Web Ring', 'jmitch-tinylytics' ) . '">🕸️' . $show_avatar . '💍</a></span>'; 47 47 } else { 48 $output = '<span class="tiny_webring"><a href="" class="tinylytics_webring" target="_blank" title="Tinylytics '. esc_html__( 'Web Ring', 'jmitch-tinylytics' ) . '">'. $show_avatar . $webring_label . '</a></span>';48 $output = '<span class="tiny_webring"><a href="" class="tinylytics_webring" target="_blank" title="Tinylytics '. esc_html__( 'Web Ring', 'jmitch-tinylytics' ) . '">'. $show_avatar . $webring_label . '</a></span>'; 49 49 } 50 50 } 51 51 return $output; 52 52 } 53 add_shortcode( 'tinywebring','jmitch_tinylytics_webring_function');53 add_shortcode( 'tinywebring', 'jmitch_tinylytics_webring_function' ); 54 54 55 55 // *** Country flags shortcode 56 56 function jmitch_tinylytics_flags_function() { 57 57 $output = ''; 58 $options = get_option( 'jmitch_tinylytics_settings');58 $options = get_option( 'jmitch_tinylytics_settings' ); 59 59 $flags = $options['display_flags']; 60 if ( $flags) {60 if ( $flags ) { 61 61 $output = '<p><span class="tinylytics_countries"></span></p>'; 62 62 } 63 63 return $output; 64 64 } 65 add_shortcode( 'tinyflags','jmitch_tinylytics_flags_function');65 add_shortcode( 'tinyflags', 'jmitch_tinylytics_flags_function' ); 66 66 67 67 // *** Stats shortcode 68 68 function jmitch_tinylytics_stats_function() { 69 69 $output = ''; 70 $options = get_option( 'jmitch_tinylytics_settings');70 $options = get_option( 'jmitch_tinylytics_settings' ); 71 71 $stats = $options['display_stats']; 72 72 $hits = $options['display_hits']; 73 73 $uptime = $options['display_uptime']; 74 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>';74 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 76 } 77 else if ( $hits) {77 else if ( $hits ) { 78 78 $output .= '<span class="tiny_counter"><a href="https://tinylytics.app">Tinylytics</a>: <span class="tinylytics_hits"></span></span>'; 79 79 } 80 if ( $uptime) {80 if ( $uptime ) { 81 81 $output .= ' <span class="tiny_uptime">Uptime: <span class="tinylytics_uptime"></span></span>'; 82 82 } 83 83 return $output; 84 84 } 85 add_shortcode( 'tinystats','jmitch_tinylytics_stats_function');85 add_shortcode( 'tinystats', 'jmitch_tinylytics_stats_function' ); 86 86 87 87 ?> -
jmitch-tinylytics/trunk/jmitch-tinylytics.php
r3037227 r3039297 10 10 * Requires at least: 4.6 11 11 * Test up to: 6.4.3 12 * Version: 1.0. 412 * Version: 1.0.5 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.4' );36 if ( !defined( 'ABSPATH' )) die(); 37 38 define( 'TINYLYTICS__VERSION', '1.0.5' ); 39 39 40 40 // Hook functions into WordPress 41 add_action( 'admin_init', 'jmitch_tinylytics_register_settings');42 add_action( 'admin_menu', 'jmitch_tinylytics_add_menu_page');43 add_action( 'init', 'jmitch_tinylytics_load_i18n');41 add_action( 'admin_init', 'jmitch_tinylytics_register_settings' ); 42 add_action( 'admin_menu', 'jmitch_tinylytics_add_menu_page' ); 43 add_action( 'init', 'jmitch_tinylytics_load_i18n' ); 44 44 45 45 // Register the settings 46 46 function jmitch_tinylytics_register_settings() { 47 47 48 register_setting( 'jmitch_tinylytics_settings_group', 'jmitch_tinylytics_settings', 'jmitch_tinylytics_sanitize_options');49 50 add_settings_section( 'jmitch_tinylytics_general_section', esc_html__( 'General Settings','jmitch-tinylytics' ), 'jmitch_tinylytics_general_section_callback', 'jmitch-tinylytics');51 add_settings_section( 'jmitch_tinylytics_options_section', esc_html__( 'Tinylytics Options','jmitch-tinylytics' ), 'jmitch_tinylytics_options_section_callback', 'jmitch-tinylytics');52 53 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');55 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');56 add_settings_field( 'display_uptime', esc_html__( 'Display uptime?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_uptime_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');57 add_settings_field( 'display_kudos', esc_html__( 'Display Kudos?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_kudos_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');58 add_settings_field( 'kudos_label', esc_html__( 'Kudos label','jmitch-tinylytics' ), 'jmitch_tinylytics_kudos_label_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');59 add_settings_field( 'display_webring', esc_html__( 'Display webring?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_webring_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');60 add_settings_field( 'webring_label', esc_html__( 'Webring label','jmitch-tinylytics' ), 'jmitch_tinylytics_webring_label_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');61 add_settings_field( 'display_avatars', esc_html__( 'Display webring avatars?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_avatars_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');62 add_settings_field( 'display_flags', esc_html__( 'Display country flags?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_flags_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section');48 register_setting( 'jmitch_tinylytics_settings_group', 'jmitch_tinylytics_settings', 'jmitch_tinylytics_sanitize_options' ); 49 50 add_settings_section( 'jmitch_tinylytics_general_section', esc_html__( 'General Settings','jmitch-tinylytics' ), 'jmitch_tinylytics_general_section_callback', 'jmitch-tinylytics' ); 51 add_settings_section( 'jmitch_tinylytics_options_section', esc_html__( 'Tinylytics Options','jmitch-tinylytics' ), 'jmitch_tinylytics_options_section_callback', 'jmitch-tinylytics' ); 52 53 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' ); 55 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' ); 56 add_settings_field( 'display_uptime', esc_html__( 'Display uptime?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_uptime_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 57 add_settings_field( 'display_kudos', esc_html__( 'Display Kudos?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_kudos_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 58 add_settings_field( 'kudos_label', esc_html__( 'Kudos label','jmitch-tinylytics' ), 'jmitch_tinylytics_kudos_label_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 59 add_settings_field( 'display_webring', esc_html__( 'Display webring?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_webring_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 60 add_settings_field( 'webring_label', esc_html__( 'Webring label','jmitch-tinylytics' ), 'jmitch_tinylytics_webring_label_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 61 add_settings_field( 'display_avatars', esc_html__( 'Display webring avatars?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_avatars_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 62 add_settings_field( 'display_flags', esc_html__( 'Display country flags?','jmitch-tinylytics' ), 'jmitch_tinylytics_display_flags_callback', 'jmitch-tinylytics', 'jmitch_tinylytics_options_section' ); 63 63 64 64 } … … 69 69 $sanitized_input = array(); 70 70 71 if ( isset($input['site_id'])) {72 $sanitized_input['site_id'] = sanitize_text_field($input['site_id']);73 } 74 75 if ( isset($input['kudos_label'])) {76 $sanitized_input['kudos_label'] = sanitize_text_field($input['kudos_label']);77 } 78 79 if ( isset($input['webring_label'])) {80 $sanitized_input['webring_label'] = sanitize_text_field($input['webring_label']);81 } 82 83 $sanitized_input['display_hits'] = isset($input['display_hits']) ? true : false;84 $sanitized_input['display_stats'] = isset($input['display_stats']) ? true : false;85 $sanitized_input['display_uptime'] = isset($input['display_uptime']) ? true : false;86 $sanitized_input['display_kudos'] = isset($input['display_kudos']) ? true : false;87 $sanitized_input['display_webring'] = isset($input['display_webring']) ? true : false;88 $sanitized_input['display_avatars'] = isset($input['display_avatars']) ? true : false;89 $sanitized_input['display_flags'] = isset($input['display_flags']) ? true : false;71 if ( isset( $input['site_id'] ) ) { 72 $sanitized_input['site_id'] = sanitize_text_field( $input['site_id'] ); 73 } 74 75 if ( isset( $input['kudos_label'] ) ) { 76 $sanitized_input['kudos_label'] = sanitize_text_field( $input['kudos_label'] ); 77 } 78 79 if ( isset( $input['webring_label'] ) ) { 80 $sanitized_input['webring_label'] = sanitize_text_field( $input['webring_label'] ); 81 } 82 83 $sanitized_input['display_hits'] = isset( $input['display_hits'] ) ? true : false; 84 $sanitized_input['display_stats'] = isset( $input['display_stats'] ) ? true : false; 85 $sanitized_input['display_uptime'] = isset( $input['display_uptime'] ) ? true : false; 86 $sanitized_input['display_kudos'] = isset( $input['display_kudos'] ) ? true : false; 87 $sanitized_input['display_webring'] = isset( $input['display_webring'] ) ? true : false; 88 $sanitized_input['display_avatars'] = isset( $input['display_avatars'] ) ? true : false; 89 $sanitized_input['display_flags'] = isset( $input['display_flags'] ) ? true : false; 90 90 91 91 return $sanitized_input; … … 109 109 function jmitch_tinylytics_site_id_callback() { 110 110 111 $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'] ?? '') . '" />';111 $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'] ?? '' ) . '" />'; 113 113 114 114 } … … 117 117 function jmitch_tinylytics_kudos_label_callback() { 118 118 119 $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'] ?? '') . '" />';119 $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'] ?? '' ) . '" />'; 121 121 122 122 } … … 125 125 function jmitch_tinylytics_webring_label_callback() { 126 126 127 $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'] ?? '') . '" />';127 $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'] ?? '' ) . '" />'; 129 129 130 130 } … … 133 133 function jmitch_tinylytics_display_hits_callback() { 134 134 135 $options = get_option( 'jmitch_tinylytics_settings');136 echo '<input type="checkbox" id="display_hits" name="jmitch_tinylytics_settings[display_hits]" ' . checked( true, $options['display_hits'] ?? false, false) . ' />';135 $options = get_option( 'jmitch_tinylytics_settings' ); 136 echo '<input type="checkbox" id="display_hits" name="jmitch_tinylytics_settings[display_hits]" ' . checked( true, $options['display_hits'] ?? false, false ) . ' />'; 137 137 138 138 } … … 141 141 function jmitch_tinylytics_display_stats_callback() { 142 142 143 $options = get_option( 'jmitch_tinylytics_settings');144 echo '<input type="checkbox" id="display_stats" name="jmitch_tinylytics_settings[display_stats]" ' . checked( true, $options['display_stats'] ?? false, false) . ' />';143 $options = get_option( 'jmitch_tinylytics_settings' ); 144 echo '<input type="checkbox" id="display_stats" name="jmitch_tinylytics_settings[display_stats]" ' . checked( true, $options['display_stats'] ?? false, false ) . ' />'; 145 145 146 146 } … … 149 149 function jmitch_tinylytics_display_uptime_callback() { 150 150 151 $options = get_option( 'jmitch_tinylytics_settings');152 echo '<input type="checkbox" id="display_uptime" name="jmitch_tinylytics_settings[display_uptime]" ' . checked( true, $options['display_uptime'] ?? false, false) . ' />';151 $options = get_option( 'jmitch_tinylytics_settings' ); 152 echo '<input type="checkbox" id="display_uptime" name="jmitch_tinylytics_settings[display_uptime]" ' . checked( true, $options['display_uptime'] ?? false, false ) . ' />'; 153 153 154 154 } … … 157 157 function jmitch_tinylytics_display_kudos_callback() { 158 158 159 $options = get_option( 'jmitch_tinylytics_settings');160 echo '<input type="checkbox" id="display_kudos" name="jmitch_tinylytics_settings[display_kudos]" ' . checked( true, $options['display_kudos'] ?? false, false) . ' />';159 $options = get_option( 'jmitch_tinylytics_settings' ); 160 echo '<input type="checkbox" id="display_kudos" name="jmitch_tinylytics_settings[display_kudos]" ' . checked( true, $options['display_kudos'] ?? false, false ) . ' />'; 161 161 162 162 } … … 165 165 function jmitch_tinylytics_display_webring_callback() { 166 166 167 $options = get_option( 'jmitch_tinylytics_settings');168 echo '<input type="checkbox" id="display_webring" name="jmitch_tinylytics_settings[display_webring]" ' . checked( true, $options['display_webring'] ?? false, false) . ' />';167 $options = get_option( 'jmitch_tinylytics_settings' ); 168 echo '<input type="checkbox" id="display_webring" name="jmitch_tinylytics_settings[display_webring]" ' . checked( true, $options['display_webring'] ?? false, false ) . ' />'; 169 169 170 170 } … … 173 173 function jmitch_tinylytics_display_avatars_callback() { 174 174 175 $options = get_option( 'jmitch_tinylytics_settings');176 echo '<input type="checkbox" id="display_avatars" name="jmitch_tinylytics_settings[display_avatars]" ' . checked( true, $options['display_avatars'] ?? false, false) . ' />';175 $options = get_option( 'jmitch_tinylytics_settings' ); 176 echo '<input type="checkbox" id="display_avatars" name="jmitch_tinylytics_settings[display_avatars]" ' . checked( true, $options['display_avatars'] ?? false, false ) . ' />'; 177 177 178 178 } … … 181 181 function jmitch_tinylytics_display_flags_callback() { 182 182 183 $options = get_option( 'jmitch_tinylytics_settings');184 echo '<input type="checkbox" id="display_flags" name="jmitch_tinylytics_settings[display_flags]" ' . checked( true, $options['display_flags'] ?? false, false) . ' />';183 $options = get_option( 'jmitch_tinylytics_settings' ); 184 echo '<input type="checkbox" id="display_flags" name="jmitch_tinylytics_settings[display_flags]" ' . checked( true, $options['display_flags'] ?? false, false ) . ' />'; 185 185 186 186 } … … 189 189 function jmitch_tinylytics_add_menu_page() { 190 190 191 add_menu_page( 'Tinylytics', 'Tinylytics', 'manage_options', 'jmitch-tinylytics', 'jmitch_tinylytics_settings_page', 'dashicons-chart-bar');191 add_menu_page( 'Tinylytics', 'Tinylytics', 'manage_options', 'jmitch-tinylytics', 'jmitch_tinylytics_settings_page', 'dashicons-chart-bar' ); 192 192 193 193 } … … 208 208 209 209 $default_tab = null; 210 $tab = isset( $_GET['tab']) ? sanitize_key($_GET['tab']) : $default_tab;210 $tab = isset( $_GET['tab'] ) ? sanitize_key( $_GET['tab'] ) : $default_tab; 211 211 212 212 ?> … … 215 215 216 216 <nav class="nav-tab-wrapper"> 217 <a href="?page=jmitch-tinylytics" class="nav-tab <?php if($tab===null):?>nav-tab-active<?php endif; ?>"><?php esc_html_e( 'General Settings','jmitch-tinylytics'); ?></a>218 <a href="?page=jmitch-tinylytics&tab=shortcode" class="nav-tab <?php if($tab==='shortcode'):?>nav-tab-active<?php endif; ?>"><?php esc_html_e( 'Shortcodes','jmitch-tinylytics'); ?></a>217 <a href="?page=jmitch-tinylytics" class="nav-tab <?php if($tab===null):?>nav-tab-active<?php endif; ?>"><?php esc_html_e( 'General Settings', 'jmitch-tinylytics' ); ?></a> 218 <a href="?page=jmitch-tinylytics&tab=shortcode" class="nav-tab <?php if($tab==='shortcode'):?>nav-tab-active<?php endif; ?>"><?php esc_html_e( 'Shortcodes', 'jmitch-tinylytics' ); ?></a> 219 219 </nav> 220 220 <div class="tab-content"> 221 221 <div class="admin-left"> 222 <?php switch( $tab) :222 <?php switch( $tab ) : 223 223 case 'shortcode': 224 224 include plugin_dir_path( __FILE__ ) . '/inc/admin-shortcodes.php'; … … 239 239 function jmitch_tinylytics_output_script() { 240 240 241 $options = get_option('jmitch_tinylytics_settings'); 242 243 $site_id = esc_attr($options['site_id'] ?? ''); 244 $hits = $options['display_hits']; 245 $stats = $options['display_stats']; 246 $uptime = $options['display_uptime']; 247 $kudos = $options['display_kudos']; 248 $kudos_label = esc_attr($options['kudos_label'] ?? ''); 249 $webring = $options['display_webring']; 250 $webring_label = esc_attr($options['webring_label'] ?? ''); 251 $avatars = $options['display_avatars']; 252 $flags = $options['display_flags']; 253 254 if (!empty($site_id)) { 241 $options = get_option( 'jmitch_tinylytics_settings' ); 242 243 if ( $options ) { 244 245 $site_id = esc_attr( $options['site_id'] ?? '' ); 246 $hits = $options['display_hits']; 247 $stats = $options['display_stats']; 248 $uptime = $options['display_uptime']; 249 $kudos = $options['display_kudos']; 250 $kudos_label = esc_attr( $options['kudos_label'] ?? '' ); 251 $webring = $options['display_webring']; 252 $webring_label = esc_attr( $options['webring_label'] ?? '' ); 253 $avatars = $options['display_avatars']; 254 $flags = $options['display_flags']; 255 255 256 $script_url = "https://tinylytics.app/embed/{$site_id}.js?"; 256 257 $script_url .= $hits ? 'hits&' : ''; … … 262 263 $script_url .= $webring && $avatars ? 'webring=avatars&' : ''; 263 264 $script_url .= $flags ? 'countries&' : ''; 264 $script_url = rtrim( $script_url, '&?');265 $script_url = rtrim( $script_url, '&?' ); 265 266 266 267 wp_enqueue_script( … … 275 276 ); 276 277 } 277 278 } 279 add_action('wp_footer', 'jmitch_tinylytics_output_script'); 278 } 279 add_action( 'wp_footer', 'jmitch_tinylytics_output_script' ); 280 280 281 281 // *** Enqueue user scripts … … 312 312 313 313 $domain = 'jmitch-tinylytics'; 314 $locale = apply_filters( 'jmitch_tinylytics_locale', get_locale(), $domain);315 $dir = trailingslashit( WP_LANG_DIR);316 $file = $domain . '-'. $locale .'.mo';314 $locale = apply_filters( 'jmitch_tinylytics_locale', get_locale(), $domain ); 315 $dir = trailingslashit( WP_LANG_DIR ); 316 $file = $domain . '-' . $locale . '.mo'; 317 317 $path_1 = $dir . $file; 318 $path_2 = $dir . $domain . '/'. $file;319 $path_3 = $dir . 'plugins/'. $file;320 $path_4 = $dir . 'plugins/'. $domain .'/'. $file;321 $paths = array( $path_1, $path_2, $path_3, $path_4);322 323 foreach ( $paths as $path) {324 if ( $loaded = load_textdomain($domain, $path)) {318 $path_2 = $dir . $domain . '/' . $file; 319 $path_3 = $dir . 'plugins/' . $file; 320 $path_4 = $dir . 'plugins/' . $domain . '/' . $file; 321 $paths = array( $path_1, $path_2, $path_3, $path_4 ); 322 323 foreach ( $paths as $path ) { 324 if ( $loaded = load_textdomain( $domain, $path ) ) { 325 325 return $loaded; 326 326 } else { 327 return load_plugin_textdomain( $domain, false, dirname(plugin_basename(__FILE__)) .'/languages/');327 return load_plugin_textdomain( $domain, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/'); 328 328 } 329 329 } -
jmitch-tinylytics/trunk/readme.txt
r3037227 r3039297 10 10 Requires at least: 4.6 11 11 Tested up to: 6.4.3 12 Stable tag: 1.0. 413 Version: 1.0. 412 Stable tag: 1.0.5 13 Version: 1.0.5 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.0.5 (02-21-2024)** 145 146 * Fix a minor site error if options have not been set in the plugin yet. 147 * Remove an unused CSS style. 148 * Code clean up for readability sake. 149 144 150 **Version 1.0.4 (02-17-2024)** 145 151 -
jmitch-tinylytics/trunk/uninstall.php
r3035382 r3039297 1 1 <?php // delete the Tinylytics settings on uninstall... 2 2 3 if ( ! defined( 'ABSPATH') ) exit();3 if ( ! defined( 'ABSPATH' ) ) exit(); 4 4 5 5 // delete options 6 delete_option( 'jmitch_tinylytics_settings');6 delete_option( 'jmitch_tinylytics_settings' );
Note: See TracChangeset
for help on using the changeset viewer.