Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:10up/convert-to-blocks into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Jan 30, 2024
2 parents 623ba9a + b3b9196 commit f7f2059
Show file tree
Hide file tree
Showing 10 changed files with 329 additions and 165 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# These owners will be the default owners for everything in the repo. Unless a later match takes precedence, @10up/open-source-practice or @dsawardekar, as primary maintainers will be requested for review when someone opens a Pull Request.
* @10up/open-source-practice @dsawardekar
# These owners will be the default owners for everything in the repo. Unless a later match takes precedence, @jeffpaul, @dkotter, or @dsawardekar, as primary maintainers will be requested for review when someone opens a Pull Request.
* @jeffpaul @dkotter @dsawardekar

# GitHub and WordPress.org specifics
/.github/ @jeffpaul
Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/dotorg-asset-readme-update.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
name: Plugin asset/readme update

on:
push:
branches:
- trunk

jobs:
trunk:
name: Push to trunk
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
- name: Checkout code
uses: actions/checkout@v4

- name: Setup node version
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm

- name: Build
run: |
npm install
npm run build
- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
33 changes: 33 additions & 0 deletions .wordpress-org/blueprints/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "\/wp-admin\/edit.php?post_type=post",
"preferredVersions": {
"php": "8.0",
"wp": "latest"
},
"phpExtensionBundles": ["kitchen-sink"],
"steps": [
{
"step": "login",
"username": "admin",
"password": "password"
},
{
"step": "importFile",
"file": {
"resource": "url",
"url": "https:\/\/raw.githubusercontent.com\/WordPress\/theme-test-data\/42c0fdc29d0055c276fc9fdd335a672a8133c605\/theme-preview.xml"
}
},
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "wordpress.org\/plugins",
"slug": "convert-to-blocks"
},
"options": {
"activate": true
}
}
]
}
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

> Transforms classic editor content to blocks on-the-fly.
[![Support Level](https://img.shields.io/badge/support-stable-blue.svg)](#support-level) [![Build Status](https://travis-ci.org/10up/convert-to-blocks.svg?branch=develop)](https://travis-ci.org/10up/convert-to-blocks) [![Release Version](https://img.shields.io/github/release/10up/convert-to-blocks.svg)](https://github.com/10up/convert-to-blocks/releases/latest) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/convert-to-blocks?label=WordPress) [![GPLv2 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) [![Release Version](https://img.shields.io/github/release/10up/convert-to-blocks.svg)](https://github.com/10up/convert-to-blocks/releases/latest) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/convert-to-blocks?label=WordPress) [![GPLv2 License](https://img.shields.io/github/license/10up/convert-to-blocks.svg)](https://github.com/10up/convert-to-blocks/blob/develop/LICENSE.md)

[![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)

## Overview

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"require-dev": {
"phpunit/phpunit": "~9.5.0",
"10up/phpcs-composer": "dev-master",
"yoast/phpunit-polyfills": "^1.0"
"yoast/phpunit-polyfills": "^1.1.0"
},
"scripts": {
"lint": "phpcs .",
Expand Down
21 changes: 10 additions & 11 deletions composer.lock

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

8 changes: 4 additions & 4 deletions includes/ConvertToBlocks/ClassicEditorSupport.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ public function can_register() {
* @return bool
*/
public function enable_block_editor( $enabled, $post ) {
if ( ! $this->container->post_supports_convert_to_blocks( $post ) ) {
if ( $this->container->has_classic_param() ) {
return false;
}

if ( $this->container->has_classic_param() ) {
return false;
if ( $this->container->post_supports_convert_to_blocks( $post ) ) {
return true;
}

return true;
return $enabled;
}

}
Loading

0 comments on commit f7f2059

Please sign in to comment.