Changeset 8430
- Timestamp:
- 03/09/2019 01:13:13 PM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/rosetta/inc/admin/network
- Files:
-
- 2 edited
-
class-locale-associations-view.php (modified) (1 diff)
-
class-locale-associations.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/rosetta/inc/admin/network/class-locale-associations-view.php
r7174 r8430 78 78 '<div class="notice notice-error"><p>%s</p></div>', 79 79 __( 'Please provide a locale and a subdomain.', 'rosetta' ) 80 ); 81 break; 82 case 'add-association|locale_does_not_exist' : 83 printf( 84 '<div class="notice notice-error"><p>%s</p></div>', 85 __( 'The locale does not exist yet.', 'rosetta' ) 80 86 ); 81 87 break; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/rosetta/inc/admin/network/class-locale-associations.php
r6641 r8430 119 119 $subdomain = sanitize_text_field( $_POST['subdomain'] ); 120 120 121 if ( 0 !== strpos( $locale, 'test' ) ) { 122 $locales = get_available_languages(); 123 if ( ! in_array( $locale, $locales, true ) ) { 124 return new WP_Error( 'locale_does_not_exist' ); 125 } 126 } 127 121 128 $result = $wpdb->insert( Tables::LOCALES, [ 122 129 'locale' => $locale,
Note: See TracChangeset
for help on using the changeset viewer.