updated plugin Jetpack Protect
version 4.0.0
This commit is contained in:
@ -537,12 +537,6 @@ class Assets {
|
||||
$wp_scripts->add( 'wp-jp-i18n-state', false, array( 'wp-deprecated', $handle ) );
|
||||
$wp_scripts->add_inline_script( 'wp-jp-i18n-state', 'wp.deprecated( "wp-jp-i18n-state", { alternative: "wp-jp-i18n-loader" } );' );
|
||||
$wp_scripts->add_inline_script( 'wp-jp-i18n-state', 'wp.jpI18nState = wp.jpI18nLoader.state;' );
|
||||
|
||||
// Register the React JSX runtime script - used as a polyfill until we can update JSX transforms. See https://github.com/Automattic/jetpack/issues/38424.
|
||||
// @todo Remove this when we drop support for WordPress 6.5, as well as the script inclusion in test_wp_default_scripts_hook.
|
||||
$jsx_url = self::normalize_path( plugins_url( '../build/react-jsx-runtime.js', __FILE__ ) );
|
||||
$wp_scripts->add( 'react-jsx-runtime', $jsx_url, array( 'react' ), '18.3.1', true );
|
||||
$wp_scripts->add_data( 'react-jsx-runtime', 'group', 1 );
|
||||
}
|
||||
|
||||
// endregion .
|
||||
|
@ -215,6 +215,10 @@ class Script_Data {
|
||||
return array(
|
||||
'display_name' => $current_user->display_name,
|
||||
'id' => $current_user->ID,
|
||||
'capabilities' => array(
|
||||
'manage_options' => current_user_can( 'manage_options' ),
|
||||
'manage_modules' => current_user_can( 'jetpack_manage_modules' ),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user