Skip to content
Permalink
Browse files

Dashboard: Remove the Try Gutenberg callout.

Merge of [43807] from the 5.0 branch.

Props mukesh27.
Fixes #45063.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@44106 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
pento committed Dec 13, 2018
1 parent e908aa3 commit ab0ef78c401e8ff3ce3718c06e9a5667da6fe522
@@ -67,7 +67,6 @@
'get-post-thumbnail-html', 'get-community-events', 'edit-theme-plugin-file',
'wp-privacy-export-personal-data',
'wp-privacy-erase-personal-data',
'update-try-gutenberg-panel',
);
// Deprecated
@@ -764,7 +764,6 @@ img.emoji {

/* @todo can we combine these into a class or use an existing dashicon one? */
.welcome-panel .welcome-panel-close:before,
.try-gutenberg-panel .try-gutenberg-panel-close:before,
.tagchecklist .ntdelbutton .remove-tag-icon:before,
#bulk-titles div a:before,
.notice-dismiss:before {
@@ -98,8 +98,7 @@
}

/* Welcome Panel */
.welcome-panel,
.try-gutenberg-panel {
.welcome-panel {
position: relative;
overflow: auto;
margin: 16px 0;
@@ -111,8 +110,7 @@
line-height: 2.1em;
}

.welcome-panel h2,
.try-gutenberg-panel h2 {
.welcome-panel h2 {
margin: 0;
font-size: 21px;
font-weight: 400;
@@ -124,41 +122,24 @@
font-size: 16px;
}

.try-gutenberg-panel h3 {
margin: 17px 0 0;
font-size: 16px;
line-height: 1.4;
}

.welcome-panel li,
.try-gutenberg-panel li {
.welcome-panel li {
font-size: 14px;
}

.welcome-panel p,
.try-gutenberg-panel p {
.welcome-panel p {
color: #72777c;
}

.welcome-panel a,
.try-gutenberg-action a {
.welcome-panel a {
text-decoration: none;
}

.welcome-panel .about-description,
.try-gutenberg-panel .about-description {
.welcome-panel .about-description {
font-size: 16px;
margin: 0;
}

.try-gutenberg-panel-content hr {
margin: 20px -23px 0 -23px;
border-top: 1px solid #f3f4f5;
border-bottom: none;
}

.welcome-panel .welcome-panel-close,
.try-gutenberg-panel .try-gutenberg-panel-close {
.welcome-panel .welcome-panel-close {
position: absolute;
z-index: 10;
top: 10px;
@@ -169,8 +150,7 @@
text-decoration: none;
}

.welcome-panel .welcome-panel-close:before,
.try-gutenberg-panel .try-gutenberg-panel-close:before {
.welcome-panel .welcome-panel-close:before {
position: absolute;
top: 8px;
left: 0;
@@ -185,23 +165,11 @@
white-space: normal;
}

.welcome-panel-content,
.try-gutenberg-panel-content {
.welcome-panel-content {
margin: 0 13px;
max-width: 1500px;
}

.try-gutenberg-panel img {
margin-top: 23px;
width: calc( 100% - 40px );
border: 1px solid #f3f4f5;
}

.try-gutenberg-panel .install-now.updating-message:before,
.try-gutenberg-panel .install-now.updated-message:before {
margin-top: 11px;
}

.welcome-panel .welcome-panel-column-container {
clear: both;
position: relative;
@@ -213,10 +181,6 @@
float: left;
}

.try-gutenberg-panel .try-gutenberg-panel-column > * {
padding-right: 40px;
}

.ie8 .welcome-panel .welcome-panel-column {
min-width: 230px;
}
@@ -225,63 +189,11 @@
width: 36%;
}

.try-gutenberg-panel .try-gutenberg-panel-column-container {
display: flex;
margin-bottom: 13px;
}

@supports (display: grid) {
.try-gutenberg-panel .try-gutenberg-panel-column-container {
display: -ms-grid;
display: grid;
-ms-grid-columns: 36% 32% 32%;
grid-template-columns: 36% 32% 32%;
}
}

.try-gutenberg-panel .try-gutenberg-panel-image-column {
width: 36%;
}

@supports (display: grid) {
.try-gutenberg-panel .try-gutenberg-panel-image-column {
width: auto;
}
}

.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 32%;
}

@supports (display: grid) {
.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
display: -ms-grid;
display: grid;
-ms-grid-rows: auto 100px;
grid-template-rows: auto 100px;
width: auto;
}
}

.try-gutenberg-panel .try-gutenberg-action {
height: 100px;
}

@supports (display: grid) {
.try-gutenberg-panel .try-gutenberg-action {
height: auto;
}
}

.welcome-panel-column p.hide-if-no-customize {
margin-top: 10px;
}

.welcome-panel-column p,
.try-gutenberg-panel-column p {
.welcome-panel-column p {
margin-top: 7px;
color: #444;
}
@@ -1296,27 +1208,6 @@ a.rsswidget {
}
}

@media screen and (max-width: 1024px) {
.try-gutenberg-panel .try-gutenberg-panel-column-container {
-ms-grid-columns: 50% 50%;
grid-template-columns: 50% 50%;
}

.try-gutenberg-panel .try-gutenberg-panel-image-column {
display: none;
}

.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
width: 50%;
}

@supports (display: grid) {
.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
width: auto;
}
}
}

@media screen and (max-width: 870px) {
.welcome-panel .welcome-panel-column,
.welcome-panel .welcome-panel-column:first-child {
@@ -1325,21 +1216,6 @@ a.rsswidget {
width: 100%;
}

.try-gutenberg-panel .try-gutenberg-panel-column-container {
flex-wrap: wrap;
}

@supports (display: grid) {
.try-gutenberg-panel .try-gutenberg-panel-column-container {
-ms-grid-columns: 100%;
grid-template-columns: 100%;
}
}

.try-gutenberg-panel .try-gutenberg-panel-column:not(.try-gutenberg-panel-image-column) {
width: 100%;
}

.welcome-panel .welcome-panel-column li {
display: inline-block;
margin-right: 13px;
@@ -1390,8 +1266,7 @@ a.rsswidget {
/* Smartphone */
@media screen and (max-width: 600px) {
/* Keep the close icon from overlapping the Welcome text. */
.welcome-panel .welcome-panel-close,
.try-gutenberg-panel .try-gutenberg-panel-close {
.welcome-panel .welcome-panel-close {
overflow: hidden;
text-indent: 40px;
white-space: nowrap;
@@ -1403,8 +1278,7 @@ a.rsswidget {
}

/* Make the close icon larger for tappability. */
.welcome-panel .welcome-panel-close:before,
.try-gutenberg-panel .try-gutenberg-panel-close:before {
.welcome-panel .welcome-panel-close:before {
font-size: 20px;
top: 5px;
left: -35px;
@@ -1484,19 +1484,6 @@ function wp_ajax_update_welcome_panel() {
wp_die( 1 );
}
/**
* Ajax handler for updating whether to display the Try Gutenberg panel.
*
* @since 4.9.8
*/
function wp_ajax_update_try_gutenberg_panel() {
check_ajax_referer( 'try-gutenberg-panel-nonce', 'trygutenbergpanelnonce' );
update_user_meta( get_current_user_id(), 'show_try_gutenberg_panel', empty( $_POST['visible'] ) ? 0 : 1 );
wp_die( 1 );
}
/**
* Ajax handler for retrieving menu meta boxes.
*
@@ -1034,23 +1034,6 @@ public function render_meta_boxes_preferences() {
echo _x( 'Welcome', 'Welcome panel' ) . "</label>\n";
}
if ( 'dashboard' === $this->id && has_action( 'try_gutenberg_panel' ) ) {
if ( isset( $_GET['try_gutenberg'] ) ) {
$try_gutenberg_checked = empty( $_GET['try_gutenberg'] ) ? 0 : 1;
update_user_meta( get_current_user_id(), 'show_try_gutenberg_panel', $try_gutenberg_checked );
} else {
$try_gutenberg_checked = get_user_meta( get_current_user_id(), 'show_try_gutenberg_panel', true );
if ( '' === $try_gutenberg_checked ) {
$try_gutenberg_checked = '1';
}
if ( '2' === $try_gutenberg_checked && wp_get_current_user()->user_email != get_option( 'admin_email' ) ) {
$try_gutenberg_checked = false;
}
}
echo '<label for="wp_try_gutenberg_panel-hide">';
echo '<input type="checkbox" id="wp_try_gutenberg_panel-hide"' . checked( (bool) $try_gutenberg_checked, true, false ) . ' />';
echo __( 'New Editor' ) . "</label>\n";
}
?>
</fieldset>
<?php

0 comments on commit ab0ef78

Please sign in to comment.
You can’t perform that action at this time.