Changeset 47808 for trunk/src/wp-includes/ms-functions.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-functions.php
r47754 r47808 945 945 946 946 $activate_url = esc_url( $activate_url ); 947 $admin_email = get_site_option( 'admin_email' ); 948 if ( '' == $admin_email ) { 947 948 $admin_email = get_site_option( 'admin_email' ); 949 950 if ( '' === $admin_email ) { 949 951 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 950 952 } 951 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 953 954 $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; 952 955 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; 953 956 … … 1071 1074 // Send email with activation link. 1072 1075 $admin_email = get_site_option( 'admin_email' ); 1073 if ( '' == $admin_email ) { 1076 1077 if ( '' === $admin_email ) { 1074 1078 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 1075 1079 } 1076 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 1080 1081 $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; 1077 1082 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; 1078 1083 $message = sprintf( … … 1225 1230 * Let's just set the active flag and instruct the user to reset their password. 1226 1231 */ 1227 if ( 'blog_taken' == $blog_id->get_error_code() ) {1232 if ( 'blog_taken' === $blog_id->get_error_code() ) { 1228 1233 $blog_id->add_data( $signup ); 1229 1234 $wpdb->update( … … 1399 1404 } 1400 1405 1401 if ( get_site_option( 'registrationnotification' ) != 'yes') {1406 if ( 'yes' !== get_site_option( 'registrationnotification' ) ) { 1402 1407 return false; 1403 1408 } 1404 1409 1405 1410 $email = get_site_option( 'admin_email' ); 1411 1406 1412 if ( is_email( $email ) == false ) { 1407 1413 return false; … … 1459 1465 */ 1460 1466 function newuser_notify_siteadmin( $user_id ) { 1461 if ( get_site_option( 'registrationnotification' ) != 'yes') {1467 if ( 'yes' !== get_site_option( 'registrationnotification' ) ) { 1462 1468 return false; 1463 1469 } … … 1633 1639 */ 1634 1640 $welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta ); 1635 $admin_email = get_site_option( 'admin_email' ); 1636 1637 if ( '' == $admin_email ) { 1641 1642 $admin_email = get_site_option( 'admin_email' ); 1643 1644 if ( '' === $admin_email ) { 1638 1645 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 1639 1646 } 1640 1647 1641 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );1648 $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; 1642 1649 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; 1643 1650 $message = $welcome_email; … … 1727 1734 $admin_email = get_site_option( 'admin_email' ); 1728 1735 1729 if ( '' == $admin_email ) {1736 if ( '' === $admin_email ) { 1730 1737 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 1731 1738 } 1732 1739 1733 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );1740 $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; 1734 1741 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; 1735 1742 $message = $welcome_email; … … 1850 1857 foreach ( $site_exts as $ext ) { 1851 1858 foreach ( $mimes as $ext_pattern => $mime ) { 1852 if ( '' != $ext && false !== strpos( $ext_pattern, $ext ) ) {1859 if ( '' !== $ext && false !== strpos( $ext_pattern, $ext ) ) { 1853 1860 $site_mimes[ $ext_pattern ] = $mime; 1854 1861 } … … 2120 2127 $key = array_pop( $parts ); 2121 2128 2122 if ( '' == $key ) {2129 if ( '' === $key ) { 2123 2130 $key = array_pop( $parts ); 2124 2131 } … … 2310 2317 static $forced_content = false; 2311 2318 2312 if ( '' !=$force ) {2319 if ( ! $force ) { 2313 2320 $old_forced = $forced_content; 2314 2321 $forced_content = $force; … … 2595 2602 } 2596 2603 2597 if ( 'users' == $using ) {2604 if ( 'users' === $using ) { 2598 2605 $count = get_user_count( $network_id ); 2599 2606 /** … … 2612 2619 2613 2620 $count = get_blog_count( $network_id ); 2621 2614 2622 /** This filter is documented in wp-includes/ms-functions.php */ 2615 2623 return apply_filters( 'wp_is_large_network', $count > 10000, 'sites', $count, $network_id );
Note: See TracChangeset
for help on using the changeset viewer.