Changeset 1406031
- Timestamp:
- 04/27/2016 11:02:50 PM (10 years ago)
- Location:
- wp-farsi
- Files:
-
- 222 added
- 1 edited
-
tags/1.0 (added)
-
tags/1.0/index.php (added)
-
tags/1.0/license.html (added)
-
tags/1.0/pdate.php (added)
-
tags/1.0/wp-farsi.php (added)
-
tags/1.1 (added)
-
tags/1.1/index.php (added)
-
tags/1.1/license.html (added)
-
tags/1.1/pdate.php (added)
-
tags/1.1/wp-farsi.php (added)
-
tags/1.2 (added)
-
tags/1.2/index.php (added)
-
tags/1.2/license.html (added)
-
tags/1.2/pdate.php (added)
-
tags/1.2/wp-farsi.php (added)
-
tags/1.5 (added)
-
tags/1.5/index.php (added)
-
tags/1.5/license.html (added)
-
tags/1.5/pdate.php (added)
-
tags/1.5/wp-farsi.php (added)
-
tags/1.6 (added)
-
tags/1.6/index.php (added)
-
tags/1.6/license.html (added)
-
tags/1.6/pdate.php (added)
-
tags/1.6/wp-farsi.php (added)
-
tags/1.7 (added)
-
tags/1.7/index.php (added)
-
tags/1.7/license.html (added)
-
tags/1.7/pdate.php (added)
-
tags/1.7/wp-farsi.php (added)
-
tags/1.8 (added)
-
tags/1.8.1 (added)
-
tags/1.8.1/index.php (added)
-
tags/1.8.1/license.html (added)
-
tags/1.8.1/pdate.php (added)
-
tags/1.8.1/wp-farsi.php (added)
-
tags/1.8.2 (added)
-
tags/1.8.2/index.php (added)
-
tags/1.8.2/license.html (added)
-
tags/1.8.2/pdate.php (added)
-
tags/1.8.2/wp-farsi.php (added)
-
tags/1.8/index.php (added)
-
tags/1.8/license.html (added)
-
tags/1.8/pdate.php (added)
-
tags/1.8/wp-farsi.php (added)
-
tags/2.0 (added)
-
tags/2.0.1 (added)
-
tags/2.0.1/index.php (added)
-
tags/2.0.1/license.html (added)
-
tags/2.0.1/pdate.php (added)
-
tags/2.0.1/wp-farsi.php (added)
-
tags/2.0/index.php (added)
-
tags/2.0/license.html (added)
-
tags/2.0/pdate.php (added)
-
tags/2.0/wp-farsi.php (added)
-
tags/2.3.3 (added)
-
tags/2.3.3/index.php (added)
-
tags/2.3.3/license.html (added)
-
tags/2.3.3/pdate.php (added)
-
tags/2.3.3/wp-farsi.php (added)
-
tags/2.4.0 (added)
-
tags/2.4.0/index.php (added)
-
tags/2.4.0/license.html (added)
-
tags/2.4.0/pdate.php (added)
-
tags/2.4.0/wp-farsi.php (added)
-
tags/2.4.0/wpfa_admin.php (added)
-
tags/2.4.1 (added)
-
tags/2.4.1/index.php (added)
-
tags/2.4.1/license.html (added)
-
tags/2.4.1/pdate.php (added)
-
tags/2.4.1/wp-farsi.php (added)
-
tags/2.4.1/wpfa_admin.php (added)
-
tags/2.4.2 (added)
-
tags/2.4.2/index.php (added)
-
tags/2.4.2/license.html (added)
-
tags/2.4.2/pdate.php (added)
-
tags/2.4.2/wp-farsi.php (added)
-
tags/2.4.2/wpfa_admin.php (added)
-
tags/2.4.3 (added)
-
tags/2.4.3.1 (added)
-
tags/2.4.3.1/index.php (added)
-
tags/2.4.3.1/license.html (added)
-
tags/2.4.3.1/pdate.php (added)
-
tags/2.4.3.1/wp-farsi.php (added)
-
tags/2.4.3.1/wpfa_admin.php (added)
-
tags/2.4.3/index.php (added)
-
tags/2.4.3/license.html (added)
-
tags/2.4.3/pdate.php (added)
-
tags/2.4.3/wp-farsi.php (added)
-
tags/2.4.3/wpfa_admin.php (added)
-
tags/3..3.3 (added)
-
tags/3..3.3/assets (added)
-
tags/3..3.3/assets/DroidNaskh-Bold.woff (added)
-
tags/3..3.3/assets/DroidNaskh-Regular.woff (added)
-
tags/3..3.3/assets/index.html (added)
-
tags/3..3.3/assets/wpfa-font.css (added)
-
tags/3..3.3/assets/wpfajs.js (added)
-
tags/3..3.3/includes (added)
-
tags/3..3.3/includes/index.html (added)
-
tags/3..3.3/includes/pdate.php (added)
-
tags/3..3.3/includes/wpfa_admin.php (added)
-
tags/3..3.3/index.php (added)
-
tags/3..3.3/license.html (added)
-
tags/3..3.3/readme.txt (added)
-
tags/3..3.3/wp-farsi.php (added)
-
tags/3.0 (added)
-
tags/3.0/index.php (added)
-
tags/3.0/license.html (added)
-
tags/3.0/pdate.php (added)
-
tags/3.0/readme.txt (added)
-
tags/3.0/wp-farsi.php (added)
-
tags/3.0/wpfa_admin.php (added)
-
tags/3.1 (added)
-
tags/3.1.2 (added)
-
tags/3.1.2/index.php (added)
-
tags/3.1.2/license.html (added)
-
tags/3.1.2/pdate.php (added)
-
tags/3.1.2/readme.txt (added)
-
tags/3.1.2/wp-farsi.php (added)
-
tags/3.1.2/wpfa_admin.php (added)
-
tags/3.1.3 (added)
-
tags/3.1.3/index.php (added)
-
tags/3.1.3/license.html (added)
-
tags/3.1.3/pdate.php (added)
-
tags/3.1.3/readme.txt (added)
-
tags/3.1.3/wp-farsi.php (added)
-
tags/3.1.3/wpfa_admin.php (added)
-
tags/3.1/index.php (added)
-
tags/3.1/license.html (added)
-
tags/3.1/pdate.php (added)
-
tags/3.1/readme.txt (added)
-
tags/3.1/wp-farsi.php (added)
-
tags/3.1/wpfa_admin.php (added)
-
tags/3.3.1 (added)
-
tags/3.3.1/assets (added)
-
tags/3.3.1/assets/DroidNaskh-Bold.woff (added)
-
tags/3.3.1/assets/DroidNaskh-Regular.woff (added)
-
tags/3.3.1/assets/index.html (added)
-
tags/3.3.1/assets/wpfa-font.css (added)
-
tags/3.3.1/assets/wpfajs.js (added)
-
tags/3.3.1/includes (added)
-
tags/3.3.1/includes/index.html (added)
-
tags/3.3.1/includes/pdate.php (added)
-
tags/3.3.1/includes/wpfa_admin.php (added)
-
tags/3.3.1/index.php (added)
-
tags/3.3.1/license.html (added)
-
tags/3.3.1/readme.txt (added)
-
tags/3.3.2 (added)
-
tags/3.3.2/assets (added)
-
tags/3.3.2/assets/DroidNaskh-Bold.woff (added)
-
tags/3.3.2/assets/DroidNaskh-Regular.woff (added)
-
tags/3.3.2/assets/index.html (added)
-
tags/3.3.2/assets/wpfa-font.css (added)
-
tags/3.3.2/assets/wpfajs.js (added)
-
tags/3.3.2/includes (added)
-
tags/3.3.2/includes/index.html (added)
-
tags/3.3.2/includes/pdate.php (added)
-
tags/3.3.2/includes/wpfa_admin.php (added)
-
tags/3.3.2/index.php (added)
-
tags/3.3.2/license.html (added)
-
tags/3.3.2/readme.txt (added)
-
tags/3.3.2/wp-farsi.php (added)
-
tags/3.3.4 (added)
-
tags/3.3.4/assets (added)
-
tags/3.3.4/assets/DroidNaskh-Bold.woff (added)
-
tags/3.3.4/assets/DroidNaskh-Regular.woff (added)
-
tags/3.3.4/assets/index.html (added)
-
tags/3.3.4/assets/wpfa-font.css (added)
-
tags/3.3.4/assets/wpfajs.js (added)
-
tags/3.3.4/includes (added)
-
tags/3.3.4/includes/index.html (added)
-
tags/3.3.4/includes/pdate.php (added)
-
tags/3.3.4/includes/wpfa_admin.php (added)
-
tags/3.3.4/index.php (added)
-
tags/3.3.4/license.html (added)
-
tags/3.3.4/readme.txt (added)
-
tags/3.3.4/wp-farsi.php (added)
-
tags/3.3.5 (added)
-
tags/3.3.5/assets (added)
-
tags/3.3.5/assets/DroidNaskh-Bold.woff (added)
-
tags/3.3.5/assets/DroidNaskh-Regular.woff (added)
-
tags/3.3.5/assets/index.html (added)
-
tags/3.3.5/assets/wpfa-font.css (added)
-
tags/3.3.5/assets/wpfajs.js (added)
-
tags/3.3.5/includes (added)
-
tags/3.3.5/includes/index.html (added)
-
tags/3.3.5/includes/pdate.php (added)
-
tags/3.3.5/includes/wpfa_admin.php (added)
-
tags/3.3.5/index.php (added)
-
tags/3.3.5/license.html (added)
-
tags/3.3.5/readme.txt (added)
-
tags/3.3.5/wp-farsi.php (added)
-
tags/3.6 (added)
-
tags/3.6/assets (added)
-
tags/3.6/assets/DroidNaskh-Bold.woff (added)
-
tags/3.6/assets/DroidNaskh-Regular.woff (added)
-
tags/3.6/assets/index.html (added)
-
tags/3.6/assets/wpfa-font.css (added)
-
tags/3.6/assets/wpfajs.js (added)
-
tags/3.6/includes (added)
-
tags/3.6/includes/index.html (added)
-
tags/3.6/includes/pdate.php (added)
-
tags/3.6/includes/wpfa_admin.php (added)
-
tags/3.6/index.php (added)
-
tags/3.6/license.html (added)
-
tags/3.6/readme.txt (added)
-
tags/3.6/wp-farsi.php (added)
-
tags/4.0 (added)
-
tags/4.0/assets (added)
-
tags/4.0/assets/DroidNaskh-Bold.woff (added)
-
tags/4.0/assets/DroidNaskh-Regular.woff (added)
-
tags/4.0/assets/index.html (added)
-
tags/4.0/assets/wpfa-font.css (added)
-
tags/4.0/assets/wpfajs.js (added)
-
tags/4.0/includes (added)
-
tags/4.0/includes/index.html (added)
-
tags/4.0/includes/pdate.php (added)
-
tags/4.0/includes/wpfa_admin.php (added)
-
tags/4.0/index.php (added)
-
tags/4.0/license.html (added)
-
tags/4.0/readme.txt (added)
-
tags/4.0/wp-farsi.php (added)
-
trunk/wp-farsi.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-farsi/trunk/wp-farsi.php
r1403690 r1406031 6 6 Author: Ali.Dbg 😉 7 7 Author URI: https://github.com/alidbg/wp-farsi 8 Version: 3.08 Version: 4.0.1 9 9 License: GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html) 10 10 */ … … 25 25 if (file_exists($inc)) { 26 26 require_once($inc); 27 wp_download_language_pack('fa_IR'); 27 if(function_exists('wp_download_language_pack')) 28 wp_download_language_pack('fa_IR'); 28 29 update_option('WPLANG', 'fa_IR'); 29 30 } … … 33 34 function wpfa_file_put_contents($file = '', $str = '') { 34 35 $fp = fopen($file, "w"); 35 if ( flock($fp, LOCK_EX | LOCK_NB)) {36 if ($fp !== FALSE and flock($fp, LOCK_EX)) { 36 37 fwrite($fp, $str); 37 38 sleep(2); … … 41 42 } 42 43 44 function wpfa_file_get_contents($file = '') { 45 $content = ''; 46 $fp = fopen($file, "r"); 47 if ($fp !== FALSE and flock($fp, LOCK_SH)) { 48 $content = fread($fp, filesize($file)); 49 usleep(100000); 50 flock($fp, LOCK_UN); 51 fclose($fp); 52 } else return false; 53 return $content; 54 } 55 43 56 function wpfa_patch_func() { 44 57 $file = ABSPATH . 'wp-includes/functions.php'; 45 58 if (is_writable($file)) { 46 $src = file_get_contents($file); 47 usleep(mt_rand(100000, 200000)); 48 if (preg_match_all('/else\s+return\s+(date.*)[(]/', $src, $match) === 1) { 59 $src = wpfa_file_get_contents($file); 60 if ($src and preg_match_all('/else\s+return\s+(date.*)[(]/', $src, $match) === 1) { 49 61 if (trim($match[1][0]) === 'date') { 50 62 wpfa_file_put_contents($file, str_replace($match[0][0], "else\n\t\treturn date_i18n(", $src)); … … 59 71 $file = ABSPATH . 'wp-includes/functions.php'; 60 72 if (is_writable($file)) { 61 $src = file_get_contents($file); 62 usleep(mt_rand(100000, 200000)); 63 if (preg_match_all('/else\s+return\s+(date_i18n.*)[(]/', $src, $match) === 1) { 73 $src = wpfa_file_get_contents($file); 74 if ($src and preg_match_all('/else\s+return\s+(date_i18n.*)[(]/', $src, $match) === 1) { 64 75 65 76 if (trim($match[1][0]) === 'date_i18n') {
Note: See TracChangeset
for help on using the changeset viewer.