Plugin Directory

Changeset 2965320


Ignore:
Timestamp:
09/11/2023 12:27:19 PM (3 years ago)
Author:
mekshq
Message:

version 1.1.7

Location:
meks-time-ago/trunk
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • meks-time-ago/trunk/meks-time-ago.php

    r2871667 r2965320  
    44Plugin URI: https://mekshq.com
    55Description: 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.6
     6Version: 1.1.7
    77Author: Meks
    88Author URI: https://mekshq.com
     
    2626
    2727/* Define internal version for possible update changes */
    28 define( 'MEKS_TA_VER', '1.1.6' );
     28define( 'MEKS_TA_VER', '1.1.7' );
    2929
    3030/* Load Up the text domain */
     
    6565
    6666}
    67 
    68 /**
    69  * Upsell Meks themes with notice info
    70  *
    71  * @return void
    72  */
    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                         <?php
    99                             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                 <?php
    104 
    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 ajax
    118  *
    119  * @return void
    120  */
    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 scripts
    135  *
    136  * @return void
    137  */
    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  
    44Tags: date, time, ago, custom, format, post, page, the_date, the_time
    55Requires at least: 3.7
    6 Tested up to: 6.1
    7 Stable tag: 1.1.6
     6Tested up to: 6.3
     7Stable tag: 1.1.7
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl.html
     
    4242== Changelog ==
    4343
    44 * arabic translation
     44
     45= 1.1.7 =
     46* WP 6.3 compatibility tested
     47* Patched a minor security issue
    4548
    4649= 1.1.6 =
Note: See TracChangeset for help on using the changeset viewer.