Hi @ozthegreat,
it just needs to small amendments. Just got it working (for pages and cpt ‘event’). In class-mscp-admin.php
line 85
$post_id = isset( $_GET[ ‘post’ ] ) ? absint( $_GET[ ‘post’ ] ) : false;
change to
$post_id = null !==( $_GET[ ‘post’ ] || $_GET[ ‘page’ ] || $_GET[ ‘event’ ] ) ? absint( $_GET[ ‘post’ ] || $_GET[ ‘page’ ] || $_GET[ ‘event’ ] ) : false;
and then
line 131
public function register_meta_boxes() {
add_meta_box(
‘multisite-crossposter’,
__( ‘Multisite Crossposter’, ‘multisite-crossposter’ ),
array( $this, ‘mscp_meta_box_callback’ ),
‘post’,
‘side’,
‘low’,
null
);
}
change to
public function register_meta_boxes() {
add_meta_box(
‘multisite-crossposter’,
__( ‘Multisite Crossposter’, ‘multisite-crossposter’ ),
array( $this, ‘mscp_meta_box_callback’ ),
array(‘post’, ‘event’, ‘page’),
‘side’,
‘low’,
null
);
}
Then the metabox shows up in pages and cpt event. It works right out of the box! ??
-
This reply was modified 7 years, 8 months ago by cinematic.