Plugin Directory

Changeset 1301011


Ignore:
Timestamp:
12/05/2015 08:26:58 AM (10 years ago)
Author:
Ali.Dbg
Message:

update wp-farsi to v3.1
fixed bug

Location:
wp-farsi
Files:
7 added
2 edited

Legend:

Unmodified
Added
Removed
  • wp-farsi/trunk/readme.txt

    r1300907 r1301011  
    4444
    4545== Changelog ==
     46
     47= 3.1 =
     48* Minor bug correct
    4649
    4750= 3.0 =
  • wp-farsi/trunk/wp-farsi.php

    r1300907 r1301011  
    66Author: Ali.Dbg 😉
    77Author URI: https://github.com/alidbg/wp-farsi
    8 Version: 3.0
     8Version: 3.1
    99License: GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html)
    1010*/
     
    4242}
    4343
    44 function exception_date(){
    45     if (is_feed() or defined('WXR_VERSION') or isset($autosave) or isset($lasttime) or isset($signup))
    46          return true;
     44
     45function iss_uri($s = '') {
     46    if (isset($_SERVER['REQUEST_URI']) and trim($s) !== '') {
     47        $r = trim($_SERVER['REQUEST_URI']);
     48        if ($r !== '' or $r !== '/')
     49            if (strpos($r, $s) !== false)
     50                return true;
     51    }
     52    return false;
     53}
     54
     55function exception_date() {
     56    if (iss_uri('/feed') or iss_uri('feed=') or defined('WXR_VERSION') or isset($autosave) or isset($lasttime) or isset($signup))
     57        return true;
    4758    else
    4859        return false;
    4960}
    5061
    51 function wpfa_date_i18n( $g, $f, $t ) {
    52     if(exception_date())
    53     return date($f,$t);
     62function wpfa_date_i18n($g, $f, $t) {
     63    if (exception_date())
     64        return date($f, $t);
    5465    else
    55     $d = wpfa_date($f, intval($t));
     66        $d = wpfa_date($f, intval($t));
    5667    return WPFA_NUMS === "on" ? numbers_fa($d) : $d;
    5768}
Note: See TracChangeset for help on using the changeset viewer.