Changeset 2965320
- Timestamp:
- 09/11/2023 12:27:19 PM (3 years ago)
- Location:
- meks-time-ago/trunk
- Files:
-
- 1 deleted
- 2 edited
-
js (deleted)
-
meks-time-ago.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
meks-time-ago/trunk/meks-time-ago.php
r2871667 r2965320 4 4 Plugin URI: https://mekshq.com 5 5 Description: Automatically change your post date display to "time ago" format like "1 hour ago", "3 weeks ago", "2 months ago" etc... 6 Version: 1.1. 66 Version: 1.1.7 7 7 Author: Meks 8 8 Author URI: https://mekshq.com … … 26 26 27 27 /* Define internal version for possible update changes */ 28 define( 'MEKS_TA_VER', '1.1. 6' );28 define( 'MEKS_TA_VER', '1.1.7' ); 29 29 30 30 /* Load Up the text domain */ … … 65 65 66 66 } 67 68 /**69 * Upsell Meks themes with notice info70 *71 * @return void72 */73 add_action( 'admin_notices', 'meks_admin_notice__info' );74 75 if ( ! function_exists( 'meks_admin_notice__info' ) ) :76 77 function meks_admin_notice__info() {78 79 $meks_themes = array( 'shamrock', 'awsm', 'safarica', 'seashell', 'sidewalk', 'throne', 'voice', 'herald', 'vlog', 'gridlove', 'pinhole', 'typology', 'trawell', 'opinion', 'johannes', 'megaphone', 'toucan', 'roogan' );80 $active_theme = get_option( 'template' );81 82 83 if ( ! in_array( $active_theme, $meks_themes ) ) {84 85 if ( get_option('has_transient') == 0 ) {86 set_transient( 'meks_admin_notice_time_'. get_current_user_id() , true, WEEK_IN_SECONDS );87 update_option('has_transient', 1);88 update_option('track_transient', 1);89 }90 91 if ( !get_option('meks_admin_notice_info') || ( get_option('track_transient') && !get_transient( 'meks_admin_notice_time_'. get_current_user_id() ) ) ) {92 93 $all_themes = wp_get_themes();94 95 ?>96 <div class="meks-notice notice notice-info is-dismissible">97 <p>98 <?php99 echo sprintf( __( 'You are currently using %1$s theme. Did you know that Meks plugins give you more features and flexibility with one of our <a href="%2$s">Meks themes</a>?', 'meks-time-ago' ), $all_themes[ $active_theme ], 'https://1.envato.market/4DE2o' );100 ?>101 </p>102 </div>103 <?php104 105 }106 } else {107 delete_option('meks_admin_notice_info');108 delete_option('has_transient');109 delete_option('track_transient');110 }111 }112 113 endif;114 115 116 /**117 * Colose/remove info notice with ajax118 *119 * @return void120 */121 add_action( 'wp_ajax_meks_remove_notification', 'meks_remove_notification' );122 add_action( 'wp_ajax_nopriv_meks_remove_notification', 'meks_remove_notification' );123 124 if ( !function_exists( 'meks_remove_notification' ) ) :125 function meks_remove_notification() {126 add_option('meks_admin_notice_info', 1);127 if ( !get_transient( 'meks_admin_notice_time_'. get_current_user_id() ) ) {128 update_option('track_transient', 0);129 }130 }131 endif;132 133 /**134 * Add admin scripts135 *136 * @return void137 */138 add_action( 'admin_enqueue_scripts', 'meks_time_ago_enqueue_admin_scripts' );139 140 if ( !function_exists( 'meks_time_ago_enqueue_admin_scripts' ) ) :141 function meks_time_ago_enqueue_admin_scripts() {142 wp_enqueue_script( 'meks-time-ago', plugin_dir_url( __FILE__ ) . 'js/admin.js', array('jquery'), MEKS_TA_VER );143 }144 endif; -
meks-time-ago/trunk/readme.txt
r2871667 r2965320 4 4 Tags: date, time, ago, custom, format, post, page, the_date, the_time 5 5 Requires at least: 3.7 6 Tested up to: 6. 17 Stable tag: 1.1. 66 Tested up to: 6.3 7 Stable tag: 1.1.7 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl.html … … 42 42 == Changelog == 43 43 44 * arabic translation 44 45 = 1.1.7 = 46 * WP 6.3 compatibility tested 47 * Patched a minor security issue 45 48 46 49 = 1.1.6 =
Note: See TracChangeset
for help on using the changeset viewer.