Commit Graph

13 Commits

Author SHA1 Message Date
John Blackbourn e8a05d5082 Editor: Document the arguments for registering a block style.
See #55646

Built from https://develop.svn.wordpress.org/trunk@53892


git-svn-id: http://core.svn.wordpress.org/trunk@53451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-08-13 22:38:09 +00:00
audrasjb 74d251884f Editor: Ensure block style name does not contain spaces before creating the class.
This change adds a check to ensure there is no spaces in block style variation names before generating the class. Returns `false` and a `_doing_it_wrong()` message if a space is detected.

Props amustaque97, costdev, hellofromtonya, pbiron, SergeyBiryukov, afragen.
Fixes #54296.

Built from https://develop.svn.wordpress.org/trunk@52261


git-svn-id: http://core.svn.wordpress.org/trunk@51853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-28 13:53:00 +00:00
John Blackbourn 92f0b0cb48 Docs: Various docblock corrections and improvements.
See #53399

Built from https://develop.svn.wordpress.org/trunk@52236


git-svn-id: http://core.svn.wordpress.org/trunk@51828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-23 21:37:01 +00:00
Sergey Biryukov e05ffb46a5 Coding Standards: Remove a one-time `$message` variable in some `_doing_it_wrong()` calls.
This brings some consistency with most other calls.

Follow-up to [23378], [25605], [34745], [36219], [44108], [46111], [48156].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@51154


git-svn-id: http://core.svn.wordpress.org/trunk@50763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 15:22:58 +00:00
gziolo b31964a44b Blocks: Add is_default handling to server side block styles registry
Ensures that register_block_style lets developer pass `is_default` flag to mark one of the block style variations as the default one.

Props mukesh27, xavivars.
Fixes #53006.


Built from https://develop.svn.wordpress.org/trunk@50703


git-svn-id: http://core.svn.wordpress.org/trunk@50312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-13 08:04:13 +00:00
John Blackbourn 905460bd5e Docs: Standardise the type name for booleans and integers.
This brings these docs inline with the documentation standards.

Props ravipatel, justinahinon

Fixes #51426

Built from https://develop.svn.wordpress.org/trunk@49120


git-svn-id: http://core.svn.wordpress.org/trunk@48882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 20:02:05 +00:00
Sergey Biryukov c892c420b7 Docs: Miscellaneous DocBlock corrections.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48198


git-svn-id: http://core.svn.wordpress.org/trunk@47967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-28 11:53:04 +00:00
TimothyBlynJacobs 9f14967ff0 REST API: Introduce Block Types endpoint.
This endpoint allows a user to retrieve the block type definition for all server-side registered block types.

Props spacedmonkey, aduth, gziolo, ocean90, TimothyBlynJacobs.
Fixes #47620.

Built from https://develop.svn.wordpress.org/trunk@48173


git-svn-id: http://core.svn.wordpress.org/trunk@47942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-26 00:46:07 +00:00
Sergey Biryukov e015fbd8bb Editor: Fix typo in an error message in `WP_Block_Styles_Registry::register()`.
Props man4toman, alishankhan, shaampk1.
Fixes #48437.
Built from https://develop.svn.wordpress.org/trunk@46601


git-svn-id: http://core.svn.wordpress.org/trunk@46398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-27 14:09:02 +00:00
Sergey Biryukov bb57520713 Docs: Improve DocBlock formatting in `WP_Block_Styles_Registry` per the documentation standards.
See #48303.
Built from https://develop.svn.wordpress.org/trunk@46600


git-svn-id: http://core.svn.wordpress.org/trunk@46397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-27 14:07:02 +00:00
John Blackbourn 7c2b9f2a2e Docs: Miscellaneous docblock fixes and improvements.
See #48303

Built from https://develop.svn.wordpress.org/trunk@46594


git-svn-id: http://core.svn.wordpress.org/trunk@46391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-26 20:43:04 +00:00
desrosj abff73f0e0 Docs: Correct `WP_Styles_Registry` documentation.
This change updates the file’s docblock to correctly indicate `WordPress`/`Blocks` as the `@package`/`@subpackage`, updates the `_doing_it_wrong()` versions to `5.3.0` instead of the Gutenberg plugin versions, and removes some stray `gutenberg` text domains.

Props david.binda.
Fixes #48181.
Built from https://develop.svn.wordpress.org/trunk@46351


git-svn-id: http://core.svn.wordpress.org/trunk@46150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-30 15:44:59 +00:00
jorgefilipecosta b7fbf7d373 Block Editor: Backport block styles server functions from block editor.
This commit backports the block styles functionality added to the block editor in https://github.com/WordPress/gutenberg/pull/16356.

Props: youknowriad, aduth, swissspidy.
Fixes #48039.
Built from https://develop.svn.wordpress.org/trunk@46111


git-svn-id: http://core.svn.wordpress.org/trunk@45923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-14 18:21:54 +00:00