Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Use the configured push post type in the NPR Story API meta box, defa… #41

Merged
merged 1 commit into from Apr 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions ds-npr-api.php
Expand Up @@ -159,14 +159,15 @@ function nprstory_create_post_type() {

function nprstory_add_meta_boxes() {
$screen = get_current_screen();
$push_post_type = get_option( 'ds_npr_push_post_type' ) ?: 'post';
$push_url = get_option( 'ds_npr_api_push_url' );
if ( $screen->id == 'post' && ! empty( $push_url ) ) {
if ( $screen->id == $push_post_type && ! empty( $push_url ) ) {
global $post;
add_meta_box(
'ds_npr_document_meta',
'NPR Story API',
'nprstory_publish_meta_box',
'post', 'side'
$push_post_type, 'side'
);
}
}
Expand Down