@@ -241,16 +241,16 @@ discard block |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
244 | - * If you have a class that's mostly/entirely static, and you need static |
|
245 | - * properties, you can use this method to simulate them. Eg. in your method(s) |
|
246 | - * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar'); |
|
247 | - * You MUST use a reference, or they will not persist! |
|
248 | - * |
|
249 | - * @param string $class The calling classname, to prevent clashes |
|
250 | - * @param string $var The variable to retrieve. |
|
251 | - * @return mixed A reference to the variable. If not set it will be |
|
252 | - * auto initialised to NULL. |
|
253 | - */ |
|
244 | + * If you have a class that's mostly/entirely static, and you need static |
|
245 | + * properties, you can use this method to simulate them. Eg. in your method(s) |
|
246 | + * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar'); |
|
247 | + * You MUST use a reference, or they will not persist! |
|
248 | + * |
|
249 | + * @param string $class The calling classname, to prevent clashes |
|
250 | + * @param string $var The variable to retrieve. |
|
251 | + * @return mixed A reference to the variable. If not set it will be |
|
252 | + * auto initialised to NULL. |
|
253 | + */ |
|
254 | 254 | public static function &getStaticProperty($class, $var) |
255 | 255 | { |
256 | 256 | static $properties; |
@@ -266,14 +266,14 @@ discard block |
||
266 | 266 | } |
267 | 267 | |
268 | 268 | /** |
269 | - * Use this function to register a shutdown method for static |
|
270 | - * classes. |
|
271 | - * |
|
272 | - * @param mixed $func The function name (or array of class/method) to call |
|
273 | - * @param mixed $args The arguments to pass to the function |
|
274 | - * |
|
275 | - * @return void |
|
276 | - */ |
|
269 | + * Use this function to register a shutdown method for static |
|
270 | + * classes. |
|
271 | + * |
|
272 | + * @param mixed $func The function name (or array of class/method) to call |
|
273 | + * @param mixed $args The arguments to pass to the function |
|
274 | + * |
|
275 | + * @return void |
|
276 | + */ |
|
277 | 277 | public static function registerShutdownFunc($func, $args = []) |
278 | 278 | { |
279 | 279 | // if we are called statically, there is a potential |
@@ -526,13 +526,13 @@ discard block |
||
526 | 526 | */ |
527 | 527 | protected static function _raiseError( |
528 | 528 | $object, |
529 | - $message = null, |
|
530 | - $code = null, |
|
531 | - $mode = null, |
|
532 | - $options = null, |
|
533 | - $userinfo = null, |
|
534 | - $error_class = null, |
|
535 | - $skipmsg = false |
|
529 | + $message = null, |
|
530 | + $code = null, |
|
531 | + $mode = null, |
|
532 | + $options = null, |
|
533 | + $userinfo = null, |
|
534 | + $error_class = null, |
|
535 | + $skipmsg = false |
|
536 | 536 | ) { |
537 | 537 | // The error is yet a PEAR error object |
538 | 538 | if (is_object($message)) { |
@@ -744,12 +744,12 @@ discard block |
||
744 | 744 | } |
745 | 745 | |
746 | 746 | /** |
747 | - * OS independent PHP extension load. Remember to take care |
|
748 | - * on the correct extension name for case sensitive OSes. |
|
749 | - * |
|
750 | - * @param string $ext The extension name |
|
751 | - * @return bool Success or not on the dl() call |
|
752 | - */ |
|
747 | + * OS independent PHP extension load. Remember to take care |
|
748 | + * on the correct extension name for case sensitive OSes. |
|
749 | + * |
|
750 | + * @param string $ext The extension name |
|
751 | + * @return bool Success or not on the dl() call |
|
752 | + */ |
|
753 | 753 | public static function loadExtension($ext) |
754 | 754 | { |
755 | 755 | if (extension_loaded($ext)) { |
@@ -1100,13 +1100,13 @@ discard block |
||
1100 | 1100 | } |
1101 | 1101 | return sprintf( |
1102 | 1102 | '[%s: message="%s" code=%d mode=callback '. |
1103 | - 'callback=%s prefix="%s" info="%s"]', |
|
1104 | - strtolower(get_class($this)), |
|
1103 | + 'callback=%s prefix="%s" info="%s"]', |
|
1104 | + strtolower(get_class($this)), |
|
1105 | 1105 | $this->message, |
1106 | 1106 | $this->code, |
1107 | - $callback, |
|
1107 | + $callback, |
|
1108 | 1108 | $this->error_message_prefix, |
1109 | - $this->userinfo |
|
1109 | + $this->userinfo |
|
1110 | 1110 | ); |
1111 | 1111 | } |
1112 | 1112 | if ($this->mode & PEAR_ERROR_PRINT) { |
@@ -1123,14 +1123,14 @@ discard block |
||
1123 | 1123 | } |
1124 | 1124 | return sprintf( |
1125 | 1125 | '[%s: message="%s" code=%d mode=%s level=%s '. |
1126 | - 'prefix="%s" info="%s"]', |
|
1127 | - strtolower(get_class($this)), |
|
1126 | + 'prefix="%s" info="%s"]', |
|
1127 | + strtolower(get_class($this)), |
|
1128 | 1128 | $this->message, |
1129 | 1129 | $this->code, |
1130 | - implode('|', $modes), |
|
1130 | + implode('|', $modes), |
|
1131 | 1131 | $levels[$this->level], |
1132 | - $this->error_message_prefix, |
|
1133 | - $this->userinfo |
|
1132 | + $this->error_message_prefix, |
|
1133 | + $this->userinfo |
|
1134 | 1134 | ); |
1135 | 1135 | } |
1136 | 1136 | } |
@@ -57,22 +57,22 @@ |
||
57 | 57 | * @access private |
58 | 58 | */ |
59 | 59 | private $messages = [// / |
60 | - 'unknow' => [1, 'Console_Getopt: unknown error ID (%s)'], |
|
61 | - // original Console_Getopt error messages |
|
62 | - 'ambigous' => [10, 'Console_Getopt: option --%s is ambiguous'], |
|
63 | - 'mandatory' => [11, 'Console_Getopt: option requires an argument --%s'], |
|
64 | - 'noargument' => [12, 'Console_Getopt: option --%s doesn\'t allow an argument'], |
|
65 | - 'noargs' => [13, 'Console_Getopt: Could not read cmd args (register_argc_argv=Off?)'], |
|
66 | - 'unrecognized' => [14, 'Console_Getopt: unrecognized option --%s'], |
|
67 | - // additional Console_GetoptPlus_Getopt error messages |
|
68 | - 'duplicate' => [20, 'Console_Getopt: duplicate option name definition --%s'], |
|
69 | - 'invalid' => [21, 'Console_Getopt: invalid long option definition %s'], |
|
70 | - 'string' => [22, 'Console_Getopt: short options definition must be a string'], |
|
71 | - 'syntax' => [23, 'Console_Getopt: short options definition syntax error %s'], |
|
72 | - // additional Console_GetoptPlus error messages |
|
73 | - 'missing' => [30, 'Console_GetoptPlus: unknown option name #%s'], |
|
74 | - 'type' => [31, 'Console_GetoptPlus: unknown option type %s'], |
|
75 | - 'convert' => [32, 'Console_GetoptPlus: wrong option name conversion %s'], |
|
60 | + 'unknow' => [1, 'Console_Getopt: unknown error ID (%s)'], |
|
61 | + // original Console_Getopt error messages |
|
62 | + 'ambigous' => [10, 'Console_Getopt: option --%s is ambiguous'], |
|
63 | + 'mandatory' => [11, 'Console_Getopt: option requires an argument --%s'], |
|
64 | + 'noargument' => [12, 'Console_Getopt: option --%s doesn\'t allow an argument'], |
|
65 | + 'noargs' => [13, 'Console_Getopt: Could not read cmd args (register_argc_argv=Off?)'], |
|
66 | + 'unrecognized' => [14, 'Console_Getopt: unrecognized option --%s'], |
|
67 | + // additional Console_GetoptPlus_Getopt error messages |
|
68 | + 'duplicate' => [20, 'Console_Getopt: duplicate option name definition --%s'], |
|
69 | + 'invalid' => [21, 'Console_Getopt: invalid long option definition %s'], |
|
70 | + 'string' => [22, 'Console_Getopt: short options definition must be a string'], |
|
71 | + 'syntax' => [23, 'Console_Getopt: short options definition syntax error %s'], |
|
72 | + // additional Console_GetoptPlus error messages |
|
73 | + 'missing' => [30, 'Console_GetoptPlus: unknown option name #%s'], |
|
74 | + 'type' => [31, 'Console_GetoptPlus: unknown option type %s'], |
|
75 | + 'convert' => [32, 'Console_GetoptPlus: wrong option name conversion %s'], |
|
76 | 76 | ]; |
77 | 77 | |
78 | 78 | /** |
@@ -154,11 +154,11 @@ |
||
154 | 154 | * @access private |
155 | 155 | */ |
156 | 156 | private $type = [// / |
157 | - false => 'noarg', |
|
158 | - '=' => 'mandatory', |
|
159 | - ':' => 'mandatory', |
|
160 | - '==' => 'optional', |
|
161 | - '::' => 'optional', |
|
157 | + false => 'noarg', |
|
158 | + '=' => 'mandatory', |
|
159 | + ':' => 'mandatory', |
|
160 | + '==' => 'optional', |
|
161 | + '::' => 'optional', |
|
162 | 162 | ]; |
163 | 163 | |
164 | 164 | /** |
@@ -61,23 +61,23 @@ |
||
61 | 61 | if (version_compare(mysqli_get_server_info($XoopsDB->conn), '4.1.0', 'ge')): |
62 | 62 | |
63 | 63 | $sql = " DELETE FROM {$linkHandler->table}" |
64 | - . ' WHERE ' |
|
65 | - . " tag_modid = {$mid}" |
|
66 | - . ' AND ' |
|
67 | - . ' ( tag_itemid NOT IN ' |
|
68 | - . " ( SELECT DISTINCT {$itemHandler->keyName} " |
|
69 | - . " FROM {$itemHandler->table} " |
|
70 | - . " WHERE {$itemHandler->table}.photo_approved > 0" |
|
71 | - . ' ) ' |
|
72 | - . ' )'; else: |
|
64 | + . ' WHERE ' |
|
65 | + . " tag_modid = {$mid}" |
|
66 | + . ' AND ' |
|
67 | + . ' ( tag_itemid NOT IN ' |
|
68 | + . " ( SELECT DISTINCT {$itemHandler->keyName} " |
|
69 | + . " FROM {$itemHandler->table} " |
|
70 | + . " WHERE {$itemHandler->table}.photo_approved > 0" |
|
71 | + . ' ) ' |
|
72 | + . ' )'; else: |
|
73 | 73 | $sql = " DELETE {$linkHandler->table} FROM {$linkHandler->table}" |
74 | - . " LEFT JOIN {$itemHandler->table} AS aa ON {$linkHandler->table}.tag_itemid = aa.{$itemHandler->keyName} " |
|
75 | - . ' WHERE ' |
|
76 | - . " tag_modid = {$mid}" |
|
77 | - . ' AND ' |
|
78 | - . " ( aa.{$itemHandler->keyName} IS NULL" |
|
79 | - . ' OR aa.photo_approved < 1' |
|
80 | - . ' )'; |
|
74 | + . " LEFT JOIN {$itemHandler->table} AS aa ON {$linkHandler->table}.tag_itemid = aa.{$itemHandler->keyName} " |
|
75 | + . ' WHERE ' |
|
76 | + . " tag_modid = {$mid}" |
|
77 | + . ' AND ' |
|
78 | + . " ( aa.{$itemHandler->keyName} IS NULL" |
|
79 | + . ' OR aa.photo_approved < 1' |
|
80 | + . ' )'; |
|
81 | 81 | endif; |
82 | 82 | if (!$result = $linkHandler->db->queryF($sql)) { |
83 | 83 | //xoops_error($linkHandler->db->error()); |
@@ -202,9 +202,9 @@ |
||
202 | 202 | |
203 | 203 | // update the slide |
204 | 204 | wp_update_post(array( |
205 | - 'ID' => $this->slide->ID, |
|
206 | - 'menu_order' => $menu_order |
|
207 | - )); |
|
205 | + 'ID' => $this->slide->ID, |
|
206 | + 'menu_order' => $menu_order |
|
207 | + )); |
|
208 | 208 | } |
209 | 209 | |
210 | 210 | /** |
@@ -374,10 +374,10 @@ |
||
374 | 374 | { |
375 | 375 | // update the slide |
376 | 376 | wp_update_post(array( |
377 | - 'ID' => $this->slide->ID, |
|
378 | - 'post_excerpt' => $fields['post_excerpt'], |
|
379 | - 'menu_order' => $fields['menu_order'] |
|
380 | - )); |
|
377 | + 'ID' => $this->slide->ID, |
|
378 | + 'post_excerpt' => $fields['post_excerpt'], |
|
379 | + 'menu_order' => $fields['menu_order'] |
|
380 | + )); |
|
381 | 381 | |
382 | 382 | // store the URL as a meta field against the attachment |
383 | 383 | $this->add_or_update_or_delete_meta($this->slide->ID, 'url', $fields['url']); |
@@ -171,9 +171,9 @@ |
||
171 | 171 | |
172 | 172 | // if the file exists, just return it without going any further |
173 | 173 | $dest_file_name = $this->get_destination_file_name(array( |
174 | - 'width' => $this->container_width, |
|
175 | - 'height' => $this->container_height |
|
176 | - )); |
|
174 | + 'width' => $this->container_width, |
|
175 | + 'height' => $this->container_height |
|
176 | + )); |
|
177 | 177 | |
178 | 178 | if (file_exists($dest_file_name)) { |
179 | 179 | return str_replace(basename($this->url), basename($dest_file_name), $this->url); |
@@ -93,12 +93,12 @@ |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | $posts = get_posts(array( |
96 | - 'post_type' => 'ml-slider', |
|
97 | - 'post_status' => 'publish', |
|
98 | - 'orderby' => 'date', |
|
99 | - 'order' => 'ASC', |
|
100 | - 'posts_per_page' => -1 |
|
101 | - )); |
|
96 | + 'post_type' => 'ml-slider', |
|
97 | + 'post_status' => 'publish', |
|
98 | + 'orderby' => 'date', |
|
99 | + 'order' => 'ASC', |
|
100 | + 'posts_per_page' => -1 |
|
101 | + )); |
|
102 | 102 | |
103 | 103 | foreach ($posts as $post) { |
104 | 104 | $active = $selected_slider == $post->ID ? true : false; |
@@ -316,10 +316,10 @@ discard block |
||
316 | 316 | |
317 | 317 | // documentation tab |
318 | 318 | $screen->add_help_tab(array( |
319 | - 'id' => 'documentation', |
|
320 | - 'title' => __('Documentation'), |
|
321 | - 'content' => "<p><a href='http://www.metaslider.com/documentation/' target='blank'>Meta Slider Documentation</a></p>" |
|
322 | - )); |
|
319 | + 'id' => 'documentation', |
|
320 | + 'title' => __('Documentation'), |
|
321 | + 'content' => "<p><a href='http://www.metaslider.com/documentation/' target='blank'>Meta Slider Documentation</a></p>" |
|
322 | + )); |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | /** |
@@ -480,10 +480,10 @@ discard block |
||
480 | 480 | |
481 | 481 | // insert the post |
482 | 482 | $id = wp_insert_post(array( |
483 | - 'post_title' => __('New Slider', 'metaslider'), |
|
484 | - 'post_status' => 'publish', |
|
485 | - 'post_type' => 'ml-slider' |
|
486 | - )); |
|
483 | + 'post_title' => __('New Slider', 'metaslider'), |
|
484 | + 'post_status' => 'publish', |
|
485 | + 'post_type' => 'ml-slider' |
|
486 | + )); |
|
487 | 487 | |
488 | 488 | // insert the post meta |
489 | 489 | add_post_meta($id, 'ml-slider_settings', $defaults, true); |
@@ -507,9 +507,9 @@ discard block |
||
507 | 507 | |
508 | 508 | // send the post to trash |
509 | 509 | wp_update_post(array( |
510 | - 'ID' => $id, |
|
511 | - 'post_status' => 'trash' |
|
512 | - )); |
|
510 | + 'ID' => $id, |
|
511 | + 'post_status' => 'trash' |
|
512 | + )); |
|
513 | 513 | |
514 | 514 | return $this->find_slider('date', 'DESC'); |
515 | 515 | } |