Privacy tools: Organize privacy functions into logical files and classes.

Props xkon, birgire, desrosj, garrett-eclipse, azaozz.
See #43895.

git-svn-id: https://develop.svn.wordpress.org/trunk@45448 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2019-05-26 20:49:04 +00:00
parent ae81d63a2a
commit 9fcb362fa0
23 changed files with 2353 additions and 2187 deletions

View File

@@ -1542,19 +1542,6 @@ function wp_default_scripts( &$scripts ) {
);
$scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array( 'jquery' ), false, 1 );
did_action( 'init' ) && $scripts->localize(
'xfn',
'privacyToolsL10n',
array(
'noDataFound' => __( 'No personal data was found for this user.' ),
'foundAndRemoved' => __( 'All of the personal data found for this user was erased.' ),
'noneRemoved' => __( 'Personal data was found for this user but was not erased.' ),
'someNotRemoved' => __( 'Personal data was found for this user but some of the personal data found was not erased.' ),
'removalError' => __( 'An error occurred while attempting to find and erase personal data.' ),
'noExportFile' => __( 'No personal data export file was generated.' ),
'exportError' => __( 'An error occurred while attempting to export personal data.' ),
)
);
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array( 'jquery-ui-sortable' ), false, 1 );
did_action( 'init' ) && $scripts->localize(
@@ -1693,6 +1680,21 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'site-health', "/wp-admin/js/site-health$suffix.js", array( 'clipboard', 'jquery', 'wp-util', 'wp-a11y', 'wp-i18n' ), false, 1 );
$scripts->set_translations( 'site-health' );
$scripts->add( 'privacy-tools', "/wp-admin/js/privacy-tools$suffix.js", array( 'jquery' ), false, 1 );
did_action( 'init' ) && $scripts->localize(
'privacy-tools',
'privacyToolsL10n',
array(
'noDataFound' => __( 'No personal data was found for this user.' ),
'foundAndRemoved' => __( 'All of the personal data found for this user was erased.' ),
'noneRemoved' => __( 'Personal data was found for this user but was not erased.' ),
'someNotRemoved' => __( 'Personal data was found for this user but some of the personal data found was not erased.' ),
'removalError' => __( 'An error occurred while attempting to find and erase personal data.' ),
'noExportFile' => __( 'No personal data export file was generated.' ),
'exportError' => __( 'An error occurred while attempting to export personal data.' ),
)
);
$scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ), false, 1 );
did_action( 'init' ) && $scripts->localize(
'updates',