@@ -52,11 +52,11 @@ public static function discussion_settings() {
5252 }
5353
5454 /**
55- * Add Webmention meta boxes to the comment editor screen.
55+ * Add Webmention meta boxes to the omment editor screen.
5656 *
5757 * @param object $object The comment object.
5858 */
59- public static function meta_boxes ( $ object ) {
59+ public static function comment_metabox ( $ object ) {
6060 wp_nonce_field ( 'webmention_comment_metabox ' , 'webmention_comment_nonce ' );
6161
6262 if ( ! $ object instanceof WP_Comment ) {
@@ -65,6 +65,16 @@ public static function meta_boxes( $object ) {
6565 load_template ( __DIR__ . '/../templates/webmention-edit-comment-form.php ' );
6666 }
6767
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+
6878 /**
6979 * Add comment-type as column in WP-Admin
7080 *
@@ -162,11 +172,23 @@ public static function add_meta_boxes() {
162172 add_meta_box (
163173 'webmention-meta ' ,
164174 esc_html__ ( 'Webmention Data ' , 'webmention ' ),
165- array ( static ::class, 'meta_boxes ' ),
175+ array ( static ::class, 'comment_metabox ' ),
166176 'comment ' ,
167177 'normal ' ,
168178 'default '
169179 );
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+ );
170192 }
171193
172194 /**
0 commit comments