Changeset 1523269
- Timestamp:
- 10/27/2016 04:09:39 PM (9 years ago)
- Location:
- ithemes-exchange
- Files:
-
- 14 edited
- 1 copied
-
tags/1.36.0 (copied) (copied from ithemes-exchange/trunk)
-
tags/1.36.0/history.txt (modified) (1 diff)
-
tags/1.36.0/init.php (modified) (2 diffs)
-
tags/1.36.0/lang/ithemes-exchange.pot (modified) (2 diffs)
-
tags/1.36.0/lib/classes/history.txt (modified) (1 diff)
-
tags/1.36.0/lib/classes/it-utility.php (modified) (30 diffs)
-
tags/1.36.0/lib/classes/load.php (modified) (3 diffs)
-
tags/1.36.0/readme.txt (modified) (2 diffs)
-
trunk/history.txt (modified) (1 diff)
-
trunk/init.php (modified) (2 diffs)
-
trunk/lang/ithemes-exchange.pot (modified) (2 diffs)
-
trunk/lib/classes/history.txt (modified) (1 diff)
-
trunk/lib/classes/it-utility.php (modified) (30 diffs)
-
trunk/lib/classes/load.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ithemes-exchange/tags/1.36.0/history.txt
r1512896 r1523269 1311 1311 Fix: Compatibility with BuddyPress 1312 1312 Fix: Missing break statements in Theme API. 1313 1.36.0 - Lew Ayotte, Elise Alley 1314 Update: Updating lib/classes to 2.4.8 -
ithemes-exchange/tags/1.36.0/init.php
r1512896 r1523269 2 2 /* 3 3 * Plugin Name: iThemes Exchange 4 * Version: 1.3 5.114 * Version: 1.36.0 5 5 * Text Domain: it-l10n-ithemes-exchange 6 6 * Description: Easily sell your digital goods with iThemes Exchange, simple ecommerce for WordPress … … 25 25 class IT_Exchange { 26 26 27 var $_version = '1.3 5.11';27 var $_version = '1.36.0'; 28 28 var $_wp_minimum = '3.5'; 29 29 var $_slug = 'ithemes-exchange'; -
ithemes-exchange/tags/1.36.0/lang/ithemes-exchange.pot
r1512896 r1523269 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: iThemes Exchange 1.3 5.11\n"5 "Project-Id-Version: iThemes Exchange 1.36.0\n" 6 6 "Report-Msgid-Bugs-To: http://ithemes.com/support/\n" 7 "POT-Creation-Date: 2016-10- 06 15:07:25+00:00\n"7 "POT-Creation-Date: 2016-10-27 16:07:50+00:00\n" 8 8 "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n" 9 9 "MIME-Version: 1.0\n" … … 2884 2884 msgstr "" 2885 2885 2886 #. #-#-#-#-# ithemes-exchange.pot (iThemes Exchange 1.3 5.11) #-#-#-#-#2886 #. #-#-#-#-# ithemes-exchange.pot (iThemes Exchange 1.36.0) #-#-#-#-# 2887 2887 #. Plugin Name of the plugin/theme 2888 2888 #: core-addons/admin/basic-reporting/init.php:21 -
ithemes-exchange/tags/1.36.0/lib/classes/history.txt
r1460445 r1523269 371 371 Bug Fix: Fixed padding around dialog pop-up overlays. 372 372 Enhancement: Added support for select inputs with the multiple attribute. 373 2.4.8 - 2016-09-02 - Chris Jean 374 Bug Fix: Fixed a typo in error message output when certain required files cannot be found. 375 Enhancement: Removed pass-by-reference function argument on associative array check as it is no longer required. This can reduce memory usage on some servers. -
ithemes-exchange/tags/1.36.0/lib/classes/it-utility.php
r1288257 r1523269 31 31 if ( ! class_exists( 'ITUtility' ) ) { 32 32 it_classes_load( 'it-error.php' ); 33 33 34 34 class ITUtility { 35 35 public static function require_file_once( $file, $class = false ) { … … 38 38 ITUtility::check_class( $class, true ); 39 39 } 40 40 41 41 public static function require_file( $file, $class = false ) { 42 42 $file = ITUtility::verify_file( $file, 'require', true ); … … 44 44 ITUtility::check_class( $class, true ); 45 45 } 46 46 47 47 public static function include_file_once( $file, $class = false ) { 48 48 $file = ITUtility::verify_file( $file, 'include_once', false ); … … 50 50 ITUtility::check_class( $class, false ); 51 51 } 52 52 53 53 public static function include_file( $file, $class = false ) { 54 54 $file = ITUtility::verify_file( $file, 'include', false ); … … 56 56 ITUtility::check_class( $class, false ); 57 57 } 58 58 59 59 public static function verify_file( $file, $type, $required = true ) { 60 60 if ( file_exists( get_stylesheet_directory() . "/$file" ) ) … … 68 68 else if ( ! file_exists( $file ) ) { 69 69 if ( $required ) 70 ITError::fatal( "missing_file:$type:$file", 'A file necessary for the theme to public staticfunction is missing or unable to be read by the web server.' );70 ITError::fatal( "missing_file:$type:$file", 'A file necessary for the theme to function is missing or unable to be read by the web server.' ); 71 71 else { 72 72 ITError::warn( "missing_file:$type:$file", 'A theme file is missing or unable to be read by the web server.' ); … … 74 74 } 75 75 } 76 76 77 77 return $file; 78 78 } 79 79 80 80 public static function check_class( $class, $required = true ) { 81 81 if ( false !== $class ) { … … 88 88 } 89 89 } 90 90 91 91 public static function merge_defaults( $values, $defaults, $force = false ) { 92 92 if ( ! ITUtility::is_associative_array( $defaults ) ) { 93 93 if ( ! isset( $values ) ) 94 94 return $defaults; 95 95 96 96 if ( false === $force ) 97 97 return $values; 98 98 99 99 if ( isset( $values ) || is_array( $values ) ) 100 100 return $values; 101 101 return $defaults; 102 102 } 103 103 104 104 foreach ( (array) $defaults as $key => $val ) { 105 105 if ( ! isset( $values[$key] ) ) 106 106 $values[$key] = null; 107 107 108 108 $values[$key] = ITUtility::merge_defaults( $values[$key], $val, $force ); 109 109 } 110 110 111 111 return $values; 112 112 } 113 114 public static function is_associative_array( &$array ) {113 114 public static function is_associative_array( $array ) { 115 115 if ( ! is_array( $array ) || empty( $array ) ) 116 116 return false; 117 117 118 118 $next = 0; 119 119 120 120 foreach ( $array as $k => $v ) 121 121 if ( $k !== $next++ ) 122 122 return true; 123 123 124 124 return false; 125 125 } 126 126 127 127 public static function show_status_message( $message ) { 128 128 echo "<div class=\"updated fade\"><p><strong>$message</strong></p></div>\n"; 129 129 } 130 130 131 131 public static function show_error_message( $message ) { 132 132 if ( is_wp_error( $message ) ) 133 133 $message = $message->get_error_message(); 134 134 135 135 if ( ! is_string( $message ) ) 136 136 return; 137 137 138 138 echo "<div class=\"error\"><p><strong>$message</strong></p></div>\n"; 139 139 } 140 140 141 141 public static function show_inline_status_message( $message ) { 142 142 echo "<div class=\"updated fade inline\"><p><strong>$message</strong></p></div>\n"; 143 143 } 144 144 145 145 public static function show_inline_error_message( $message ) { 146 146 if ( is_wp_error( $message ) ) 147 147 $message = $message->get_error_message(); 148 148 149 149 if ( ! is_string( $message ) ) 150 150 return; 151 151 152 152 echo "<div class=\"error inline\"><p><strong>$message</strong></p></div>\n"; 153 153 } 154 154 155 155 public static function verify_class( $var, $class ) { 156 156 if ( isset( $var ) && is_object( $var ) && ( strtolower( $class ) === strtolower( get_class( $var ) ) ) ) … … 158 158 return false; 159 159 } 160 160 161 161 public static function get_open_tag( $tag_name, $attributes = array() ) { 162 162 $tag = "<$tag_name"; 163 163 164 164 foreach ( (array) $attributes as $attribute => $values ) { 165 165 $attr_value = esc_attr( implode( ' ', (array) $values ) ); 166 166 $tag .= " $attribute=\"$attr_value\""; 167 167 } 168 168 169 169 $tag .= '>'; 170 170 171 171 return $tag; 172 172 } 173 173 174 174 public static function print_open_tag( $tag_name, $attributes ) { 175 175 echo ITUtility::get_open_tag( $tag_name, $attributes ) . "\n"; 176 176 } 177 177 178 178 public static function get_self_closing_tag( $tag_name, $attributes = array() ) { 179 179 $tag = ITUtility::get_open_tag( $tag_name, $attributes ); 180 180 $tag = preg_replace( '/>$/', ' />', $tag ); 181 181 182 182 return $tag; 183 183 } 184 184 185 185 public static function print_self_closing_tag( $tag_name, $attributes = array() ) { 186 186 echo ITUtility::get_self_closing_tag( $tag_name, $attributes ); 187 187 } 188 188 189 189 public static function cleanup_request_vars() { 190 190 $_REQUEST = ITUtility::strip_slashes( $_REQUEST ); … … 192 192 $_GET = ITUtility::strip_slashes( $_GET ); 193 193 } 194 194 195 195 public static function strip_slashes( $var ) { 196 196 if ( is_array( $var ) ) { … … 200 200 else 201 201 $var = stripslashes( $var ); 202 202 203 203 return $var; 204 204 } 205 205 206 206 public static function sort_array( $array, $index, $args = array() ) { 207 207 it_classes_load( 'it-array-sort.php' ); 208 208 209 209 $sorter = new ITArraySort( $array, $index, $args ); 210 210 211 211 return $sorter->get_sorted_array(); 212 212 } 213 213 214 214 // Deprecated 215 215 public static function sort_array_by_index( $array, $index ) { 216 216 if ( ! is_array( $array ) ) 217 217 ITError::fatal( 'invalid_var:parameter:array', 'Invalid data was passed to ITUtility::sort_array_by_index. This indicates a code bug.' ); 218 218 219 219 $new_array = array(); 220 220 $indexes = array(); 221 221 222 222 foreach ( (array) $array as $sub_index => $sub_array ) 223 223 $indexes[$sub_index] = $sub_array[$index]; 224 224 225 225 asort( $indexes ); 226 226 227 227 foreach ( (array) $indexes as $sub_index => $sub_value ) 228 228 $new_array[] = $array[$sub_index]; 229 229 230 230 return $new_array; 231 231 } 232 232 233 233 public static function get_array_value( $array, $index ) { 234 234 if ( is_string( $index ) ) { … … 240 240 } 241 241 } 242 242 243 243 while ( count( $index ) > 1 ) { 244 244 if ( isset( $array[$index[0]] ) ) { … … 249 249 return null; 250 250 } 251 251 252 252 if ( isset( $array[$index[0]] ) ) 253 253 return $array[$index[0]]; 254 254 255 255 return null; 256 256 } 257 257 258 258 public static function add_array_value( &$array, $index, $val ) { 259 259 if ( is_string( $index ) ) { … … 265 265 } 266 266 } 267 267 268 268 $cur_array =& $array; 269 269 270 270 while ( count( $index ) > 1 ) { 271 271 if ( ! isset( $cur_array[$index[0]] ) || ! is_array( $cur_array[$index[0]] ) ) 272 272 $cur_array[$index[0]] = array(); 273 273 274 274 $cur_array =& $cur_array[$index[0]]; 275 275 array_shift( $index ); 276 276 } 277 277 278 278 $cur_array[$index[0]] = $val; 279 279 } 280 280 281 281 public static function print_js_vars( $options = array() ) { 282 282 283 283 ?> 284 284 <script type="text/javascript"> … … 289 289 </script> 290 290 <?php 291 292 } 293 291 292 } 293 294 294 public static function print_js_script( $script ) { 295 295 296 296 ?> 297 297 <script type="text/javascript"> … … 299 299 </script> 300 300 <?php 301 302 } 303 301 302 } 303 304 304 public static function add_tooltip_scripts() { 305 305 global $it_utility_cached_url_base; 306 306 307 307 if ( empty( $it_utility_cached_url_base ) ) 308 308 $it_utility_cached_url_base = ITUtility::get_url_from_file( dirname( __FILE__ ) ); 309 309 310 310 wp_enqueue_script( 'jquery-tooltip', $it_utility_cached_url_base . '/js/jquery.tooltip.js', array( 'jquery' ) ); 311 311 wp_enqueue_script( 'it-tooltip', $it_utility_cached_url_base . '/js/it-tooltip.js', array( 'jquery-tooltip' ) ); 312 312 } 313 313 314 314 public static function add_tooltip_styles() { 315 315 global $it_utility_cached_url_base; 316 316 317 317 if ( empty( $it_utility_cached_url_base ) ) 318 318 $it_utility_cached_url_base = ITUtility::get_url_from_file( dirname( __FILE__ ) ); 319 319 320 320 wp_enqueue_style( 'it-tooltip', $it_utility_cached_url_base . '/css/it-tooltip.css' ); 321 321 } 322 322 323 323 public static function get_tooltip( $message, $title = '', $class = '', $alt = '(?)' ) { 324 324 global $it_utility_cached_url_base; 325 325 326 326 if ( empty( $it_utility_cached_url_base ) ) 327 327 $it_utility_cached_url_base = ITUtility::get_url_from_file( dirname( __FILE__ ) ); 328 328 329 329 $message = esc_attr( $message ); 330 330 $title = esc_attr( $title ); 331 331 332 332 if ( empty( $class ) ) 333 333 $class = 'it-tooltip'; 334 334 else 335 335 $class = "it-tooltip-$class"; 336 336 337 337 $tip = "<a class='$class' title='$title |:|~| $message'><img src='" . $it_utility_cached_url_base . "/images/it-tooltip.png' alt='(?)' /></a>"; 338 338 339 339 return $tip; 340 340 } 341 341 342 342 public static function add_tooltip( $message, $title = '', $class = '', $alt = '(?)' ) { 343 343 echo ITUtility::get_tooltip( $message, $title, $class, $alt ); 344 344 } 345 345 346 346 /* Changes http protocols to https when is_ssl() is true and https protocols to http otherwise */ 347 347 public static function fix_url( $url ) { … … 351 351 $url = preg_replace( '|^https://|', 'http://', $url ); 352 352 } 353 353 354 354 return $url; 355 355 } 356 356 357 357 public static function get_random_string( $length = 10, $use_sets = array( 'lower', 'upper', 'num' ) ) { 358 358 $sets = array( … … 363 363 'extended' => '`~!@#$%^&*()=+[]{};:\'"<>/?\|', 364 364 ); 365 366 365 366 367 367 if ( is_array( $length ) ) { 368 368 if ( ! isset( $length[0] ) || ! isset( $length[1] ) ) 369 369 return ''; 370 370 371 371 $lower = intval( $length[0] ); 372 372 $upper = intval( $length[1] ); 373 373 374 374 $length = rand( $lower, $upper ); 375 375 } 376 376 else 377 377 $length = intval( $length ); 378 378 379 379 if ( $length < 1 ) 380 380 $length = 1; 381 382 381 382 383 383 $source_string = ''; 384 384 385 385 if ( is_string( $use_sets ) ) 386 386 $source_string = $use_sets; … … 395 395 $source_string .= $chars; 396 396 } 397 397 398 398 if ( empty( $source_string ) ) 399 399 return false; 400 401 400 401 402 402 $string = ''; 403 403 404 404 while ( strlen( $string ) < $length ) 405 405 $string .= substr( $source_string, rand( 0, strlen( $source_string ) - 1 ), 1 ); 406 407 406 407 408 408 return $string; 409 409 } 410 410 411 411 public static function pad( $depth, $pad = ' ' ) { 412 412 $retval = ''; 413 413 414 414 for ( $x = 0; $x <= $depth; $x++ ) 415 415 $retval .= $pad; 416 416 417 417 return $retval; 418 418 } 419 419 420 420 public static function get_url_from_file( $file, $auto_ssl = true, $prevent_recursion = false ) { 421 421 $file = str_replace( '\\', '/', $file ); 422 422 423 423 $url = ''; 424 424 425 425 $upload_dir = ITUtility::get_cached_value( 'wp_upload_dir' ); 426 426 $upload_dir['basedir'] = str_replace( '\\', '/', $upload_dir['basedir'] ); 427 427 428 428 if ( is_array( $upload_dir ) && ( false === $upload_dir['error'] ) ) { 429 429 if ( 0 === strpos( $file, $upload_dir['basedir'] ) ) { … … 432 432 $path_pattern = 'wp-content/uploads'; 433 433 $url_base = $upload_dir['baseurl']; 434 434 435 435 if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) { 436 436 if ( defined( 'MULTISITE' ) ) { … … 439 439 $mu_path = '/' . get_current_blog_id(); 440 440 } 441 441 442 442 if ( false === strpos( $file, "$path_pattern$mu_path" ) ) { 443 443 $url_base = substr( $url_base, 0, - strlen( $mu_path ) ); … … 446 446 } 447 447 } 448 448 449 449 $url = $url_base . substr( $file, strpos( $file, $path_pattern ) + strlen( $path_pattern ) ); 450 450 } 451 451 } 452 452 453 453 if ( empty( $url ) ) { 454 454 if ( ! isset( $GLOBALS['it_classes_cache_wp_content_dir'] ) ) … … 456 456 if ( ! isset( $GLOBALS['it_classes_cache_abspath'] ) ) 457 457 $GLOBALS['it_classes_cache_abspath'] = rtrim( str_replace( '\\', '/', ABSPATH ), '/' ); 458 458 459 459 if ( 0 === strpos( $file, $GLOBALS['it_classes_cache_wp_content_dir'] ) ) 460 460 $url = WP_CONTENT_URL . str_replace( '\\', '/', preg_replace( '/^' . preg_quote( $GLOBALS['it_classes_cache_wp_content_dir'], '/' ) . '/', '', $file ) ); … … 462 462 $url = get_option( 'siteurl' ) . str_replace( '\\', '/', preg_replace( '/^' . preg_quote( $GLOBALS['it_classes_cache_abspath'], '/' ) . '/', '', $file ) ); 463 463 } 464 464 465 465 if ( empty( $url ) && ! $prevent_recursion ) 466 466 $url = ITUtility::get_url_from_file( realpath( $file ), $auto_ssl, true ); 467 467 468 468 if ( empty( $url ) ) 469 469 return ''; 470 471 470 471 472 472 if ( $auto_ssl ) 473 473 $url = ITUtility::fix_url( $url ); 474 474 475 475 return $url; 476 476 } 477 477 478 478 public static function get_file_from_url( $url ) { 479 479 $url = preg_replace( '/^https/', 'http', $url ); 480 480 $url = preg_replace( '/\?.*$/', '', $url ); 481 481 482 482 $file = ''; 483 483 484 484 $upload_dir = ITUtility::get_cached_value( 'wp_upload_dir' ); 485 485 486 486 if ( is_array( $upload_dir ) && ( false === $upload_dir['error'] ) ) { 487 487 if ( 0 === strpos( $url, $upload_dir['baseurl'] ) ) { … … 490 490 $path_pattern = 'wp-content/uploads'; 491 491 $file_base = $upload_dir['basedir']; 492 492 493 493 if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) { 494 494 if ( defined( 'MULTISITE' ) ) { … … 497 497 $mu_path = '/' . get_current_blog_id(); 498 498 } 499 499 500 500 if ( false === strpos( $url, "$path_pattern$mu_path" ) ) { 501 501 $file_base = substr( $file_base, 0, - strlen( $mu_path ) ); … … 504 504 } 505 505 } 506 506 507 507 $file = $file_base . substr( $url, strpos( $url, $path_pattern ) + strlen( $path_pattern ) ); 508 508 } 509 509 } 510 510 511 511 if ( empty( $file ) ) { 512 512 if ( ! isset( $GLOBALS['it_classes_cache_wp_content_url'] ) ) … … 514 514 if ( ! isset( $GLOBALS['it_classes_cache_siteurl'] ) ) 515 515 $GLOBALS['it_classes_cache_siteurl'] = preg_replace( '/^https/', 'http', get_option( 'siteurl' ) ); 516 516 517 517 if ( 0 === strpos( $url, $GLOBALS['it_classes_cache_wp_content_url'] ) ) 518 518 $file = rtrim( WP_CONTENT_DIR, '\\\/' ) . preg_replace( '/^' . preg_quote( $GLOBALS['it_classes_cache_wp_content_url'], '/' ) . '/', '', $url ); … … 522 522 $file = rtrim( ABSPATH, '\\\/' ) . preg_replace( '/^' . preg_quote( $GLOBALS['it_classes_cache_siteurl'], '/' ) . '/', '', $url ); 523 523 } 524 524 525 525 return $file; 526 526 } 527 527 528 528 public static function get_cached_value( $function, $args = array() ) { 529 529 if ( ! isset( $GLOBALS['it_classes_cached_values'] ) ) 530 530 $GLOBALS['it_classes_cached_values'] = array(); 531 531 532 532 $key = $function; 533 533 534 534 if ( ! empty( $args ) ) 535 535 $key .= '-' . md5( serialize( $args ) ); 536 536 537 537 if ( ! isset( $GLOBALS['it_classes_cached_values'][$key] ) ) 538 538 $GLOBALS['it_classes_cached_values'][$key] = call_user_func_array( $function, $args ); 539 539 540 540 return $GLOBALS['it_classes_cached_values'][$key]; 541 541 } 542 542 543 543 // WordPress 3.8 deprecates the screen_icon function. Replacing all instances of screen_icon with ITUtility::screen_icon allows for easy backcompat while avoiding the deprecation notices. 544 544 public static function screen_icon() { … … 547 547 } 548 548 } 549 550 549 550 551 551 /* Debug Functions */ 552 552 /* These functions are no part of the ITDebug class. These are retained for legacy purposes. */ 553 553 554 554 public static function print_r( $data, $description = '', $expand_objects = true, $max_depth = -1 ) { 555 555 it_classes_load( 'it-debug.php' ); 556 556 557 557 $args = compact( 'description', 'expand_objects', 'max_depth' ); 558 558 559 559 ITDebug::print_r( $data, $args ); 560 560 } 561 561 562 562 public static function backtrace( $description = false, $expand_objects = false, $max_depth = 3 ) { 563 563 it_classes_load( 'it-debug.php' ); 564 564 565 565 $args = compact( 'description', 'expand_objects', 'max_depth' ); 566 566 $args['offset'] = 1; 567 567 568 568 ITDebug::backtrace( $args ); 569 569 } 570 570 571 571 public static function inspect( $data, $expand_objects = false, $max_depth = 2, $echo = true ) { 572 572 it_classes_load( 'it-debug.php' ); 573 573 574 574 $args = compact( 'expand_objects', 'max_depth', 'echo' ); 575 575 576 576 return ITDebug::inspect( $data, $args ); 577 577 } 578 578 579 579 public static function is_callable_function( $function ) { 580 580 if ( ! is_callable( $function ) ) { 581 581 return false; 582 582 } 583 583 584 584 if ( ! isset( $GLOBALS['it_classes_cached_values'] ) ) { 585 585 $GLOBALS['it_classes_cached_values'] = array(); 586 586 } 587 587 588 588 if ( ! isset( $GLOBALS['it_classes_cached_values']['ini_get:disable_functions'] ) ) { 589 589 $GLOBALS['it_classes_cached_values']['var:disable_functions'] = preg_split( '/\s*,\s*/', (string) ini_get( 'disable_functions' ) ); 590 590 } 591 591 592 592 if ( in_array( $function, $GLOBALS['it_classes_cached_values']['var:disable_functions'] ) ) { 593 593 return false; 594 594 } 595 595 596 596 if ( ! isset( $GLOBALS['it_classes_cached_values']['ini_get:suhosin.executor.func.blacklist'] ) ) { 597 597 $GLOBALS['it_classes_cached_values']['ini_get:suhosin.executor.func.blacklist'] = preg_split( '/\s*,\s*/', (string) ini_get( 'suhosin.executor.func.blacklist' ) ); 598 598 } 599 599 600 600 if ( in_array( $function, $GLOBALS['it_classes_cached_values']['ini_get:suhosin.executor.func.blacklist'] ) ) { 601 601 return false; 602 602 } 603 603 604 604 return true; 605 605 } -
ithemes-exchange/tags/1.36.0/lib/classes/load.php
r1326981 r1523269 3 3 /* 4 4 Written by Chris Jean for iThemes.com 5 Version 2.4. 75 Version 2.4.8 6 6 */ 7 7 8 8 9 $it_registration_list_version = '2.4. 7';9 $it_registration_list_version = '2.4.8'; 10 10 $it_registration_list_library = 'classes'; 11 11 $it_registration_list_init_file = dirname( __FILE__ ) . '/init.php'; … … 20 20 if ( ! isset( $wp_locale ) ) 21 21 return; 22 23 22 23 24 24 $init_files = array(); 25 25 26 26 foreach ( (array) $GLOBALS['it_classes_registration_list'] as $library => $versions ) { 27 27 $max_version = '-10000'; 28 28 $init_file = ''; 29 29 30 30 foreach ( (array) $versions as $version => $file ) { 31 31 if ( version_compare( $version, $max_version, '>' ) ) { … … 34 34 } 35 35 } 36 36 37 37 if ( ! empty( $init_file ) ) 38 38 $init_files[] = $init_file; 39 39 } 40 40 41 41 unset( $GLOBALS['it_classes_registration_list'] ); 42 42 43 43 foreach ( (array) $init_files as $init_file ) 44 44 require_once( $init_file ); 45 45 46 46 do_action( 'it_libraries_loaded' ); 47 47 } 48 48 49 49 global $wp_version; 50 50 51 51 if ( version_compare( $wp_version, '2.9.7', '>' ) ) 52 52 add_action( 'after_setup_theme', 'it_registration_list_init' ); -
ithemes-exchange/tags/1.36.0/readme.txt
r1512896 r1523269 3 3 Tags: ecommerce 4 4 Requires at least: 3.7 5 Tested up to: 4. 66 Stable tag: 1.3 5.115 Tested up to: 4.7 6 Stable tag: 1.36.0 7 7 License: GPLv2 or later 8 8 … … 88 88 89 89 == Changelog == 90 91 = 1.36.0 = 92 * Update: Updating lib/classes to v2.4.8 90 93 91 94 = 1.35.11 = -
ithemes-exchange/trunk/history.txt
r1512896 r1523269 1311 1311 Fix: Compatibility with BuddyPress 1312 1312 Fix: Missing break statements in Theme API. 1313 1.36.0 - Lew Ayotte, Elise Alley 1314 Update: Updating lib/classes to 2.4.8 -
ithemes-exchange/trunk/init.php
r1512896 r1523269 2 2 /* 3 3 * Plugin Name: iThemes Exchange 4 * Version: 1.3 5.114 * Version: 1.36.0 5 5 * Text Domain: it-l10n-ithemes-exchange 6 6 * Description: Easily sell your digital goods with iThemes Exchange, simple ecommerce for WordPress … … 25 25 class IT_Exchange { 26 26 27 var $_version = '1.3 5.11';27 var $_version = '1.36.0'; 28 28 var $_wp_minimum = '3.5'; 29 29 var $_slug = 'ithemes-exchange'; -
ithemes-exchange/trunk/lang/ithemes-exchange.pot
r1512896 r1523269 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: iThemes Exchange 1.3 5.11\n"5 "Project-Id-Version: iThemes Exchange 1.36.0\n" 6 6 "Report-Msgid-Bugs-To: http://ithemes.com/support/\n" 7 "POT-Creation-Date: 2016-10- 06 15:07:25+00:00\n"7 "POT-Creation-Date: 2016-10-27 16:07:50+00:00\n" 8 8 "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n" 9 9 "MIME-Version: 1.0\n" … … 2884 2884 msgstr "" 2885 2885 2886 #. #-#-#-#-# ithemes-exchange.pot (iThemes Exchange 1.3 5.11) #-#-#-#-#2886 #. #-#-#-#-# ithemes-exchange.pot (iThemes Exchange 1.36.0) #-#-#-#-# 2887 2887 #. Plugin Name of the plugin/theme 2888 2888 #: core-addons/admin/basic-reporting/init.php:21 -
ithemes-exchange/trunk/lib/classes/history.txt
r1460445 r1523269 371 371 Bug Fix: Fixed padding around dialog pop-up overlays. 372 372 Enhancement: Added support for select inputs with the multiple attribute. 373 2.4.8 - 2016-09-02 - Chris Jean 374 Bug Fix: Fixed a typo in error message output when certain required files cannot be found. 375 Enhancement: Removed pass-by-reference function argument on associative array check as it is no longer required. This can reduce memory usage on some servers. -
ithemes-exchange/trunk/lib/classes/it-utility.php
r1288257 r1523269 31 31 if ( ! class_exists( 'ITUtility' ) ) { 32 32 it_classes_load( 'it-error.php' ); 33 33 34 34 class ITUtility { 35 35 public static function require_file_once( $file, $class = false ) { … … 38 38 ITUtility::check_class( $class, true ); 39 39 } 40 40 41 41 public static function require_file( $file, $class = false ) { 42 42 $file = ITUtility::verify_file( $file, 'require', true ); … … 44 44 ITUtility::check_class( $class, true ); 45 45 } 46 46 47 47 public static function include_file_once( $file, $class = false ) { 48 48 $file = ITUtility::verify_file( $file, 'include_once', false ); … … 50 50 ITUtility::check_class( $class, false ); 51 51 } 52 52 53 53 public static function include_file( $file, $class = false ) { 54 54 $file = ITUtility::verify_file( $file, 'include', false ); … … 56 56 ITUtility::check_class( $class, false ); 57 57 } 58 58 59 59 public static function verify_file( $file, $type, $required = true ) { 60 60 if ( file_exists( get_stylesheet_directory() . "/$file" ) ) … … 68 68 else if ( ! file_exists( $file ) ) { 69 69 if ( $required ) 70 ITError::fatal( "missing_file:$type:$file", 'A file necessary for the theme to public staticfunction is missing or unable to be read by the web server.' );70 ITError::fatal( "missing_file:$type:$file", 'A file necessary for the theme to function is missing or unable to be read by the web server.' ); 71 71 else { 72 72 ITError::warn( "missing_file:$type:$file", 'A theme file is missing or unable to be read by the web server.' ); … … 74 74 } 75 75 } 76 76 77 77 return $file; 78 78 } 79 79 80 80 public static function check_class( $class, $required = true ) { 81 81 if ( false !== $class ) { … … 88 88 } 89 89 } 90 90 91 91 public static function merge_defaults( $values, $defaults, $force = false ) { 92 92 if ( ! ITUtility::is_associative_array( $defaults ) ) { 93 93 if ( ! isset( $values ) ) 94 94 return $defaults; 95 95 96 96 if ( false === $force ) 97 97 return $values; 98 98 99 99 if ( isset( $values ) || is_array( $values ) ) 100 100 return $values; 101 101 return $defaults; 102 102 } 103 103 104 104 foreach ( (array) $defaults as $key => $val ) { 105 105 if ( ! isset( $values[$key] ) ) 106 106 $values[$key] = null; 107 107 108 108 $values[$key] = ITUtility::merge_defaults( $values[$key], $val, $force ); 109 109 } 110 110 111 111 return $values; 112 112 } 113 114 public static function is_associative_array( &$array ) {113 114 public static function is_associative_array( $array ) { 115 115 if ( ! is_array( $array ) || empty( $array ) ) 116 116 return false; 117 117 118 118 $next = 0; 119 119 120 120 foreach ( $array as $k => $v ) 121 121 if ( $k !== $next++ ) 122 122 return true; 123 123 124 124 return false; 125 125 } 126 126 127 127 public static function show_status_message( $message ) { 128 128 echo "<div class=\"updated fade\"><p><strong>$message</strong></p></div>\n"; 129 129 } 130 130 131 131 public static function show_error_message( $message ) { 132 132 if ( is_wp_error( $message ) ) 133 133 $message = $message->get_error_message(); 134 134 135 135 if ( ! is_string( $message ) ) 136 136 return; 137 137 138 138 echo "<div class=\"error\"><p><strong>$message</strong></p></div>\n"; 139 139 } 140 140 141 141 public static function show_inline_status_message( $message ) { 142 142 echo "<div class=\"updated fade inline\"><p><strong>$message</strong></p></div>\n"; 143 143 } 144 144 145 145 public static function show_inline_error_message( $message ) { 146 146 if ( is_wp_error( $message ) ) 147 147 $message = $message->get_error_message(); 148 148 149 149 if ( ! is_string( $message ) ) 150 150 return; 151 151 152 152 echo "<div class=\"error inline\"><p><strong>$message</strong></p></div>\n"; 153 153 } 154 154 155 155 public static function verify_class( $var, $class ) { 156 156 if ( isset( $var ) && is_object( $var ) && ( strtolower( $class ) === strtolower( get_class( $var ) ) ) ) … … 158 158 return false; 159 159 } 160 160 161 161 public static function get_open_tag( $tag_name, $attributes = array() ) { 162 162 $tag = "<$tag_name"; 163 163 164 164 foreach ( (array) $attributes as $attribute => $values ) { 165 165 $attr_value = esc_attr( implode( ' ', (array) $values ) ); 166 166 $tag .= " $attribute=\"$attr_value\""; 167 167 } 168 168 169 169 $tag .= '>'; 170 170 171 171 return $tag; 172 172 } 173 173 174 174 public static function print_open_tag( $tag_name, $attributes ) { 175 175 echo ITUtility::get_open_tag( $tag_name, $attributes ) . "\n"; 176 176 } 177 177 178 178 public static function get_self_closing_tag( $tag_name, $attributes = array() ) { 179 179 $tag = ITUtility::get_open_tag( $tag_name, $attributes ); 180 180 $tag = preg_replace( '/>$/', ' />', $tag ); 181 181 182 182 return $tag; 183 183 } 184 184 185 185 public static function print_self_closing_tag( $tag_name, $attributes = array() ) { 186 186 echo ITUtility::get_self_closing_tag( $tag_name, $attributes ); 187 187 } 188 188 189 189 public static function cleanup_request_vars() { 190 190 $_REQUEST = ITUtility::strip_slashes( $_REQUEST ); … … 192 192 $_GET = ITUtility::strip_slashes( $_GET ); 193 193 } 194 194 195 195 public static function strip_slashes( $var ) { 196 196 if ( is_array( $var ) ) { … … 200 200 else 201 201 $var = stripslashes( $var ); 202 202 203 203 return $var; 204 204 } 205 205 206 206 public static function sort_array( $array, $index, $args = array() ) { 207 207 it_classes_load( 'it-array-sort.php' ); 208 208 209 209 $sorter = new ITArraySort( $array, $index, $args ); 210 210 211 211 return $sorter->get_sorted_array(); 212 212 } 213 213 214 214 // Deprecated 215 215 public static function sort_array_by_index( $array, $index ) { 216 216 if ( ! is_array( $array ) ) 217 217 ITError::fatal( 'invalid_var:parameter:array', 'Invalid data was passed to ITUtility::sort_array_by_index. This indicates a code bug.' ); 218 218 219 219 $new_array = array(); 220 220 $indexes = array(); 221 221 222 222 foreach ( (array) $array as $sub_index => $sub_array ) 223 223 $indexes[$sub_index] = $sub_array[$index]; 224 224 225 225 asort( $indexes ); 226 226 227 227 foreach ( (array) $indexes as $sub_index => $sub_value ) 228 228 $new_array[] = $array[$sub_index]; 229 229 230 230 return $new_array; 231 231 } 232 232 233 233 public static function get_array_value( $array, $index ) { 234 234 if ( is_string( $index ) ) { … … 240 240 } 241 241 } 242 242 243 243 while ( count( $index ) > 1 ) { 244 244 if ( isset( $array[$index[0]] ) ) { … … 249 249 return null; 250 250 } 251 251 252 252 if ( isset( $array[$index[0]] ) ) 253 253 return $array[$index[0]]; 254 254 255 255 return null; 256 256 } 257 257 258 258 public static function add_array_value( &$array, $index, $val ) { 259 259 if ( is_string( $index ) ) { … … 265 265 } 266 266 } 267 267 268 268 $cur_array =& $array; 269 269 270 270 while ( count( $index ) > 1 ) { 271 271 if ( ! isset( $cur_array[$index[0]] ) || ! is_array( $cur_array[$index[0]] ) ) 272 272 $cur_array[$index[0]] = array(); 273 273 274 274 $cur_array =& $cur_array[$index[0]]; 275 275 array_shift( $index ); 276 276 } 277 277 278 278 $cur_array[$index[0]] = $val; 279 279 } 280 280 281 281 public static function print_js_vars( $options = array() ) { 282 282 283 283 ?> 284 284 <script type="text/javascript"> … … 289 289 </script> 290 290 <?php 291 292 } 293 291 292 } 293 294 294 public static function print_js_script( $script ) { 295 295 296 296 ?> 297 297 <script type="text/javascript"> … … 299 299 </script> 300 300 <?php 301 302 } 303 301 302 } 303 304 304 public static function add_tooltip_scripts() { 305 305 global $it_utility_cached_url_base; 306 306 307 307 if ( empty( $it_utility_cached_url_base ) ) 308 308 $it_utility_cached_url_base = ITUtility::get_url_from_file( dirname( __FILE__ ) ); 309 309 310 310 wp_enqueue_script( 'jquery-tooltip', $it_utility_cached_url_base . '/js/jquery.tooltip.js', array( 'jquery' ) ); 311 311 wp_enqueue_script( 'it-tooltip', $it_utility_cached_url_base . '/js/it-tooltip.js', array( 'jquery-tooltip' ) ); 312 312 } 313 313 314 314 public static function add_tooltip_styles() { 315 315 global $it_utility_cached_url_base; 316 316 317 317 if ( empty( $it_utility_cached_url_base ) ) 318 318 $it_utility_cached_url_base = ITUtility::get_url_from_file( dirname( __FILE__ ) ); 319 319 320 320 wp_enqueue_style( 'it-tooltip', $it_utility_cached_url_base . '/css/it-tooltip.css' ); 321 321 } 322 322 323 323 public static function get_tooltip( $message, $title = '', $class = '', $alt = '(?)' ) { 324 324 global $it_utility_cached_url_base; 325 325 326 326 if ( empty( $it_utility_cached_url_base ) ) 327 327 $it_utility_cached_url_base = ITUtility::get_url_from_file( dirname( __FILE__ ) ); 328 328 329 329 $message = esc_attr( $message ); 330 330 $title = esc_attr( $title ); 331 331 332 332 if ( empty( $class ) ) 333 333 $class = 'it-tooltip'; 334 334 else 335 335 $class = "it-tooltip-$class"; 336 336 337 337 $tip = "<a class='$class' title='$title |:|~| $message'><img src='" . $it_utility_cached_url_base . "/images/it-tooltip.png' alt='(?)' /></a>"; 338 338 339 339 return $tip; 340 340 } 341 341 342 342 public static function add_tooltip( $message, $title = '', $class = '', $alt = '(?)' ) { 343 343 echo ITUtility::get_tooltip( $message, $title, $class, $alt ); 344 344 } 345 345 346 346 /* Changes http protocols to https when is_ssl() is true and https protocols to http otherwise */ 347 347 public static function fix_url( $url ) { … … 351 351 $url = preg_replace( '|^https://|', 'http://', $url ); 352 352 } 353 353 354 354 return $url; 355 355 } 356 356 357 357 public static function get_random_string( $length = 10, $use_sets = array( 'lower', 'upper', 'num' ) ) { 358 358 $sets = array( … … 363 363 'extended' => '`~!@#$%^&*()=+[]{};:\'"<>/?\|', 364 364 ); 365 366 365 366 367 367 if ( is_array( $length ) ) { 368 368 if ( ! isset( $length[0] ) || ! isset( $length[1] ) ) 369 369 return ''; 370 370 371 371 $lower = intval( $length[0] ); 372 372 $upper = intval( $length[1] ); 373 373 374 374 $length = rand( $lower, $upper ); 375 375 } 376 376 else 377 377 $length = intval( $length ); 378 378 379 379 if ( $length < 1 ) 380 380 $length = 1; 381 382 381 382 383 383 $source_string = ''; 384 384 385 385 if ( is_string( $use_sets ) ) 386 386 $source_string = $use_sets; … … 395 395 $source_string .= $chars; 396 396 } 397 397 398 398 if ( empty( $source_string ) ) 399 399 return false; 400 401 400 401 402 402 $string = ''; 403 403 404 404 while ( strlen( $string ) < $length ) 405 405 $string .= substr( $source_string, rand( 0, strlen( $source_string ) - 1 ), 1 ); 406 407 406 407 408 408 return $string; 409 409 } 410 410 411 411 public static function pad( $depth, $pad = ' ' ) { 412 412 $retval = ''; 413 413 414 414 for ( $x = 0; $x <= $depth; $x++ ) 415 415 $retval .= $pad; 416 416 417 417 return $retval; 418 418 } 419 419 420 420 public static function get_url_from_file( $file, $auto_ssl = true, $prevent_recursion = false ) { 421 421 $file = str_replace( '\\', '/', $file ); 422 422 423 423 $url = ''; 424 424 425 425 $upload_dir = ITUtility::get_cached_value( 'wp_upload_dir' ); 426 426 $upload_dir['basedir'] = str_replace( '\\', '/', $upload_dir['basedir'] ); 427 427 428 428 if ( is_array( $upload_dir ) && ( false === $upload_dir['error'] ) ) { 429 429 if ( 0 === strpos( $file, $upload_dir['basedir'] ) ) { … … 432 432 $path_pattern = 'wp-content/uploads'; 433 433 $url_base = $upload_dir['baseurl']; 434 434 435 435 if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) { 436 436 if ( defined( 'MULTISITE' ) ) { … … 439 439 $mu_path = '/' . get_current_blog_id(); 440 440 } 441 441 442 442 if ( false === strpos( $file, "$path_pattern$mu_path" ) ) { 443 443 $url_base = substr( $url_base, 0, - strlen( $mu_path ) ); … … 446 446 } 447 447 } 448 448 449 449 $url = $url_base . substr( $file, strpos( $file, $path_pattern ) + strlen( $path_pattern ) ); 450 450 } 451 451 } 452 452 453 453 if ( empty( $url ) ) { 454 454 if ( ! isset( $GLOBALS['it_classes_cache_wp_content_dir'] ) ) … … 456 456 if ( ! isset( $GLOBALS['it_classes_cache_abspath'] ) ) 457 457 $GLOBALS['it_classes_cache_abspath'] = rtrim( str_replace( '\\', '/', ABSPATH ), '/' ); 458 458 459 459 if ( 0 === strpos( $file, $GLOBALS['it_classes_cache_wp_content_dir'] ) ) 460 460 $url = WP_CONTENT_URL . str_replace( '\\', '/', preg_replace( '/^' . preg_quote( $GLOBALS['it_classes_cache_wp_content_dir'], '/' ) . '/', '', $file ) ); … … 462 462 $url = get_option( 'siteurl' ) . str_replace( '\\', '/', preg_replace( '/^' . preg_quote( $GLOBALS['it_classes_cache_abspath'], '/' ) . '/', '', $file ) ); 463 463 } 464 464 465 465 if ( empty( $url ) && ! $prevent_recursion ) 466 466 $url = ITUtility::get_url_from_file( realpath( $file ), $auto_ssl, true ); 467 467 468 468 if ( empty( $url ) ) 469 469 return ''; 470 471 470 471 472 472 if ( $auto_ssl ) 473 473 $url = ITUtility::fix_url( $url ); 474 474 475 475 return $url; 476 476 } 477 477 478 478 public static function get_file_from_url( $url ) { 479 479 $url = preg_replace( '/^https/', 'http', $url ); 480 480 $url = preg_replace( '/\?.*$/', '', $url ); 481 481 482 482 $file = ''; 483 483 484 484 $upload_dir = ITUtility::get_cached_value( 'wp_upload_dir' ); 485 485 486 486 if ( is_array( $upload_dir ) && ( false === $upload_dir['error'] ) ) { 487 487 if ( 0 === strpos( $url, $upload_dir['baseurl'] ) ) { … … 490 490 $path_pattern = 'wp-content/uploads'; 491 491 $file_base = $upload_dir['basedir']; 492 492 493 493 if ( is_multisite() && ! ( is_main_network() && is_main_site() && defined( 'MULTISITE' ) ) ) { 494 494 if ( defined( 'MULTISITE' ) ) { … … 497 497 $mu_path = '/' . get_current_blog_id(); 498 498 } 499 499 500 500 if ( false === strpos( $url, "$path_pattern$mu_path" ) ) { 501 501 $file_base = substr( $file_base, 0, - strlen( $mu_path ) ); … … 504 504 } 505 505 } 506 506 507 507 $file = $file_base . substr( $url, strpos( $url, $path_pattern ) + strlen( $path_pattern ) ); 508 508 } 509 509 } 510 510 511 511 if ( empty( $file ) ) { 512 512 if ( ! isset( $GLOBALS['it_classes_cache_wp_content_url'] ) ) … … 514 514 if ( ! isset( $GLOBALS['it_classes_cache_siteurl'] ) ) 515 515 $GLOBALS['it_classes_cache_siteurl'] = preg_replace( '/^https/', 'http', get_option( 'siteurl' ) ); 516 516 517 517 if ( 0 === strpos( $url, $GLOBALS['it_classes_cache_wp_content_url'] ) ) 518 518 $file = rtrim( WP_CONTENT_DIR, '\\\/' ) . preg_replace( '/^' . preg_quote( $GLOBALS['it_classes_cache_wp_content_url'], '/' ) . '/', '', $url ); … … 522 522 $file = rtrim( ABSPATH, '\\\/' ) . preg_replace( '/^' . preg_quote( $GLOBALS['it_classes_cache_siteurl'], '/' ) . '/', '', $url ); 523 523 } 524 524 525 525 return $file; 526 526 } 527 527 528 528 public static function get_cached_value( $function, $args = array() ) { 529 529 if ( ! isset( $GLOBALS['it_classes_cached_values'] ) ) 530 530 $GLOBALS['it_classes_cached_values'] = array(); 531 531 532 532 $key = $function; 533 533 534 534 if ( ! empty( $args ) ) 535 535 $key .= '-' . md5( serialize( $args ) ); 536 536 537 537 if ( ! isset( $GLOBALS['it_classes_cached_values'][$key] ) ) 538 538 $GLOBALS['it_classes_cached_values'][$key] = call_user_func_array( $function, $args ); 539 539 540 540 return $GLOBALS['it_classes_cached_values'][$key]; 541 541 } 542 542 543 543 // WordPress 3.8 deprecates the screen_icon function. Replacing all instances of screen_icon with ITUtility::screen_icon allows for easy backcompat while avoiding the deprecation notices. 544 544 public static function screen_icon() { … … 547 547 } 548 548 } 549 550 549 550 551 551 /* Debug Functions */ 552 552 /* These functions are no part of the ITDebug class. These are retained for legacy purposes. */ 553 553 554 554 public static function print_r( $data, $description = '', $expand_objects = true, $max_depth = -1 ) { 555 555 it_classes_load( 'it-debug.php' ); 556 556 557 557 $args = compact( 'description', 'expand_objects', 'max_depth' ); 558 558 559 559 ITDebug::print_r( $data, $args ); 560 560 } 561 561 562 562 public static function backtrace( $description = false, $expand_objects = false, $max_depth = 3 ) { 563 563 it_classes_load( 'it-debug.php' ); 564 564 565 565 $args = compact( 'description', 'expand_objects', 'max_depth' ); 566 566 $args['offset'] = 1; 567 567 568 568 ITDebug::backtrace( $args ); 569 569 } 570 570 571 571 public static function inspect( $data, $expand_objects = false, $max_depth = 2, $echo = true ) { 572 572 it_classes_load( 'it-debug.php' ); 573 573 574 574 $args = compact( 'expand_objects', 'max_depth', 'echo' ); 575 575 576 576 return ITDebug::inspect( $data, $args ); 577 577 } 578 578 579 579 public static function is_callable_function( $function ) { 580 580 if ( ! is_callable( $function ) ) { 581 581 return false; 582 582 } 583 583 584 584 if ( ! isset( $GLOBALS['it_classes_cached_values'] ) ) { 585 585 $GLOBALS['it_classes_cached_values'] = array(); 586 586 } 587 587 588 588 if ( ! isset( $GLOBALS['it_classes_cached_values']['ini_get:disable_functions'] ) ) { 589 589 $GLOBALS['it_classes_cached_values']['var:disable_functions'] = preg_split( '/\s*,\s*/', (string) ini_get( 'disable_functions' ) ); 590 590 } 591 591 592 592 if ( in_array( $function, $GLOBALS['it_classes_cached_values']['var:disable_functions'] ) ) { 593 593 return false; 594 594 } 595 595 596 596 if ( ! isset( $GLOBALS['it_classes_cached_values']['ini_get:suhosin.executor.func.blacklist'] ) ) { 597 597 $GLOBALS['it_classes_cached_values']['ini_get:suhosin.executor.func.blacklist'] = preg_split( '/\s*,\s*/', (string) ini_get( 'suhosin.executor.func.blacklist' ) ); 598 598 } 599 599 600 600 if ( in_array( $function, $GLOBALS['it_classes_cached_values']['ini_get:suhosin.executor.func.blacklist'] ) ) { 601 601 return false; 602 602 } 603 603 604 604 return true; 605 605 } -
ithemes-exchange/trunk/lib/classes/load.php
r1326981 r1523269 3 3 /* 4 4 Written by Chris Jean for iThemes.com 5 Version 2.4. 75 Version 2.4.8 6 6 */ 7 7 8 8 9 $it_registration_list_version = '2.4. 7';9 $it_registration_list_version = '2.4.8'; 10 10 $it_registration_list_library = 'classes'; 11 11 $it_registration_list_init_file = dirname( __FILE__ ) . '/init.php'; … … 20 20 if ( ! isset( $wp_locale ) ) 21 21 return; 22 23 22 23 24 24 $init_files = array(); 25 25 26 26 foreach ( (array) $GLOBALS['it_classes_registration_list'] as $library => $versions ) { 27 27 $max_version = '-10000'; 28 28 $init_file = ''; 29 29 30 30 foreach ( (array) $versions as $version => $file ) { 31 31 if ( version_compare( $version, $max_version, '>' ) ) { … … 34 34 } 35 35 } 36 36 37 37 if ( ! empty( $init_file ) ) 38 38 $init_files[] = $init_file; 39 39 } 40 40 41 41 unset( $GLOBALS['it_classes_registration_list'] ); 42 42 43 43 foreach ( (array) $init_files as $init_file ) 44 44 require_once( $init_file ); 45 45 46 46 do_action( 'it_libraries_loaded' ); 47 47 } 48 48 49 49 global $wp_version; 50 50 51 51 if ( version_compare( $wp_version, '2.9.7', '>' ) ) 52 52 add_action( 'after_setup_theme', 'it_registration_list_init' ); -
ithemes-exchange/trunk/readme.txt
r1512896 r1523269 3 3 Tags: ecommerce 4 4 Requires at least: 3.7 5 Tested up to: 4. 66 Stable tag: 1.3 5.115 Tested up to: 4.7 6 Stable tag: 1.36.0 7 7 License: GPLv2 or later 8 8 … … 88 88 89 89 == Changelog == 90 91 = 1.36.0 = 92 * Update: Updating lib/classes to v2.4.8 90 93 91 94 = 1.35.11 =
Note: See TracChangeset
for help on using the changeset viewer.