I think what is missing in your code is the “add_action” call for your plugin init function, so all gets instantiated correctly within wp_json_server_before_serve hook. Should be something like this (note the last line):
function quizno_api_init($server)
{
global $quizno_api_quiz;
$quizno_api_quiz = new QN_API_Quiz($server);
$quizno_api_quiz->register_filters();
}
add_action( 'wp_json_server_before_serve', 'quizno_api_init' );
Related Posts:
- Adding a Taxonomy Filter to Admin List for a Custom Post Type?
- Redesigning Custom Post Type “Add New” page
- How to get a variable number of posts per post type on the main loop?
- How Do I Use The WordPress Plugin Posts 2 Posts by Scribu?
- Getting Custom Post Type content from main-site of a Multisite
- WordPress wp-json API – Custom Post Type returns 403
- Custom database or Custom Post Types?
- Custom comment type maybe?
- Prevent page slug from interfering with custom post type archive permalink?
- Add .html extension to custom post type taxonomies
- How to load a new template page according to a particular URL?
- Twillio How To Send SMS for Custom Post Type
- How to get the custom page get_permalink?
- Themes VS Plugins [duplicate]
- Enable comments for post with comments meta box removed
- Custom Post Type causes Page Not Found
- Plugin “Meta Box”: Implementing meta boxes in custom post type
- Plugin allowing for artists, events and venues
- Disable Other Plugins on my Custom Post Type?
- How to get images from EDD post?
- custom taxonomy and custom post type url conflict
- How to retrieve custom meta term of category taxonomy from WP Rest API?
- RW Meta Box ,Problem setting post title
- Saving Custom Post types and fields to a custom table
- Building a store locator with google maps
- How to create user groups and allow custom posts and plugin modify/access to specific group?
- How can I create a custom shortcode that will return a custom post type by ID?
- get_post_type() and WP_QUERY issue
- get_post_type on post.php
- All of my custom posttypes are 404’ing
- ‘No Results Found’ on single post for custom post type
- Keep a post copy when this one is updated – issue
- Making a Template for a CPT created by a plugin
- how to add a button next to the wordpress view button?
- “Custom Post Type Permalinks” plugin URL strcuture
- Adding CSS to custom post type admin page causes error
- Redirect to another page using contact form 7? [closed]
- How can I list all installed plugins/themes/versions from CLI/API?
- Custom Post Type Fields
- Custom setup of wordpress comments that are displayed
- publish_post action doesn’t work
- Disable Individual Plugins (specifically in Custom Post Types) on a per-post basis?
- custom post type don’t appear in the home page
- Sticky option for custom post types without using custom fields or plugins
- How to create WordPress custom end point with multiple parameters?
- How do we update a custom file upload field with the Advanced Custom Field plugin?
- Preview with Custom Post Type Not Working
- How can I store data from custom fields to custom tables?
- 2 wordpress site same database
- How to Include Custom Post Content From Plugin
- Custom post type change excerpt more and excerpt length
- What hook can I use to modify custom post data before it is displayed on the page?
- Order posts of a custom post type by the event date using FT Calendar Plugin
- Creating teams of users in WordPress
- Custom Post Type template for homepage
- hardcoded wp pages/plugins problems
- How display specific category post to specific users?
- Best method of implementing compartmentalized custom post types on a multi-site network
- Need to edit author permissions | custom taxonomy
- Is it possible to pin a post in second position from top
- How to search post titles with whole words only, but not the exact word only?
- Save log for imports in WordPress database – options-table, custom post type or other place?
- Remove custom taxonomy name from the slug – Custom Post Type UI
- How to display emails as a post?
- Error in Fetching Custom Post Type parent Category URL (slug)
- Register PODS Custom Field with WPGraphQL [closed]
- Hidden permalink different from displayed permalink
- Adding custom post category to categories widget
- Custom Post Type with Sequence ID
- Escape commas in REST API
- How to arrange custom posts in the backend/admin by custom taxonomy
- Adding LOAD MORE on a page
- custom post type get_posts() function not work
- Create multiple posts when a custom post is created
- how to convert frontpage.php to dynamic page?
- Cannot view Custom Post Type no matter what I try
- Creating custom “player-objects”
- Hide some portion on single.php base on author
- Displaying image from a repeatable group
- CPT-onomies CPT_TAXONOMY->get_terms extremely slow with 6K posts
- get recent 12 days post then random in wordpress
- Custom Post type plugin breaking the front page shows dashboard?
- What method should I use for a sidebar widget that reads latest posts?
- How can i do custom author list?
- How to list the categories by custom taxonomy created?
- Is a custom post type considred a plugin?
- How to laod wp_enqueue_style to another header i created my self
- Looking for a plugins for organization portal (Staff, Units, Departments)? [closed]
- Filter custom post type returned from REST api
- Wrong block appender button showing
- Select posts from list and add them in a new list
- jet engine listing for every single taxonomy in post type [closed]
- Failed to update a post when I add a taxonomy to it
- i need to resive data external api and show user
- How to add CPT in Elementor pro search template
- Remove H1 title in admin post edit screen
- How to include Font Awesome icons into ‘menu_icon’ from register_post_type() function – wp admin?
- PHP Fatal error: Cannot redeclare distance() when making a new block
- Load a custom post type template.html from a plugin
- How to make a page setting translatable in theme?