Changeset 2845183
- Timestamp:
- 01/08/2023 07:48:06 PM (3 years ago)
- Location:
- moein-dictionary-free/trunk
- Files:
-
- 9 edited
-
assets/style.css (modified) (3 diffs)
-
assets/tooltip.js (modified) (1 diff)
-
inc/admin/add-word.php (modified) (2 diffs)
-
inc/admin/dashboard-template.php (modified) (1 diff)
-
inc/admin/import-data.php (modified) (3 diffs)
-
lang/mdict-fa_IR.mo (modified) (previous)
-
lang/mdict-fa_IR.po (modified) (4 diffs)
-
moein-dictionary-free.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
moein-dictionary-free/trunk/assets/style.css
r2835283 r2845183 69 69 display: block; 70 70 } 71 .mdict-tooltip 72 { 73 margin-top: 2.3em; 74 } 71 75 72 76 .mdict-tooltip a … … 74 78 color: #fff; 75 79 font-family: "Vazirmatn", sans-serif; 80 height: 2.5em; 81 padding: 5px; 76 82 } 77 83 … … 105 111 width: 100%; 106 112 } 113 114 .mdict-tooltip 115 { 116 margin-top: 3.4em; 117 } 107 118 } 108 119 -
moein-dictionary-free/trunk/assets/tooltip.js
r2835283 r2845183 60 60 transition: 'transform 0.2s ease-out', 61 61 top: rect.top + $(window).scrollTop(), 62 marginTop: '2em',63 62 left: rect.right - tooltipWidth 64 63 }); -
moein-dictionary-free/trunk/inc/admin/add-word.php
r2835283 r2845183 69 69 <tr> 70 70 <th scope="row"><label for="word"><?php _e('Word', 'mdict'); ?></label></th> 71 <td><input name="word" type="text" id="word" value="<?php echo sanitize_text_field($word) ?>" class="regular-text"></td>71 <td><input name="word" type="text" id="word" value="<?php echo sanitize_text_field($word) ?>" class="regular-text"></td> 72 72 </tr> 73 73 <tr> … … 149 149 do_action('mdict_word_add', $data_id, $data_array); 150 150 151 $url = esc_url(admin_url('admin.php?page=mdict-add&item_id=' . $data_id));152 wp_redirect( $url);151 $url = add_query_arg(array('page' => 'mdict-add', 'item_id' => $data_id,), admin_url('admin.php')); 152 wp_redirect(esc_url_raw($url)); 153 153 exit(); 154 154 } -
moein-dictionary-free/trunk/inc/admin/dashboard-template.php
r2835283 r2845183 28 28 ?> 29 29 </li> 30 <li>✔ <?php printf(__('Version: %s', 'mdict'), MDC_PLUGIN_VERSION ) . ' - ' . __('free version', 'mdict'); ?></li>30 <li>✔ <?php printf(__('Version: %s', 'mdict'), MDC_PLUGIN_VERSION . ' - ' . __('free version', 'mdict')); ?></li> 31 31 32 32 </ul> -
moein-dictionary-free/trunk/inc/admin/import-data.php
r2835283 r2845183 53 53 public static function generate_wpdb_prepare($array) { 54 54 $placeholders = array_map(function ($item) { 55 return is_numeric($item) ? '%f' : ( is_float($item) ? '%f' : ( is_string($item) ? '%s' : '' ) );55 return is_numeric($item) ? '%f' : ( is_float($item) ? '%f' : ( is_string($item) ? '%s' : '' ) ); 56 56 }, $array); 57 57 return '(' . join(',', $placeholders) . ')'; … … 80 80 $in_str = self::generate_wpdb_prepare($items); 81 81 $sql = "SELECT COUNT(*) FROM $table WHERE `id` IN {$in_str}"; 82 // print_r($wpdb->prepare($sql, $items));82 // print_r($wpdb->prepare($sql, $items)); 83 83 $res = $wpdb->get_var($wpdb->prepare($sql, $items)); 84 84 return $res == 2; … … 112 112 mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); 113 113 } 114 115 114 $con = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); 116 115 117 116 if (mysqli_connect_errno()) 118 117 { 119 die("Failed to connect to MySQL: " . mysqli_connect_error()); 118 //die("Failed to connect to MySQL: " . mysqli_connect_error()); 119 $error = "Failed to connect to MySQL!"; 120 $result = 0; 121 return ['result' => 0, 'last_index' => 0, 'error' => $error]; 120 122 } 123 124 try 125 { 126 $utf8 = mysqli_set_charset($con, "utf8"); 127 $last_index = 0; 128 // Run the SQL 129 if (mysqli_multi_query($con, $sql_queries)) 130 { 131 do 132 { 133 mysqli_next_result($con); 134 $last_index++; 135 } 136 while (mysqli_more_results($con)); 137 } 121 138 122 $utf8 = mysqli_set_charset($con, "utf8"); 123 $last_index = 0; 124 125 // Run the SQL 126 if (mysqli_multi_query($con, $sql_queries)) 139 $error = ""; 140 $result = 1; 141 if (mysqli_errno($con)) 142 { 143 $error = mysqli_error($con); 144 $result = 0; 145 } 146 } 147 catch (mysqli_sql_exception $ex) 127 148 { 128 do 129 { 130 mysqli_next_result($con); 131 $last_index++; 132 } 133 while (mysqli_more_results($con)); 134 } 135 136 $error = ""; 137 $result = 1; 138 if (mysqli_errno($con)) 139 { 140 $error = mysqli_error($con); 149 $error = $ex->getMessage(); 141 150 $result = 0; 142 151 } 143 152 153 mysqli_close($con); 154 144 155 return ['result' => $result, 'last_index' => $last_index, 'error' => $error]; 145 156 } -
moein-dictionary-free/trunk/lang/mdict-fa_IR.po
r2835283 r2845183 2 2 msgstr "" 3 3 "Project-Id-Version: Moein Dictionary\n" 4 "POT-Creation-Date: 202 2-12-16 15:04+0330\n"5 "PO-Revision-Date: 202 2-12-16 15:04+0330\n"4 "POT-Creation-Date: 2023-01-08 23:00+0330\n" 5 "PO-Revision-Date: 2023-01-08 23:01+0330\n" 6 6 "Last-Translator: \n" 7 7 "Language-Team: \n" … … 47 47 48 48 #: inc/admin/add-word.php:70 inc/admin/words-table.php:9 49 #: inc/admin/words-table.php:6 249 #: inc/admin/words-table.php:64 50 50 msgid "Word" 51 51 msgstr "واژه" 52 52 53 #: inc/admin/add-word.php:74 inc/admin/words-table.php:6 353 #: inc/admin/add-word.php:74 inc/admin/words-table.php:65 54 54 msgid "Description" 55 55 msgstr "شرح" … … 169 169 msgstr "پیشخوان" 170 170 171 #: inc/admin/import-data.php: 91171 #: inc/admin/import-data.php:101 172 172 msgid "It is already installed." 173 173 msgstr "قبلاً نصب شده است." 174 174 175 #: inc/admin/import-data.php:1 38175 #: inc/admin/import-data.php:159 176 176 msgid "Data not found!" 177 177 msgstr "دادهها یافت نشد!" … … 242 242 msgstr "جستجوی لغت" 243 243 244 #: inc/admin/words-table.php:3 6244 #: inc/admin/words-table.php:38 245 245 #, php-format 246 246 msgid "%d item(s) were removed." 247 247 msgstr "%d مورد حذف شد." 248 248 249 #: inc/admin/words-table.php:4 4249 #: inc/admin/words-table.php:46 250 250 msgid "Please select one or more." 251 251 msgstr "لطفاً موردی را انتخاب کنید." 252 252 253 #: inc/admin/words-table.php:5 6inc/templates/searchbox.php:65253 #: inc/admin/words-table.php:58 inc/templates/searchbox.php:65 254 254 msgid "Nothing found!" 255 255 msgstr "موردی یافت نشد!" 256 256 257 #: inc/admin/words-table.php:6 4257 #: inc/admin/words-table.php:66 258 258 msgid "ID" 259 259 msgstr "شناسه" 260 260 261 #: inc/admin/words-table.php:7 7261 #: inc/admin/words-table.php:79 262 262 msgid "Delete" 263 263 msgstr "حذف" 264 264 265 #: inc/admin/words-table.php:14 3265 #: inc/admin/words-table.php:147 266 266 msgid "Edit" 267 267 msgstr "ویرایش" -
moein-dictionary-free/trunk/moein-dictionary-free.php
r2835283 r2845183 3 3 Plugin Name: Moein Dictionary(free) 4 4 Description: Moein Persian dictionary(free version) 5 Version: 1. 4.15 Version: 1.5.0 6 6 Author: ham3da 7 7 Plugin URI: https://wordpress.org/plugins/moein-dictionary-free … … 18 18 } 19 19 20 define('MDC_PLUGIN_VERSION', '1. 4.1');20 define('MDC_PLUGIN_VERSION', '1.5.0'); 21 21 define('MDC_PLUGIN_FILE', __FILE__); 22 22 define('MDC_PLUGIN_DIR', plugin_dir_path(__FILE__)); -
moein-dictionary-free/trunk/readme.txt
r2835283 r2845183 4 4 Requires at least: 5.0 5 5 Tested up to: 6.1.1 6 Stable tag: 1. 4.16 Stable tag: 1.5.0 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later … … 36 36 37 37 == Changelog == 38 = 1.4.2 = 39 * Optimizing data import 38 40 39 41 = 1.4.1 =
Note: See TracChangeset
for help on using the changeset viewer.