Update WordPress to 5.2
This commit is contained in:
parent
489b5a5914
commit
e00f87f2f5
599 changed files with 119573 additions and 55990 deletions
|
@ -708,18 +708,6 @@ function populate_roles() {
|
|||
function populate_roles_160() {
|
||||
// Add roles
|
||||
|
||||
// Dummy gettext calls to get strings in the catalog.
|
||||
/* translators: user role */
|
||||
_x( 'Administrator', 'User role' );
|
||||
/* translators: user role */
|
||||
_x( 'Editor', 'User role' );
|
||||
/* translators: user role */
|
||||
_x( 'Author', 'User role' );
|
||||
/* translators: user role */
|
||||
_x( 'Contributor', 'User role' );
|
||||
/* translators: user role */
|
||||
_x( 'Subscriber', 'User role' );
|
||||
|
||||
add_role( 'administrator', 'Administrator' );
|
||||
add_role( 'editor', 'Editor' );
|
||||
add_role( 'author', 'Author' );
|
||||
|
@ -1316,8 +1304,18 @@ function populate_site_meta( $site_id, array $meta = array() ) {
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters meta for a site on creation.
|
||||
*
|
||||
* @since 5.2.0
|
||||
*
|
||||
* @param array $meta Associative array of site meta keys and values to be inserted.
|
||||
* @param int $site_id ID of site to populate.
|
||||
*/
|
||||
$site_meta = apply_filters( 'populate_site_meta', $meta, $site_id );
|
||||
|
||||
$insert = '';
|
||||
foreach ( $meta as $meta_key => $meta_value ) {
|
||||
foreach ( $site_meta as $meta_key => $meta_value ) {
|
||||
if ( is_array( $meta_value ) ) {
|
||||
$meta_value = serialize( $meta_value );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue