[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog

oik_register_class() – Register custom post type: oik_class

You appear to be a bot. Output may be restricted

Description

Register custom post type: oik_class

Class hierarchy is implemented using the parent field Metadata fields: _oik_class_name – the class name _oik_api_plugin – noderef to oik-plugins _oik_api_source – file where the class is defined

Usage

oik_register_class();

Parameters

Returns

void

Source

File name: oik-shortcodes/oik-shortcodes.php
Lines:
1 to 26 of 26
function oik_register_class() {
  $post_type = 'oik_class';
  $post_type_args = array();
  $post_type_args['label'] = 'Classes';
  $post_type_args['singular_label'] = 'Class';
  $post_type_args['description'] = 'Classes';
  $post_type_args['has_archive'] = true;
  $post_type_args['hierarchical'] = true; 
  $post_type_args['show_in_rest'] = true;
  $post_type_args['supports'] = array( 'title', 'editor', 'revisions', 'author' );
  bw_register_post_type( $post_type, $post_type_args );
  add_post_type_support( $post_type, 'page-attributes' );
  
  bw_register_field( "_oik_class_name", "text", "Class name" , array( "#length" => 80 ));
  bw_register_field( "_oik_api_plugin", "noderef", "Plugin ref", array( "#type" => array( "oik-plugins", "oik-themes" ) )); 
  bw_register_field( "_oik_api_source", "text", "Sourcefile" , array( "#length" => 80 ));
  
  bw_register_field_for_object_type( "_oik_class_name", $post_type );
  bw_register_field_for_object_type( "_oik_api_plugin", $post_type );
  bw_register_field_for_object_type( "_component_version", $post_type );
  bw_register_field_for_object_type( "_oik_api_source", $post_type );
  bw_register_field_for_object_type( "_oik_fileref", $post_type );
  if ( function_exists( "oikp_columns_and_titles" ) ) {
    oikp_columns_and_titles( $post_type );
  }    
} 
 
 View on GitHub

Published: March 11, 2017 | Last updated: March 11, 2017

Information

Function name: oik_register_class
Plugin ref: oik block shortcode and API server
Version: 1.41.1
Sourcefile: oik-shortcodes.php
File ref: oik-shortcodes.php
Deprecated?: No
API Letters: C,O,R

Recent plugin updates

oik v4.7.2 oik v4.7.2 includes a fix to the logic to render blocks for Content and Excerpts in the bw_pages shortcode. ...
oik v4.7.1 Upgrade to oik v4.7.1 for bw_pages rendering blocks for Content and Excerpts, and support for post_name attribute for shortcode which query posts ...
oik-shortcodes v1.41.1 Upgrade to oik-shortcodes v1.41.1 for a couple of minor changes. ...
oik-bob-bing-wide v2.2.2 Upgrade to oik-bob-bing-wide v2.2.2 for improvements to bw_dash examples and fixes to some SVG icon's visibility. ...
oik-bwtrace v3.3.1 Upgrade to oik-bwtrace v3.3.1 to measure plugin load times and ad hoc action timing points. ...

Plugins

  • All Plugins
  • oik base plugin
  • FREE oik plugins
  • WordPress plugins
  • Premium oik plugins

Themes

  • FREE themes
  • Bespoke themes
  • Premium themes

Blocks

  • All Blocks
  • Block examples
  • About Blocks

Shortcodes

  • All Shortcodes
  • Shortcode examples
  • About Shortcodes

Reference

  • About APIs
  • All APIs
  • All Classes
  • All Files
  • All Hooks

Support

  • Contact
  • Cookies policy
  • Get API key
  • Privacy
  • Request support
  • Sitemap
  • Stay informed
  • Terms and Conditions
oik-plugins
Email: [email protected]

Weight shipping plugins

Find out which cart weight shipping plugin you need for your WooCommerce site.
Which cart weight based plugin do I need?

Site:  www.oik-plugins.com
© Copyright oik-plugins 2011-2022. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress and oik-plugins
WordPress 6.0.1. PHP: 7.4.30. Memory limit: 768M