-
Notifications
You must be signed in to change notification settings - Fork 200
Feat/add role user access controls #749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
613527a
1ca4935
013f157
c1f6160
c134007
a0da3db
1e6c0ae
4832b12
bd2ba2a
615d44b
25ba583
7f28d57
3f11239
d6ad4d7
c37c5bb
e26725c
993bb99
f1e5478
51fa6bf
30bf0fd
e995019
40df60f
e94080d
e5c207c
2c1f94d
bd767b6
a84fb1a
de1d92c
1249daf
2359164
c391e6b
6aec265
0246755
45a14d3
55b2b1b
cb3fbda
3dcf3ac
e052399
08e1d30
a603c6c
ade4fec
831ea51
08d2caf
4ec1a4f
8f8eab9
2b786d1
e51cd85
6062b1f
5841ce5
ad722d6
bedff1a
72b03ec
b8205a5
b0e10f8
0fa70ce
f63e445
6d4f76b
f08df20
d3312b2
7f2ab27
cf0e6ef
d64e926
048c2a2
5af7b77
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| * @package WordPress\AI | ||
| */ | ||
|
|
||
| declare( strict_types=1 ); | ||
| declare(strict_types=1); | ||
|
|
||
| namespace WordPress\AI\Experiments\Meta_Description; | ||
|
|
||
|
|
@@ -31,6 +31,7 @@ | |
| */ | ||
| class Meta_Description extends Abstract_Feature { | ||
|
|
||
|
|
||
| /** | ||
| * {@inheritDoc} | ||
| */ | ||
|
|
@@ -54,13 +55,22 @@ protected function load_metadata(): array { | |
| * | ||
| * @since 0.7.0 | ||
| */ | ||
| public function register(): void { | ||
| protected function register_feature(): void { | ||
| add_action( 'wp_abilities_api_init', array( $this, 'register_abilities' ) ); | ||
| add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) ); | ||
| add_action( 'deactivated_plugin', array( $this, 'clear_active_plugin_cache' ) ); | ||
| } | ||
|
|
||
| $this->maybe_output_meta_description(); | ||
| /** | ||
| * {@inheritDoc} | ||
| * | ||
| * Registers post meta, the deactivated_plugin cache hook, and frontend meta description output. | ||
| * | ||
| * @since x.x.x | ||
| */ | ||
| protected function register_infrastructure(): void { | ||
| $this->register_post_meta(); | ||
| $this->maybe_output_meta_description(); | ||
| add_action( 'deactivated_plugin', array( $this, 'clear_active_plugin_cache' ) ); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we want to run |
||
| } | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| * @package WordPress\AI | ||
| */ | ||
|
|
||
| declare( strict_types=1 ); | ||
| declare(strict_types=1); | ||
|
|
||
| namespace WordPress\AI\Experiments\Summarization; | ||
|
|
||
|
|
@@ -69,11 +69,9 @@ protected function load_metadata(): array { | |
| /** | ||
| * {@inheritDoc} | ||
| */ | ||
| public function register(): void { | ||
| $this->register_post_meta(); | ||
| protected function register_feature(): void { | ||
| add_action( 'wp_abilities_api_init', array( $this, 'register_abilities' ) ); | ||
| add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_assets' ), 5 ); | ||
| add_action( 'enqueue_block_assets', array( $this, 'enqueue_block_assets' ) ); | ||
|
|
||
| add_action( 'load-edit.php', array( $this, 'register_bulk_action_hooks_for_screen' ) ); | ||
| add_action( 'admin_enqueue_scripts', array( $this, 'maybe_enqueue_bulk_assets' ) ); | ||
|
|
@@ -121,6 +119,18 @@ public function register_bulk_action_hooks_for_screen(): void { | |
| add_filter( "handle_bulk_actions-edit-{$post_type}", array( $this, 'handle_bulk_action' ), 10, 3 ); | ||
| } | ||
|
|
||
| /** | ||
| * {@inheritDoc} | ||
| * | ||
| * Registers post meta. | ||
| * | ||
| * @since x.x.x | ||
| */ | ||
| protected function register_infrastructure(): void { | ||
| add_action( 'enqueue_block_assets', array( $this, 'enqueue_block_assets' ) ); | ||
| $this->register_post_meta(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
||
| } | ||
|
|
||
| /** | ||
| * Register any needed post meta. | ||
| * | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for these spacing changes? I'm assuming just some automated linting but would keep diffs cleaner to revert that