Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Administration Email in General Settings #38722

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

Hide email field in general options on simple classic
2 changes: 1 addition & 1 deletion projects/packages/jetpack-mu-wpcom/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
"autotagger": true,
"branch-alias": {
"dev-trunk": "5.53.x-dev"
"dev-trunk": "5.54.x-dev"
},
"textdomain": "jetpack-mu-wpcom",
"version-constants": {
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/jetpack-mu-wpcom/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-mu-wpcom",
"version": "5.53.1",
"version": "5.54.0-alpha",
"description": "Enhances your site with features powered by WordPress.com",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/jetpack-mu-wpcom/#readme",
"bugs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Jetpack_Mu_Wpcom main class.
*/
class Jetpack_Mu_Wpcom {
const PACKAGE_VERSION = '5.53.1';
const PACKAGE_VERSION = '5.54.0-alpha';
const PKG_DIR = __DIR__ . '/../';
const BASE_DIR = __DIR__ . '/';
const BASE_FILE = __FILE__;
Expand Down Expand Up @@ -103,6 +103,7 @@ public static function load_features() {
require_once __DIR__ . '/features/wpcom-admin-dashboard/wpcom-admin-dashboard.php';
require_once __DIR__ . '/features/wpcom-block-editor/class-jetpack-wpcom-block-editor.php';
require_once __DIR__ . '/features/wpcom-block-editor/functions.editor-type.php';
require_once __DIR__ . '/features/wpcom-general-settings/general-settings-mods.php';
require_once __DIR__ . '/features/wpcom-profile-settings/profile-settings-notices.php';
require_once __DIR__ . '/features/wpcom-themes/wpcom-theme-fixes.php';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?php
/**
* Customizations for the /wp-admin/options-general.php page.
*
* @package automattic/jetpack-mu-wpcom
*/

/**
* Hide the Administration Email section in General Settings on Simple Classic sites.
*/
function wpcom_maybe_hide_admin_email_address() {
$is_classic_site = get_option( 'wpcom_admin_interface' ) === 'wp-admin';
$is_simple_site = defined( 'IS_WPCOM' ) && IS_WPCOM;

if ( $is_simple_site && $is_classic_site ) {
add_action( 'admin_enqueue_scripts', 'wpcom_hide_admin_email_address' );
}
}

/**
* Hide the Administration Email section in General Settings.
*/
function wpcom_hide_admin_email_address() {
/**
* Use the CSS :has selector to hide the admin email tr elegantly. However, some older browsers do not support :has.
* Fallback to hiding the elements in the tr. This leaves some white space because it doesn't remove the row.
*/
?>
<style type="text/css">
tr:has(#new_admin_email) {
display: none;
}

#new_admin_email,
#new-admin-email-description,
label[for=new_admin_email] {
display: none;
}
</style>
<?php
/**
* JavaScript is used to remove the whitespace of the row if we had to "fallback."
*/
?>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
var emailField = document.getElementById('new_admin_email');
if (emailField) {
var parentRow = emailField.closest('tr');
if (parentRow) {
parentRow.style.display = 'none';
}
}
});
</script>
<?php
}
add_action( 'load-options-general.php', 'wpcom_maybe_hide_admin_email_address' );
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


4 changes: 2 additions & 2 deletions projects/plugins/mu-wpcom-plugin/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: changed
Comment: Updated composer.lock.


2 changes: 1 addition & 1 deletion projects/plugins/wpcomsh/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"composer/installers": true,
"roots/wordpress-core-installer": true
},
"autoloader-suffix": "26841ac2064774301cbe06d174833bfc_wpcomshⓥ5_2_1"
"autoloader-suffix": "26841ac2064774301cbe06d174833bfc_wpcomshⓥ5_2_2_alpha"
},
"extra": {
"mirror-repo": "Automattic/wpcom-site-helper",
Expand Down
4 changes: 2 additions & 2 deletions projects/plugins/wpcomsh/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion projects/plugins/wpcomsh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "@automattic/jetpack-wpcomsh",
"description": "A helper for connecting WordPress.com sites to external host infrastructure.",
"homepage": "https://jetpack.com",
"version": "5.2.1",
"version": "5.2.1-alpha",

Check failure on line 6 in projects/plugins/wpcomsh/package.json

View workflow job for this annotation

GitHub Actions / Changelogger validity

Version mismatch, expected 5.2.2-alpha but found 5.2.1-alpha! Please run `tools/project-version.sh -f -u 5.2.2-alpha plugins/wpcomsh` or `tools/fixup-project-versions.sh`, commit, and push the generated changes to fix this.
"bugs": {
"url": "https://github.com/Automattic/jetpack/labels/[Plugin] Wpcomsh"
},
Expand Down
4 changes: 2 additions & 2 deletions projects/plugins/wpcomsh/wpcomsh.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
/**
* Plugin Name: WordPress.com Site Helper
* Description: A helper for connecting WordPress.com sites to external host infrastructure.
* Version: 5.2.1
* Version: 5.2.1-alpha

Check failure on line 5 in projects/plugins/wpcomsh/wpcomsh.php

View workflow job for this annotation

GitHub Actions / Changelogger validity

Version mismatch, expected 5.2.2-alpha but found 5.2.1-alpha! Please run `tools/project-version.sh -f -u 5.2.2-alpha plugins/wpcomsh` or `tools/fixup-project-versions.sh`, commit, and push the generated changes to fix this.
* Author: Automattic
* Author URI: http://automattic.com/
*
* @package wpcomsh
*/

define( 'WPCOMSH_VERSION', '5.2.1' );
define( 'WPCOMSH_VERSION', '5.2.1-alpha' );

Check failure on line 12 in projects/plugins/wpcomsh/wpcomsh.php

View workflow job for this annotation

GitHub Actions / Changelogger validity

Version mismatch, expected 5.2.2-alpha but found 5.2.1-alpha! Please run `tools/project-version.sh -f -u 5.2.2-alpha plugins/wpcomsh` or `tools/fixup-project-versions.sh`, commit, and push the generated changes to fix this.

// If true, Typekit fonts will be available in addition to Google fonts
add_filter( 'jetpack_fonts_enable_typekit', '__return_true' );
Expand Down
Loading