Version Description
Download this release
Release Info
Developer | roo2 |
Plugin | Full Site Editing |
Version | 3.5597 |
Comparing to | |
See all releases |
Code changes from version 3.5476 to 3.5597
full-site-editing-plugin.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: WordPress.com Editing Toolkit
|
4 |
* Description: Enhances your page creation workflow within the Block Editor.
|
5 |
-
* Version: 3.
|
6 |
* Author: Automattic
|
7 |
* Author URI: https://automattic.com/wordpress-plugins/
|
8 |
* License: GPLv2 or later
|
@@ -42,7 +42,7 @@ namespace A8C\FSE;
|
|
42 |
*
|
43 |
* @var string
|
44 |
*/
|
45 |
-
define( 'A8C_ETK_PLUGIN_VERSION', '3.
|
46 |
|
47 |
// Always include these helper files for dotcom FSE.
|
48 |
require_once __DIR__ . '/dotcom-fse/helpers.php';
|
2 |
/**
|
3 |
* Plugin Name: WordPress.com Editing Toolkit
|
4 |
* Description: Enhances your page creation workflow within the Block Editor.
|
5 |
+
* Version: 3.5597
|
6 |
* Author: Automattic
|
7 |
* Author URI: https://automattic.com/wordpress-plugins/
|
8 |
* License: GPLv2 or later
|
42 |
*
|
43 |
* @var string
|
44 |
*/
|
45 |
+
define( 'A8C_ETK_PLUGIN_VERSION', '3.5597' );
|
46 |
|
47 |
// Always include these helper files for dotcom FSE.
|
48 |
require_once __DIR__ . '/dotcom-fse/helpers.php';
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic
|
|
3 |
Tags: block, blocks, editor, gutenberg, page
|
4 |
Requires at least: 5.5
|
5 |
Tested up to: 5.6
|
6 |
-
Stable tag: 3.
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
3 |
Tags: block, blocks, editor, gutenberg, page
|
4 |
Requires at least: 5.5
|
5 |
Tested up to: 5.6
|
6 |
+
Stable tag: 3.5597
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
wpcom-block-editor-nux/class-wp-rest-wpcom-block-editor-nux-status-controller.php
CHANGED
@@ -11,6 +11,11 @@ namespace A8C\FSE;
|
|
11 |
* Class WP_REST_WPCOM_Block_Editor_NUX_Status_Controller.
|
12 |
*/
|
13 |
class WP_REST_WPCOM_Block_Editor_NUX_Status_Controller extends \WP_REST_Controller {
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* WP_REST_WPCOM_Block_Editor_NUX_Status_Controller constructor.
|
16 |
*/
|
@@ -57,15 +62,16 @@ class WP_REST_WPCOM_Block_Editor_NUX_Status_Controller extends \WP_REST_Controll
|
|
57 |
* @return boolean
|
58 |
*/
|
59 |
public function show_wpcom_welcome_guide( $nux_status ) {
|
60 |
-
if ( defined( 'FORCE_SHOW_WPCOM_WELCOME_GUIDE' ) && FORCE_SHOW_WPCOM_WELCOME_GUIDE ) {
|
61 |
-
return true;
|
62 |
-
}
|
63 |
return 'enabled' === $nux_status;
|
64 |
}
|
65 |
|
66 |
/**
|
67 |
* Return the WPCOM NUX status
|
68 |
*
|
|
|
|
|
|
|
|
|
69 |
* @return WP_REST_Response
|
70 |
*/
|
71 |
public function get_nux_status() {
|
@@ -77,7 +83,11 @@ class WP_REST_WPCOM_Block_Editor_NUX_Status_Controller extends \WP_REST_Controll
|
|
77 |
$variant = 'tour';
|
78 |
}
|
79 |
|
80 |
-
|
|
|
|
|
|
|
|
|
81 |
$nux_status = apply_filters( 'wpcom_block_editor_nux_get_status', false );
|
82 |
} elseif ( ! metadata_exists( 'user', get_current_user_id(), 'wpcom_block_editor_nux_status' ) ) {
|
83 |
$nux_status = 'enabled';
|
11 |
* Class WP_REST_WPCOM_Block_Editor_NUX_Status_Controller.
|
12 |
*/
|
13 |
class WP_REST_WPCOM_Block_Editor_NUX_Status_Controller extends \WP_REST_Controller {
|
14 |
+
/**
|
15 |
+
* Use 30 minutes in case the user isn't taken to the editor immediately. See pbxlJb-Ly-p2#comment-1028.
|
16 |
+
*/
|
17 |
+
const NEW_SITE_AGE_SECONDS = 30 * 60;
|
18 |
+
|
19 |
/**
|
20 |
* WP_REST_WPCOM_Block_Editor_NUX_Status_Controller constructor.
|
21 |
*/
|
62 |
* @return boolean
|
63 |
*/
|
64 |
public function show_wpcom_welcome_guide( $nux_status ) {
|
|
|
|
|
|
|
65 |
return 'enabled' === $nux_status;
|
66 |
}
|
67 |
|
68 |
/**
|
69 |
* Return the WPCOM NUX status
|
70 |
*
|
71 |
+
* This is only called for sites where the user hasn't already dismissed the tour.
|
72 |
+
* Once the tour has been dismissed, the closed state is saved in local storage (for the current site)
|
73 |
+
* see src/block-editor-nux.js
|
74 |
+
*
|
75 |
* @return WP_REST_Response
|
76 |
*/
|
77 |
public function get_nux_status() {
|
83 |
$variant = 'tour';
|
84 |
}
|
85 |
|
86 |
+
$blog_age = time() - strtotime( get_blog_details()->registered );
|
87 |
+
|
88 |
+
if ( $blog_age < self::NEW_SITE_AGE_SECONDS ) {
|
89 |
+
$nux_status = 'enabled';
|
90 |
+
} elseif ( has_filter( 'wpcom_block_editor_nux_get_status' ) ) {
|
91 |
$nux_status = apply_filters( 'wpcom_block_editor_nux_get_status', false );
|
92 |
} elseif ( ! metadata_exists( 'user', get_current_user_id(), 'wpcom_block_editor_nux_status' ) ) {
|
93 |
$nux_status = 'enabled';
|
wpcom-block-editor-nux/dist/wpcom-block-editor-nux.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('a8c-fse-common-data-stores', 'lodash', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-element', 'wp-i18n', 'wp-nux', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => 'd8449eca6dcd5d3248b6392d8bbc118f');
|
wpcom-block-editor-nux/src/block-editor-nux.js
CHANGED
@@ -29,7 +29,7 @@ registerPlugin( 'wpcom-block-editor-nux', {
|
|
29 |
|
30 |
const { fetchWelcomeGuideStatus } = useDispatch( 'automattic/wpcom-welcome-guide' );
|
31 |
|
32 |
-
// On mount check if the WPCOM welcome guide status exists in state, otherwise fetch it from the API.
|
33 |
useEffect( () => {
|
34 |
if ( ! isLoaded ) {
|
35 |
fetchWelcomeGuideStatus();
|
29 |
|
30 |
const { fetchWelcomeGuideStatus } = useDispatch( 'automattic/wpcom-welcome-guide' );
|
31 |
|
32 |
+
// On mount check if the WPCOM welcome guide status exists in state (from local storage), otherwise fetch it from the API.
|
33 |
useEffect( () => {
|
34 |
if ( ! isLoaded ) {
|
35 |
fetchWelcomeGuideStatus();
|