Skip to content

Commit 086ba09

Browse files
added post and pages abilities
1 parent e12ddb3 commit 086ba09

6 files changed

Lines changed: 1179 additions & 4 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,4 @@ volumes:
146146
networks:
147147
# Creating our own network allows us to connect between containers using their service name.
148148
wpdevnet:
149-
driver: bridge
149+
driver: bridge

src/wp-includes/abilities-api/class-wp-abilities-registry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ final class WP_Abilities_Registry {
7878
* @return WP_Ability|null The registered ability instance on success, null on failure.
7979
*/
8080
public function register( string $name, array $args ): ?WP_Ability {
81-
if ( ! preg_match( '/^[a-z0-9-]+\/[a-z0-9-]+$/', $name ) ) {
81+
if ( ! preg_match( '/^[a-z0-9-]+(\/[a-z0-9-]+)+$/', $name ) ) {
8282
_doing_it_wrong(
8383
__METHOD__,
8484
__(

0 commit comments

Comments
 (0)