Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Aug 20, 2024
2 parents 2e94dfa + 44cf398 commit 33e93ab
Show file tree
Hide file tree
Showing 14 changed files with 144 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
core:
- {name: 'WP latest', version: 'latest', continue: false}
- {name: 'WP minimum', version: 'WordPress/WordPress#6.3', continue: false}
- {name: 'WP minimum', version: 'WordPress/WordPress#6.4', continue: false}
- {name: 'WP trunk', version: 'WordPress/WordPress#master', continue: true}
steps:
- name: Checkout
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/dotorg-push-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ jobs:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}

- name: Upload release asset
uses: actions/upload-release-asset@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{github.workspace}}/${{ github.event.repository.name }}.zip
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip
files: ${{github.workspace}}/${{ github.event.repository.name }}.zip
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased] - TBD

## [1.3.1] - 2024-08-20
**Note that this release bumps the WordPress minimum version from 6.3 to 6.4.**

### Changed
- Bump WordPress "tested up to" version 6.6 (props [@sudip-md](https://github.com/sudip-md), [@jeffpaul](https://github.com/jeffpaul), [@Sidsector9](https://github.com/Sidsector9), [@ankitguptaindia](https://github.com/ankitguptaindia) via [#174](https://github.com/10up/convert-to-blocks/pull/174)).
- Bump WordPress minimum from 6.3 to 6.4 (props [@sudip-md](https://github.com/sudip-md), [@jeffpaul](https://github.com/jeffpaul), [@Sidsector9](https://github.com/Sidsector9), [@ankitguptaindia](https://github.com/ankitguptaindia) via [#174](https://github.com/10up/convert-to-blocks/pull/174)).

### Fixed
- Issue with saving a post before the convert to blocks transform was completed (props [@mdesplenter](https://github.com/mdesplenter), [@Sidsector9](https://github.com/Sidsector9), [@dsawardekar](https://github.com/dsawardekar) via [#173](https://github.com/10up/convert-to-blocks/pull/173)).

### Security
- Bump `braces` from 3.0.2 to 3.0.3 (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#168](https://github.com/10up/convert-to-blocks/pull/168)).
- Bump `ws` from 7.5.9 to 7.5.10 (props [@dependabot](https://github.com/apps/dependabot), [@Sidsector9](https://github.com/Sidsector9) via [#169](https://github.com/10up/convert-to-blocks/pull/169)).

### Developer
- Update code comments (props [@barryceelen](https://github.com/barryceelen), [@dkotter](https://github.com/dkotter) via [#175](https://github.com/10up/convert-to-blocks/pull/175)).
- Move from `actions/upload-release-asset` to `softprops/action-gh-release` Github action (props [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul) via [#176](https://github.com/10up/convert-to-blocks/pull/176)).
- Update repo badges, add WordPress Playground badge (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#177](https://github.com/10up/convert-to-blocks/pull/177)).

## [1.3.0] - 2024-05-14
### Added
- Block Catalog integration, and pagination support (props [@dsawardekar](https://github.com/dsawardekar), [@iamdharmesh](https://github.com/iamdharmesh) via [#164](https://github.com/10up/convert-to-blocks/pull/164)).
Expand Down Expand Up @@ -148,6 +167,7 @@ All notable changes to this project will be documented in this file, per [the Ke
- Initial release of Convert to Blocks.

[Unreleased]: https://github.com/10up/convert-to-blocks/compare/trunk...develop
[1.3.1]: https://github.com/10up/convert-to-blocks/compare/1.3.0...1.3.1
[1.3.0]: https://github.com/10up/convert-to-blocks/compare/1.2.1...1.3.0
[1.2.2]: https://github.com/10up/convert-to-blocks/compare/1.2.1...1.2.2
[1.2.1]: https://github.com/10up/convert-to-blocks/compare/1.2.0...1.2.1
Expand Down
2 changes: 1 addition & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The following individuals are responsible for curating the list of issues, respo

Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc.

[Darshan Sawardekar (@dsawardekar)](https://github.com/dsawardekar), [Taylor Lovett (@tlovett1)](https://github.com/tlovett1), [Tyler Bailey (@TylerB24890)](https://github.com/TylerB24890), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Diana Padron](https://profiles.wordpress.org/dianapadron), [Barry Ceelen (@barryceelen)](https://github.com/barryceelen), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Peter Sorensen (@psorensen)](https://github.com/psorensen), [Brandon Berg (@BBerg10up)](https://github.com/BBerg10up), [Hashim Warren (@hashimwarren)](https://github.com/hashimwarren), [Jason LeMahieu (@MadtownLems)](https://github.com/MadtownLems), [Simon Carne](https://profiles.wordpress.org/scarne/), [Rodrigo Arias (@rodrigo-arias)](https://github.com/rodrigo-arias), [Gary Thayer (@gthayer)](https://github.com/gthayer), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Max Lyuchin (@cadic)](https://github.com/cadic), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Mohit Dadhich (@mohitwp)](https://github.com/mohitwp), [GitHub Dependabot (@dependabot)](https://github.com/apps/dependabot), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Andrew Norcross (@norcross)](https://github.com/norcross), [Quamruz Zaman (@zamanq)](https://github.com/zamanq), [Mehul Gohil (@mehul0810)](https://github.com/mehul0810), [Akshit Sethi (@akshitsethi)](https://github.com/akshitsethi), [Terrance Orletsky (@terrance-orletsky-d7)](https://github.com/terrance-orletsky-d7), [Philipp (@ouun)](https://github.com/ouun), [Sanket Parmar (@sanketio)](https://github.com/sanketio), [Konstantinos Galanakis (@kmgalanakis)](https://github.com/kmgalanakis), [Vikram Moparthy (@vikrampm1)](https://github.com/vikrampm1), [Barney Jeffries (@barneyjeffries)](https://github.com/barneyjeffries), [Ravinder Kumar (@ravinderk)](https://github.com/ravinderk), [Felipe Elia (@felipeelia)](https://github.com/felipeelia), [Dan Burzynski (@c0ntax)](https://github.com/c0ntax), [Storm Rockwell (@stormrockwell)](https://github.com/stormrockwell), [Harshal Kadu (@QAharshalkadu)](https://github.com/QAharshalkadu), [Sudip Dadhaniya (@sudip-md)](https://github.com/sudip-md), [Aaron Jorbin (@aaronjorbin)](https://github.com/aaronjorbin).
[Darshan Sawardekar (@dsawardekar)](https://github.com/dsawardekar), [Taylor Lovett (@tlovett1)](https://github.com/tlovett1), [Tyler Bailey (@TylerB24890)](https://github.com/TylerB24890), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Diana Padron](https://profiles.wordpress.org/dianapadron), [Barry Ceelen (@barryceelen)](https://github.com/barryceelen), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Peter Sorensen (@psorensen)](https://github.com/psorensen), [Brandon Berg (@BBerg10up)](https://github.com/BBerg10up), [Hashim Warren (@hashimwarren)](https://github.com/hashimwarren), [Jason LeMahieu (@MadtownLems)](https://github.com/MadtownLems), [Simon Carne](https://profiles.wordpress.org/scarne/), [Rodrigo Arias (@rodrigo-arias)](https://github.com/rodrigo-arias), [Gary Thayer (@gthayer)](https://github.com/gthayer), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Max Lyuchin (@cadic)](https://github.com/cadic), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Mohit Dadhich (@mohitwp)](https://github.com/mohitwp), [GitHub Dependabot (@dependabot)](https://github.com/apps/dependabot), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Andrew Norcross (@norcross)](https://github.com/norcross), [Quamruz Zaman (@zamanq)](https://github.com/zamanq), [Mehul Gohil (@mehul0810)](https://github.com/mehul0810), [Akshit Sethi (@akshitsethi)](https://github.com/akshitsethi), [Terrance Orletsky (@terrance-orletsky-d7)](https://github.com/terrance-orletsky-d7), [Philipp (@ouun)](https://github.com/ouun), [Sanket Parmar (@sanketio)](https://github.com/sanketio), [Konstantinos Galanakis (@kmgalanakis)](https://github.com/kmgalanakis), [Vikram Moparthy (@vikrampm1)](https://github.com/vikrampm1), [Barney Jeffries (@barneyjeffries)](https://github.com/barneyjeffries), [Ravinder Kumar (@ravinderk)](https://github.com/ravinderk), [Felipe Elia (@felipeelia)](https://github.com/felipeelia), [Dan Burzynski (@c0ntax)](https://github.com/c0ntax), [Storm Rockwell (@stormrockwell)](https://github.com/stormrockwell), [Harshal Kadu (@QAharshalkadu)](https://github.com/QAharshalkadu), [Sudip Dadhaniya (@sudip-md)](https://github.com/sudip-md), [Aaron Jorbin (@aaronjorbin)](https://github.com/aaronjorbin), [Ankit K Gupta (@ankitguptaindia)](https://github.com/ankitguptaindia), [Maarten de Splenter (@mdesplenter)](https://github.com/mdesplenter).

## Libraries

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Transforms classic editor content to blocks on-the-fly.
[![Support Level](https://img.shields.io/badge/support-stable-blue.svg)](#support-level) ![WordPress Plugin Version](https://img.shields.io/wordpress/plugin/v/convert-to-blocks?label=Latest%20Release) ![WordPress Plugin: Tested WP Version](https://img.shields.io/wordpress/plugin/tested/convert-to-blocks?label=WordPress%20tested%20up%20to) ![WordPress Plugin Required PHP Version](https://img.shields.io/wordpress/plugin/required-php/convert-to-blocks?label=Requires%20PHP) ![WordPress Plugin: Required WP Version](https://img.shields.io/wordpress/plugin/wp-version/convert-to-blocks?label=Requires%20WordPress) [![GPL-2.0-or-later License](https://img.shields.io/github/license/10up/convert-to-blocks.svg)](https://github.com/10up/convert-to-blocks/blob/develop/LICENSE.md)
[![Support Level](https://img.shields.io/badge/support-stable-blue.svg)](#support-level) ![WordPress Plugin Required PHP Version](https://img.shields.io/wordpress/plugin/required-php/convert-to-blocks?label=Requires%20PHP) ![WordPress Plugin: Required WP Version](https://img.shields.io/wordpress/plugin/wp-version/convert-to-blocks?label=Requires%20WordPress) ![WordPress Plugin: Tested WP Version](https://img.shields.io/wordpress/plugin/tested/convert-to-blocks?label=WordPress%20tested%20up%20to) [![GPL-2.0-or-later License](https://img.shields.io/github/license/10up/convert-to-blocks.svg)](https://github.com/10up/convert-to-blocks/blob/develop/LICENSE.md) [![WordPress Plugin Version](https://img.shields.io/wordpress/plugin/v/convert-to-blocks?logo=wordpress&logoColor=FFFFFF&label=Playground%20Demo&labelColor=3858E9&color=3858E9)](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/10up/convert-to-blocks/develop/.wordpress-org/blueprints/blueprint.json)

[![E2E test](https://github.com/10up/convert-to-blocks/actions/workflows/cypress.yml/badge.svg)](https://github.com/10up/convert-to-blocks/actions/workflows/cypress.yml) [![Linting](https://github.com/10up/convert-to-blocks/actions/workflows/lint.yml/badge.svg)](https://github.com/10up/convert-to-blocks/actions/workflows/lint.yml) [![Dependency Review](https://github.com/10up/convert-to-blocks/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/10up/convert-to-blocks/actions/workflows/dependency-review.yml)

Expand Down
10 changes: 9 additions & 1 deletion assets/js/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,15 @@ class ConvertToBlocksEditorSupport {
return null;
}

client.save();
const saveDelay = config?.agent?.save_delay || 0;

if (saveDelay > 0) {
setTimeout(() => {
client.save();
}, saveDelay);
} else {
client.save();
}

return null;
}, 500);
Expand Down
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package convert-to-blocks
*/

$plugin_version = '1.3.0';
$plugin_version = '1.3.1';

if ( file_exists( __DIR__ . '/.commit' ) ) {
// phpcs:disable
Expand Down
4 changes: 2 additions & 2 deletions convert-to-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Plugin Name: Convert to Blocks
* Plugin URI: https://github.com/10up/convert-to-blocks
* Description: Convert classic editor posts to blocks on the fly.
* Version: 1.3.0
* Requires at least: 6.3
* Version: 1.3.1
* Requires at least: 6.4
* Requires PHP: 8.0
* Author: 10up
* Author URI: https://10up.com
Expand Down
7 changes: 3 additions & 4 deletions includes/ConvertToBlocks/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
class Assets {

/**
* Flag stores whether the assets have been registered with WordPress
* Flag stores whether the assets have been registered with WordPress.
*
* @var bool
*/
public $registered = false;

/**
* Registers the scripts and styles of the Plugin.
* Registers the plugin scripts and styles.
*/
public function register() {
wp_register_script(
Expand All @@ -45,8 +45,7 @@ public function register() {
}

/**
* Enqueues the Scripts & Styles for the Smarter Travel Gutenberg
* Migration Plugin.
* Enqueues the plugin scripts and styles.
*/
public function do_assets() {
wp_enqueue_script( 'convert_to_blocks_editor' );
Expand Down
8 changes: 7 additions & 1 deletion includes/ConvertToBlocks/MigrationAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@ public function register() {
return;
}

$posts_to_update = get_option( 'ctb_posts_to_update' );
$cursor = get_option( 'ctb_cursor' );
$posts_to_update = is_array( $posts_to_update ) ? $posts_to_update : [];
$post_id = $posts_to_update[ $cursor ] ?? 0;

wp_localize_script(
'convert_to_blocks_editor',
'convert_to_blocks_agent',
[
'agent' => [
'next' => $this->next(),
'next' => $this->next(),
'save_delay' => apply_filters( 'convert_to_blocks_save_delay', 0, $post_id ),
],
]
);
Expand Down
Loading

0 comments on commit 33e93ab

Please sign in to comment.