Skip to content

Commit 9c0884e

Browse files
committed
- update textdomain to be wpgraphql-acf to match slug for wordpress.org deploy
1 parent 51ba1cd commit 9c0884e

16 files changed

+165
-165
lines changed

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<file>./access-functions.php</file>
77
<file>./activation.php</file>
88
<file>./deactivation.php</file>
9-
<file>./wp-graphql-acf.php</file>
9+
<file>./wpgraphql-acf.php</file>
1010
<file>./src</file>
1111
<exclude-pattern>*/**/tests/</exclude-pattern>
1212
<exclude-pattern>*/node_modules/*</exclude-pattern>

phpstan.neon.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ parameters:
1111
bootstrapFiles:
1212
- vendor/php-stubs/acf-pro-stubs/acf-pro-stubs.php
1313
- phpstan/constants.php
14-
- wp-graphql-acf.php
14+
- wpgraphql-acf.php
1515
- access-functions.php
1616
- activation.php
1717
- deactivation.php
1818
paths:
19-
- wp-graphql-acf.php
19+
- wpgraphql-acf.php
2020
- access-functions.php
2121
- activation.php
2222
- deactivation.php

src/AcfGraphQLFieldType.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ public function get_admin_field_settings( array $field, Settings $settings ) {
104104
$default_admin_settings = [];
105105

106106
$default_admin_settings['show_in_graphql'] = [
107-
'label' => __( 'Show in GraphQL', 'wp-graphql-acf' ),
108-
'instructions' => __( 'Whether the field should be queryable via GraphQL. NOTE: Changing this to false for existing field can cause a breaking change to the GraphQL Schema. Proceed with caution.', 'wp-graphql-acf' ),
107+
'label' => __( 'Show in GraphQL', 'wpgraphql-acf' ),
108+
'instructions' => __( 'Whether the field should be queryable via GraphQL. NOTE: Changing this to false for existing field can cause a breaking change to the GraphQL Schema. Proceed with caution.', 'wpgraphql-acf' ),
109109
'name' => 'show_in_graphql',
110110
'type' => 'true_false',
111111
'ui' => 1,
@@ -115,13 +115,13 @@ public function get_admin_field_settings( array $field, Settings $settings ) {
115115
];
116116

117117
$default_admin_settings['graphql_description'] = [
118-
'label' => __( 'GraphQL Description', 'wp-graphql-acf' ),
119-
'instructions' => __( 'The description of the field, shown in the GraphQL Schema. Should not include any special characters.', 'wp-graphql-acf' ),
118+
'label' => __( 'GraphQL Description', 'wpgraphql-acf' ),
119+
'instructions' => __( 'The description of the field, shown in the GraphQL Schema. Should not include any special characters.', 'wpgraphql-acf' ),
120120
'name' => 'graphql_description',
121121
'type' => 'text',
122122
'ui' => true,
123123
'default_value' => null,
124-
'placeholder' => __( 'Explanation of how this field should be used in the GraphQL Schema', 'wp-graphql-acf' ),
124+
'placeholder' => __( 'Explanation of how this field should be used in the GraphQL Schema', 'wpgraphql-acf' ),
125125
'conditions' => [
126126
'field' => 'show_in_graphql',
127127
'operator' => '==',
@@ -130,14 +130,14 @@ public function get_admin_field_settings( array $field, Settings $settings ) {
130130
];
131131

132132
$default_admin_settings['graphql_field_name'] = [
133-
'label' => __( 'GraphQL Field Name', 'wp-graphql-acf' ),
134-
'instructions' => __( 'The name of the field in the GraphQL Schema. Should only contain numbers and letters. Must start with a letter. Recommended format is "snakeCase".', 'wp-graphql-acf' ),
133+
'label' => __( 'GraphQL Field Name', 'wpgraphql-acf' ),
134+
'instructions' => __( 'The name of the field in the GraphQL Schema. Should only contain numbers and letters. Must start with a letter. Recommended format is "snakeCase".', 'wpgraphql-acf' ),
135135
'name' => 'graphql_field_name',
136136
'type' => 'text',
137137
'ui' => true,
138138
'required' => false,
139139
// we don't allow underscores if the value is auto formatted
140-
'placeholder' => __( 'newFieldName', 'wp-graphql-acf' ),
140+
'placeholder' => __( 'newFieldName', 'wpgraphql-acf' ),
141141
'default_value' => '',
142142
'conditions' => [
143143
'field' => 'show_in_graphql',
@@ -147,8 +147,8 @@ public function get_admin_field_settings( array $field, Settings $settings ) {
147147
];
148148

149149
$default_admin_settings['graphql_non_null'] = [
150-
'label' => __( 'GraphQL Non-Null', 'wp-graphql-acf' ),
151-
'instructions' => __( 'Whether the field should be Non-Null in the GraphQL Schema. <br/><br/><strong>Use with caution.</strong> Only check this if you can guarantee there will be data stored for this field on all objects that have this field. i.e. the field should be required and should have data entered for all previous entries with this field. Unchecking this, if already checked, is considered a breaking change to the GraphQL Schema.', 'wp-graphql-acf' ),
150+
'label' => __( 'GraphQL Non-Null', 'wpgraphql-acf' ),
151+
'instructions' => __( 'Whether the field should be Non-Null in the GraphQL Schema. <br/><br/><strong>Use with caution.</strong> Only check this if you can guarantee there will be data stored for this field on all objects that have this field. i.e. the field should be required and should have data entered for all previous entries with this field. Unchecking this, if already checked, is considered a breaking change to the GraphQL Schema.', 'wpgraphql-acf' ),
152152
'name' => 'graphql_non_null',
153153
'type' => 'true_false',
154154
'ui' => 1,

src/Admin/OptionsPageRegistration.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function add_registration_fields( array $args, array $post ) : array {
6767
* @return array
6868
*/
6969
public function add_tabs( array $tabs ): array {
70-
$tabs['graphql'] = __( 'GraphQL', 'wp-graphql-acf' );
70+
$tabs['graphql'] = __( 'GraphQL', 'wpgraphql-acf' );
7171
return $tabs;
7272
}
7373

@@ -85,8 +85,8 @@ public function render_settings_tab( array $acf_ui_options_page ): void {
8585
'prefix' => 'acf_ui_options_page',
8686
'value' => isset( $acf_ui_options_page['show_in_graphql'] ) && true === (bool) $acf_ui_options_page['show_in_graphql'] ? 1 : 0,
8787
'ui' => true,
88-
'label' => __( 'Show in GraphQL', 'wp-graphql-acf' ),
89-
'instructions' => __( 'Whether to show the Post Type in the WPGraphQL Schema.', 'wp-graphql-acf' ),
88+
'label' => __( 'Show in GraphQL', 'wpgraphql-acf' ),
89+
'instructions' => __( 'Whether to show the Post Type in the WPGraphQL Schema.', 'wpgraphql-acf' ),
9090
'default' => false,
9191
]
9292
);
@@ -106,8 +106,8 @@ public function render_settings_tab( array $acf_ui_options_page ): void {
106106
'key' => 'graphql_type_name',
107107
'prefix' => 'acf_ui_options_page',
108108
'value' => $graphql_type_name,
109-
'label' => __( 'GraphQL Type Name', 'wp-graphql-acf' ),
110-
'instructions' => __( 'How the Options Page should be referenced in the GraphQL Schema.', 'wp-graphql-acf' ),
109+
'label' => __( 'GraphQL Type Name', 'wpgraphql-acf' ),
110+
'instructions' => __( 'How the Options Page should be referenced in the GraphQL Schema.', 'wpgraphql-acf' ),
111111
'default' => $graphql_type_name,
112112
'required' => 1,
113113
'conditions' => [
@@ -129,8 +129,8 @@ public function render_settings_tab( array $acf_ui_options_page ): void {
129129
* @return array
130130
*/
131131
public function add_graphql_type_column( array $columns ): array {
132-
$columns['show_in_graphql'] = __( 'Show in GraphQL', 'wp-graphql-acf' );
133-
$columns['graphql_type'] = __( 'GraphQL Type', 'wp-graphql-acf' );
132+
$columns['show_in_graphql'] = __( 'Show in GraphQL', 'wpgraphql-acf' );
133+
$columns['graphql_type'] = __( 'GraphQL Type', 'wpgraphql-acf' );
134134
return $columns;
135135
}
136136

src/Admin/PostTypeRegistration.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function init(): void {
4545
* @return array
4646
*/
4747
public function add_tabs( array $tabs ): array {
48-
$tabs['graphql'] = __( 'GraphQL', 'wp-graphql-acf' );
48+
$tabs['graphql'] = __( 'GraphQL', 'wpgraphql-acf' );
4949
return $tabs;
5050
}
5151

@@ -63,8 +63,8 @@ public function render_settings_tab( array $acf_post_type ): void {
6363
'prefix' => 'acf_post_type',
6464
'value' => isset( $acf_post_type['show_in_graphql'] ) && (bool) $acf_post_type['show_in_graphql'],
6565
'ui' => true,
66-
'label' => __( 'Show in GraphQL', 'wp-graphql-acf' ),
67-
'instructions' => __( 'Whether to show the Post Type in the WPGraphQL Schema.', 'wp-graphql-acf' ),
66+
'label' => __( 'Show in GraphQL', 'wpgraphql-acf' ),
67+
'instructions' => __( 'Whether to show the Post Type in the WPGraphQL Schema.', 'wpgraphql-acf' ),
6868
'default' => false,
6969
]
7070
);
@@ -84,8 +84,8 @@ public function render_settings_tab( array $acf_post_type ): void {
8484
'key' => 'graphql_single_name',
8585
'prefix' => 'acf_post_type',
8686
'value' => $graphql_single_name,
87-
'label' => __( 'GraphQL Single Name', 'wp-graphql-acf' ),
88-
'instructions' => __( 'How the type should be referenced in the GraphQL Schema.', 'wp-graphql-acf' ),
87+
'label' => __( 'GraphQL Single Name', 'wpgraphql-acf' ),
88+
'instructions' => __( 'How the type should be referenced in the GraphQL Schema.', 'wpgraphql-acf' ),
8989
'default' => $graphql_single_name,
9090
'required' => 1,
9191
'conditions' => [
@@ -113,8 +113,8 @@ public function render_settings_tab( array $acf_post_type ): void {
113113
'key' => 'graphql_plural_name',
114114
'prefix' => 'acf_post_type',
115115
'value' => $graphql_plural_name,
116-
'label' => __( 'GraphQL Plural Name', 'wp-graphql-acf' ),
117-
'instructions' => __( 'How the type should be referenced in the GraphQL Schema.', 'wp-graphql-acf' ),
116+
'label' => __( 'GraphQL Plural Name', 'wpgraphql-acf' ),
117+
'instructions' => __( 'How the type should be referenced in the GraphQL Schema.', 'wpgraphql-acf' ),
118118
'default' => $graphql_plural_name,
119119
'required' => 1,
120120
'conditions' => [
@@ -205,8 +205,8 @@ public function enqueue_admin_scripts( string $screen ): void {
205205
* @return array
206206
*/
207207
public function add_graphql_type_column( array $columns ): array {
208-
$columns['show_in_graphql'] = __( 'Show in GraphQL', 'wp-graphql-acf' );
209-
$columns['graphql_type'] = __( 'GraphQL Type', 'wp-graphql-acf' );
208+
$columns['show_in_graphql'] = __( 'Show in GraphQL', 'wpgraphql-acf' );
209+
$columns['graphql_type'] = __( 'GraphQL Type', 'wpgraphql-acf' );
210210
return $columns;
211211
}
212212

src/Admin/Settings.php

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function init(): void {
5555
add_filter(
5656
'acf/field_group/additional_field_settings_tabs',
5757
static function ( $tabs ) {
58-
$tabs['graphql'] = __( 'GraphQL', 'wp-graphql-acf' );
58+
$tabs['graphql'] = __( 'GraphQL', 'wpgraphql-acf' );
5959
return $tabs;
6060
}
6161
);
@@ -78,7 +78,7 @@ static function ( $tabs ) {
7878
add_filter(
7979
'acf/field_group/additional_group_settings_tabs',
8080
static function ( $tabs ) {
81-
$tabs['graphql'] = __( 'GraphQL', 'wp-graphql-acf' );
81+
$tabs['graphql'] = __( 'GraphQL', 'wpgraphql-acf' );
8282

8383
return $tabs;
8484
}
@@ -144,7 +144,7 @@ function ( $acf_field ) use ( $field_type ) {
144144
*/
145145
public function graphql_types_ajax_callback(): void {
146146
if ( ! isset( $_POST['data'] ) ) {
147-
echo esc_html( __( 'No location rules were found', 'wp-graphql-acf' ) );
147+
echo esc_html( __( 'No location rules were found', 'wpgraphql-acf' ) );
148148

149149
/** @noinspection ForgottenDebugOutputInspection */
150150
wp_die();
@@ -156,7 +156,7 @@ public function graphql_types_ajax_callback(): void {
156156
parse_str( $sanitized_post_data, $form_data );
157157

158158
if ( empty( $form_data ) || ! isset( $form_data['acf_field_group'] ) ) {
159-
wp_send_json( __( 'No form data.', 'wp-graphql-acf' ) );
159+
wp_send_json( __( 'No form data.', 'wpgraphql-acf' ) );
160160
}
161161

162162
if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'wp_graphql_acf' ) ) {
@@ -190,7 +190,7 @@ public function graphql_types_ajax_callback(): void {
190190
public function register_meta_boxes(): void {
191191
add_meta_box(
192192
'wp-graphql-acf-meta-box',
193-
__( 'GraphQL', 'wp-graphql-acf' ),
193+
__( 'GraphQL', 'wpgraphql-acf' ),
194194
[
195195
$this,
196196
'display_graphql_field_group_fields',
@@ -217,8 +217,8 @@ public function display_graphql_field_group_fields( $field_group ): void {
217217
// Render a field in the Field Group settings to allow for a Field Group to be shown in GraphQL.
218218
acf_render_field_wrap(
219219
[
220-
'label' => __( 'Show in GraphQL', 'wp-graphql-acf' ),
221-
'instructions' => __( 'If the field group is active, and this is set to show, the fields in this group will be available in the WPGraphQL Schema based on the respective Location rules. NOTE: Changing a field "show_in_graphql" to "false" could create breaking changes for client applications already querying for this field group.', 'wp-graphql-acf' ),
220+
'label' => __( 'Show in GraphQL', 'wpgraphql-acf' ),
221+
'instructions' => __( 'If the field group is active, and this is set to show, the fields in this group will be available in the WPGraphQL Schema based on the respective Location rules. NOTE: Changing a field "show_in_graphql" to "false" could create breaking changes for client applications already querying for this field group.', 'wpgraphql-acf' ),
222222
'type' => 'true_false',
223223
'name' => 'show_in_graphql',
224224
'prefix' => 'acf_field_group',
@@ -233,13 +233,13 @@ public function display_graphql_field_group_fields( $field_group ): void {
233233
// Render a field in the Field Group settings to set the GraphQL field name for the field group.
234234
acf_render_field_wrap(
235235
[
236-
'label' => __( 'GraphQL Type Name', 'wp-graphql-acf' ),
237-
'instructions' => __( 'The GraphQL Type name representing the field group in the GraphQL Schema. Must start with a letter. Can only contain Letters, Numbers and underscores. Best practice is to use "PascalCase" for GraphQL Types.', 'wp-graphql-acf' ),
236+
'label' => __( 'GraphQL Type Name', 'wpgraphql-acf' ),
237+
'instructions' => __( 'The GraphQL Type name representing the field group in the GraphQL Schema. Must start with a letter. Can only contain Letters, Numbers and underscores. Best practice is to use "PascalCase" for GraphQL Types.', 'wpgraphql-acf' ),
238238
'type' => 'text',
239239
'prefix' => 'acf_field_group',
240240
'name' => 'graphql_field_name',
241241
'required' => isset( $field_group['show_in_graphql'] ) && $field_group['show_in_graphql'],
242-
'placeholder' => __( 'FieldGroupTypeName', 'wp-graphql-acf' ),
242+
'placeholder' => __( 'FieldGroupTypeName', 'wpgraphql-acf' ),
243243
'value' => ! empty( $field_group['graphql_field_name'] ) ? $field_group['graphql_field_name'] : '',
244244
],
245245
'div',
@@ -249,8 +249,8 @@ public function display_graphql_field_group_fields( $field_group ): void {
249249

250250
acf_render_field_wrap(
251251
[
252-
'label' => __( 'Manually Set GraphQL Types for Field Group', 'wp-graphql-acf' ),
253-
'instructions' => __( 'By default, ACF Field groups are added to the GraphQL Schema based on the field group\'s location rules. Checking this box will let you manually control the GraphQL Types the field group should be shown on in the GraphQL Schema using the checkboxes below, and the Location Rules will no longer effect the GraphQL Types.', 'wp-graphql-acf' ),
252+
'label' => __( 'Manually Set GraphQL Types for Field Group', 'wpgraphql-acf' ),
253+
'instructions' => __( 'By default, ACF Field groups are added to the GraphQL Schema based on the field group\'s location rules. Checking this box will let you manually control the GraphQL Types the field group should be shown on in the GraphQL Schema using the checkboxes below, and the Location Rules will no longer effect the GraphQL Types.', 'wpgraphql-acf' ),
254254
'type' => 'true_false',
255255
'name' => 'map_graphql_types_from_location_rules',
256256
'prefix' => 'acf_field_group',
@@ -266,8 +266,8 @@ public function display_graphql_field_group_fields( $field_group ): void {
266266

267267
acf_render_field_wrap(
268268
[
269-
'label' => __( 'GraphQL Types to Show the Field Group On', 'wp-graphql-acf' ),
270-
'instructions' => __( 'Select the Types in the WPGraphQL Schema to show the fields in this field group on', 'wp-graphql-acf' ),
269+
'label' => __( 'GraphQL Types to Show the Field Group On', 'wpgraphql-acf' ),
270+
'instructions' => __( 'Select the Types in the WPGraphQL Schema to show the fields in this field group on', 'wpgraphql-acf' ),
271271
'type' => 'checkbox',
272272
'prefix' => 'acf_field_group',
273273
'name' => 'graphql_types',
@@ -286,9 +286,9 @@ public function display_graphql_field_group_fields( $field_group ): void {
286286

287287
acf_render_field_wrap(
288288
[
289-
'label' => __( 'GraphQL Interfaces', 'wp-graphql-acf' ),
289+
'label' => __( 'GraphQL Interfaces', 'wpgraphql-acf' ),
290290
// translators: %s is the GraphQL Type Name representing an ACF Field Group in the GraphQL Schema
291-
'instructions' => sprintf( __( "These are the GraphQL Interfaces implemented by the '%s' GraphQL Type", 'wp-graphql-acf' ), $field_group_type_name ),
291+
'instructions' => sprintf( __( "These are the GraphQL Interfaces implemented by the '%s' GraphQL Type", 'wpgraphql-acf' ), $field_group_type_name ),
292292
'type' => 'message',
293293
'name' => 'graphql_interfaces',
294294
'prefix' => 'acf_field_group',
@@ -344,9 +344,9 @@ public function add_field_settings( array $field, ?string $field_type = null ):
344344
$admin_field_settings = [
345345
'not_supported' => [
346346
'type' => 'message',
347-
'label' => __( 'Not supported in the GraphQL Schema', 'wp-graphql-acf' ),
347+
'label' => __( 'Not supported in the GraphQL Schema', 'wpgraphql-acf' ),
348348
// translators: %s is the name of the ACF Field Type
349-
'instructions' => sprintf( __( 'The "%s" Field Type is not set up to map to the GraphQL Schema. If you want to query this field type in the Schema, visit our guide for <a href="" target="_blank" rel="nofollow">adding GraphQL support for additional ACF field types</a>.', 'wp-graphql-acf' ), $field_type ),
349+
'instructions' => sprintf( __( 'The "%s" Field Type is not set up to map to the GraphQL Schema. If you want to query this field type in the Schema, visit our guide for <a href="" target="_blank" rel="nofollow">adding GraphQL support for additional ACF field types</a>.', 'wpgraphql-acf' ), $field_type ),
350350
'conditions' => [],
351351
],
352352
];
@@ -389,8 +389,8 @@ public function add_field_settings( array $field, ?string $field_type = null ):
389389
public function get_graphql_resolve_type_field_config( array $override = [] ): array {
390390
return array_merge(
391391
[
392-
'label' => __( 'GraphQL Resolve Type', 'wp-graphql-acf' ),
393-
'instructions' => __( 'The GraphQL Type the field will show in the Schema as and resolve to.', 'wp-graphql-acf' ),
392+
'label' => __( 'GraphQL Resolve Type', 'wpgraphql-acf' ),
393+
'instructions' => __( 'The GraphQL Type the field will show in the Schema as and resolve to.', 'wpgraphql-acf' ),
394394
'name' => 'graphql_resolve_type',
395395
'key' => 'graphql_resolve_type',
396396
'type' => 'select',
@@ -465,17 +465,17 @@ public function wpgraphql_admin_table_column_headers( array $_columns ): array {
465465
$columns[ $name ] = $value;
466466
// After the location column, add the wpgraphql specific columns
467467
if ( 'acf-location' === $name ) {
468-
$columns['acf-wpgraphql-type'] = __( 'GraphQL Type', 'wp-graphql-acf' );
469-
$columns['acf-wpgraphql-interfaces'] = __( 'GraphQL Interfaces', 'wp-graphql-acf' );
470-
$columns['acf-wpgraphql-locations'] = __( 'GraphQL Locations', 'wp-graphql-acf' );
468+
$columns['acf-wpgraphql-type'] = __( 'GraphQL Type', 'wpgraphql-acf' );
469+
$columns['acf-wpgraphql-interfaces'] = __( 'GraphQL Interfaces', 'wpgraphql-acf' );
470+
$columns['acf-wpgraphql-locations'] = __( 'GraphQL Locations', 'wpgraphql-acf' );
471471
$is_added = true;
472472
}
473473
}
474474
// If not added after the specific column, add to the end of the list
475475
if ( ! $is_added ) {
476-
$columns['acf-wpgraphql-type'] = __( 'GraphQL Type', 'wp-graphql-acf' );
477-
$columns['acf-wpgraphql-interfaces'] = __( 'GraphQL Interfaces', 'wp-graphql-acf' );
478-
$columns['acf-wpgraphql-locations'] = __( 'GraphQL Locations', 'wp-graphql-acf' );
476+
$columns['acf-wpgraphql-type'] = __( 'GraphQL Type', 'wpgraphql-acf' );
477+
$columns['acf-wpgraphql-interfaces'] = __( 'GraphQL Interfaces', 'wpgraphql-acf' );
478+
$columns['acf-wpgraphql-locations'] = __( 'GraphQL Locations', 'wpgraphql-acf' );
479479
}
480480

481481
return $columns;

0 commit comments

Comments
 (0)