Changeset 4947
- Timestamp:
- 02/19/2017 09:39:41 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php
r4542 r4947 132 132 remove_action( 'rest_api_init', 'create_initial_rest_routes', 99 ); 133 133 134 // Don't need all the wp-admin specific user metas on user create/update 135 add_filter( 'insert_user_meta', '__return_empty_array', 1 ); 134 /** 135 * Don't need all the wp-admin specific user metas on user create/update. 136 * 137 * @param array $meta Default meta values and keys for the user. 138 * @return array Filtered meta values and keys for the user. 139 */ 140 function wporg_login_limit_user_meta( $meta ) { 141 $keep = [ 'nickname' ]; 142 return array_intersect_key( $meta, array_flip( $keep ) ); 143 } 144 add_filter( 'insert_user_meta', 'wporg_login_limit_user_meta', 1 );
Note: See TracChangeset
for help on using the changeset viewer.