Oops! That page can’t be found.
It looks like nothing was found at this location. Maybe try a search?
// REGISTER JMA WITH DISTRIBUTOR (CONSOLIDATED) /** * 1. Force JMA Post Types into the REST API */ add_filter( 'register_post_type_args', 'pmc_force_jma_rest_support', 9999, 2 ); function pmc_force_jma_rest_support( $args, $post_type ) { $jma_types = [ 'wcdp_designs', 'wcdp-cliparts', 'wcdp-parameters', 'wcdp-calendars' ]; if ( in_array( $post_type, $jma_types ) ) { $args['show_in_rest'] = true; $args['public'] = true; $args['publicly_queryable'] = true; $args['show_ui'] = true; // Forces a clean URL: /wp-json/wp/v2/wcdp-designs $args['rest_base'] = str_replace( '_', '-', $post_type ); } return $args; } /** * 2. Force JMA Taxonomies into the REST API */ add_filter( 'register_taxonomy_args', 'pmc_force_jma_tax_rest_support', 9999, 2 ); function pmc_force_jma_tax_rest_support( $args, $taxonomy ) { if ( 'wcdp-design-cat' === $taxonomy ) { $args['show_in_rest'] = true; } return $args; } /** * 3. Whitelist JMA types for the Distributor Plugin UI */ add_filter( 'dt_distributable_post_types', function( $post_types ) { $jma_types = [ 'wcdp_designs', 'wcdp-cliparts', 'wcdp-parameters', 'wcdp-calendars' ]; return array_merge( $post_types, $jma_types ); }, 999 ); // END REGISTER JMA WITH DISTRIBUTOR
It looks like nothing was found at this location. Maybe try a search?