[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_types_register_post_type_args() – Implement "register_post_type_args" filter for oik-types

Description

Implement "register_post_type_args" filter for oik-types

The register_post_type_args filter was introduced in WordPress 4.4. If the site is 4.4 or higher then this gets invoked for each post type being registered. So we can update the registration earlier rather than later.

Usage

$array = oik_types_register_post_type_args( $args, $post_type );

Parameters

$args
( array ) required – post type args
$post_type
( string ) required – the post type being registered

Returns

array updated post type args array

Source

File name: oik-types/oik-types.php
Lines:
1 to 18 of 18
function oik_types_register_post_type_args( $args, $post_type ) {
  //bw_backtrace();
  static $bw_types = null;
  if ( !$bw_types ) {
    $bw_types = get_option( "bw_types" );
    //bw_trace2( $bw_types, "bw_types", true, BW_TRACE_DEBUG );
  }
  if ( $bw_types ) { // && is_array( $bw_types) && count( $bw_types ) )
    $oik_types_override = bw_array_get( $bw_types, $post_type, null );
    if ( $oik_types_override ) {
      $override_args = oikcpt_adjust_args( $oik_types_override['args'], false, $args );
      //bw_trace2( $override_args, "override_args", true, BW_TRACE_VERBOSE );
      $args = array_merge( $args, $override_args );
      //bw_trace2( $args, "args", false, BW_TRACE_VERBOSE);
    }
  }  
  return( $args );
}
 
 View on GitHub

Called by

    Invoked by

    1 to 1 of 1
    • register_post_type_args – filter

    Calls

    1 to 3 of 3
    • bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
    • bw_trace2() – Trace $value to the trace log file if tracing is active
    • oikcpt_adjust_args() – Set the required values for the $args to register_post_type()

    Call hooks

    Function name: oik_types_register_post_type_args
    Plugin ref: oik-types
    Version: 2.4.4
    Sourcefile: oik-types.php
    File ref: oik-types.php
    API type: filter
    Deprecated?: No
    API Letters: O,P,R,T

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

    Information

    Function name: oik_types_register_post_type_args
    Plugin ref: oik-types
    Version: 2.4.4
    Sourcefile: oik-types.php
    File ref: oik-types.php
    API type: filter
    Deprecated?: No
    API Letters: O,P,R,T

    Recent plugin updates

    oik-weight-zone-shipping v0.2.13 oik-weight-zone-shipping v0.2.13 has been tested with WooCommerce 10.1.2 and WordPress 6.8.2 ...
    SB Children Block v1.3.0 Upgrade to SB Children Block v1.3.0 for support for PHP 8.3 and PHP 8.4  ...
    oik v4.15.3 Update to oik v4.15.3 for a couple of security fixes. Tested with WordPress 6.8.2 ...
    oik-privacy-policy v1.4.9 Update to oik-privacy-policy v1.4.9 for a security fix. Tested with WordPress 6.8.2 and PHP 8.3 and PHP 8.4 ...
    oik-nivo-slider v1.17.0 oik-nivo-slider v1.17.0 introduces the Nivo slider block - oik-nivo-slider/nivo. ...

    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: herb@bobbingwide.com

    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-2025. All rights reserved.


    Website designed and developed by Herb Miller of Bobbing Wide
    Proudly powered by WordPress and oik-plugins

    WordPress version: 6.8.3

    Gutenberg version: 21.7.0

    PHP version: 8.2.29