Skip to content

Commit ef3e59e

Browse files
committed
update name
1 parent a888261 commit ef3e59e

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'wp-components', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-i18n', 'wp-plugins'), 'version' => '33ab8e9f9fc4a91372c2');
1+
<?php return array('dependencies' => array('react', 'wp-components', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-i18n', 'wp-plugins'), 'version' => '03845d869ccb1b1eb23c');

build/editor-plugin/plugin.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

includes/class-block.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static function register_postmeta() {
2020
foreach ( $post_types as $post_type ) {
2121
\register_post_meta(
2222
$post_type,
23-
'webmentions_closed',
23+
'webmentions_disabled',
2424
array(
2525
'show_in_rest' => true,
2626
'single' => true,

includes/class-receiver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public static function post( $request ) {
242242

243243
// check if webmentions are allowed
244244
if ( ! webmentions_open( $comment_post_id ) ) {
245-
return new WP_Error( 'webmentions_closed', esc_html__( 'Webmentions are disabled for this post', 'webmention' ), array( 'status' => 400 ) );
245+
return new WP_Error( 'webmentions_disabled', esc_html__( 'Webmentions are disabled for this post', 'webmention' ), array( 'status' => 400 ) );
246246
}
247247

248248
$post = get_post( $comment_post_id );

includes/functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,8 @@ function webmentions_open( $post = null ) {
561561
// If the post type does not support Webmentions do not even check further.
562562
$open = false;
563563
} else {
564-
// If the webmentions_closed meta key exists then consider webmentions closed. Otherwise consider them open.
565-
$open = ! ( metadata_exists( 'post', $post_id, 'webmentions_closed' ) ); // Invert the result, as exists is closed and not exists is open.
564+
// If the webmentions_disabled meta key exists then consider webmentions closed. Otherwise consider them open.
565+
$open = ! ( metadata_exists( 'post', $post_id, 'webmentions_disabled' ) ); // Invert the result, as exists is closed and not exists is open.
566566
}
567567
}
568568

src/editor-plugin/plugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ const EditorPlugin = () => {
2222
__nextHasNoMarginBottom
2323
label={ __( 'Disable Webmentions', 'webmention' ) }
2424
help={ __( 'Do not accept incoming Webmentions for this post.', 'webmention' ) }
25-
checked={ meta.webmentions_closed }
25+
checked={ meta.webmentions_disabled }
2626
onChange={ ( value ) => {
27-
setMeta( { ...meta, webmentions_closed: value } );
27+
setMeta( { ...meta, webmentions_disabled: value } );
2828
} }
2929
/>
3030
</PluginDocumentSettingPanel>

webmention.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ function init() {
155155

156156
add_action( 'wp_enqueue_scripts', '\Webmention\enqueue_scripts' );
157157

158-
// remove the "webmentions_closed" meta value if the post is updated
158+
// remove the "webmentions_disabled" meta value if the post is updated
159159
\add_action(
160160
'updated_postmeta',
161161
function ( $meta_id, $object_id, $meta_key, $meta_value ) {
162-
if ( 'webmentions_closed' === $meta_key && empty( $meta_value ) ) {
163-
\delete_post_meta( $object_id, 'webmentions_closed' );
162+
if ( 'webmentions_disabled' === $meta_key && empty( $meta_value ) ) {
163+
\delete_post_meta( $object_id, 'webmentions_disabled' );
164164
}
165165
},
166166
10,

0 commit comments

Comments
 (0)