@@ -52,11 +52,11 @@ public static function discussion_settings() {
52
52
}
53
53
54
54
/**
55
- * Add Webmention meta boxes to the comment editor screen.
55
+ * Add Webmention meta boxes to the omment editor screen.
56
56
*
57
57
* @param object $object The comment object.
58
58
*/
59
- public static function meta_boxes ( $ object ) {
59
+ public static function comment_metabox ( $ object ) {
60
60
wp_nonce_field ( 'webmention_comment_metabox ' , 'webmention_comment_nonce ' );
61
61
62
62
if ( ! $ object instanceof WP_Comment ) {
@@ -65,6 +65,16 @@ public static function meta_boxes( $object ) {
65
65
load_template ( __DIR__ . '/../templates/webmention-edit-comment-form.php ' );
66
66
}
67
67
68
+ /**
69
+ * Add Webmention settings meta box to the Classic editor screen.
70
+ *
71
+ * @param object $object The comment object.
72
+ */
73
+ public static function post_metabox ( $ object ) {
74
+ wp_nonce_field ( 'webmention_post_metabox ' , 'webmention_post_nonce ' );
75
+ load_template ( __DIR__ . '/../templates/webmention-edit-post-form.php ' );
76
+ }
77
+
68
78
/**
69
79
* Add comment-type as column in WP-Admin
70
80
*
@@ -162,11 +172,23 @@ public static function add_meta_boxes() {
162
172
add_meta_box (
163
173
'webmention-meta ' ,
164
174
esc_html__ ( 'Webmention Data ' , 'webmention ' ),
165
- array ( static ::class, 'meta_boxes ' ),
175
+ array ( static ::class, 'comment_metabox ' ),
166
176
'comment ' ,
167
177
'normal ' ,
168
178
'default '
169
179
);
180
+ add_meta_box (
181
+ 'webmention-meta ' ,
182
+ esc_html__ ( 'Webmention Settings ' , 'webmention ' ),
183
+ array ( static ::class, 'post_metabox ' ),
184
+ get_option ( 'webmention_support_post_types ' , array ( 'post ' , 'page ' ) ),
185
+ 'side ' ,
186
+ 'default ' ,
187
+ array (
188
+ '__block_editor_compatible_meta_box ' => true ,
189
+ '__back_compat_meta_box ' => true , // This should only be used in the Classic Editor.
190
+ )
191
+ );
170
192
}
171
193
172
194
/**
0 commit comments