Changeset 9806
- Timestamp:
- 05/01/2020 06:25:16 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php
r9805 r9806 461 461 ); 462 462 463 // Domains from which exceptions would be accepted. 464 $trademark_exceptions = array( 465 'yoast.com' => array( 'yoast' ), 466 'automattic.com' => array( 'wordpress', 'woo', 'woocommerce' ), 467 ); 468 463 469 $has_trademarked_slug = false; 464 470 … … 477 483 } 478 484 485 // Get the user email domain. 486 $user_email_domain = explode( '@', wp_get_current_user()->user_email, 2 ); 487 488 // If email domain is on our list of possible exceptions, we have an extra check. 489 if ( array_key_exists( $user_email_domain[1], $trademark_exceptions ) ) { 490 // If $has_trademarked_slug is in the array for that domain, they can use the term. 491 if ( in_array( $has_trademarked_slug, $trademark_exceptions[ $user_email_domain[1] ] ) ) { 492 $has_trademarked_slug = false; 493 } 494 } 495 479 496 return $has_trademarked_slug; 480 497 }
Note: See TracChangeset
for help on using the changeset viewer.