Browse Source

Enable WordPress 4.9.6 GDPR tools (#129)

This PR lets Aldine (and by extension the Pressbooks landing page site) display the export and erase personal data panels introduced in WordPress 4.9.6. They will only be visible to those who have admin access to the root site (network managers).
pull/130/head
Ned Zimmerman 7 years ago committed by GitHub
parent
commit
d283cc836c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      functions.php
  2. 9
      inc/actions/namespace.php
  3. 3
      inc/intervention.php

3
functions.php

@ -74,3 +74,6 @@ add_action( 'wp_ajax_pressbooks_aldine_update_catalog', '\Aldine\Admin\update_ca
add_filter( 'wpmu_blogs_columns', '\Aldine\Admin\catalog_columns' ); add_filter( 'wpmu_blogs_columns', '\Aldine\Admin\catalog_columns' );
add_action( 'manage_blogs_custom_column', '\Aldine\Admin\catalog_column', 1, 3 ); add_action( 'manage_blogs_custom_column', '\Aldine\Admin\catalog_column', 1, 3 );
add_action( 'manage_sites_custom_column', '\Aldine\Admin\catalog_column', 1, 3 ); add_action( 'manage_sites_custom_column', '\Aldine\Admin\catalog_column', 1, 3 );
// Remove first submenu page from Tools.
add_action( 'admin_menu', '\Aldine\Actions\remove_tools_menu' );

9
inc/actions/namespace.php

@ -292,3 +292,12 @@ function tinymce_l18n() {
</script> </script>
<?php <?php
} }
/**
* Remove top-level tools menu.
*
* @since 1.4.0
*/
function remove_tools_menu() {
remove_submenu_page( 'tools.php', 'tools.php' );
}

3
inc/intervention.php

@ -13,7 +13,8 @@ intervention( 'remove-howdy', __( 'Hello,', 'pressbooks-aldine' ) );
intervention( 'remove-dashboard-items', [ 'activity', 'quick-draft' ] ); intervention( 'remove-dashboard-items', [ 'activity', 'quick-draft' ] );
intervention( 'remove-menu-items', [ intervention( 'remove-menu-items', [
'posts', 'posts',
'tools', 'tool-import',
'tool-export',
'setting-writing', 'setting-writing',
'setting-reading', 'setting-reading',
'setting-permalink', 'setting-permalink',

Loading…
Cancel
Save