Skip to content

Commit

Permalink
Address issue markjaquith#59 - CWS_WP_Help_Plugin::api_slurp() never …
Browse files Browse the repository at this point in the history
…registers the wp-help post type
  • Loading branch information
jibbius committed Sep 17, 2020
1 parent 89cbbf8 commit 822d95a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,10 @@ public function api_slurp() {
return;
$result = wp_remote_get( add_query_arg( 'time', time(), $this->get_option( 'slurp_url' ) ) );
if ( $result['response']['code'] == 200 ) {

// Ensure that our post type is registered prior to any operations that might get executed downstream
$this->register_post_type();

$topics = new WP_Query( array( 'post_type' => self::POST_TYPE, 'posts_per_page' => -1, 'post_status' => 'publish' ) );
$source_id_to_local_id = array();
if ( $topics->posts ) {
Expand Down

0 comments on commit 822d95a

Please sign in to comment.