bobbingwide / oik-fields

Field formatting for custom post type (CPT) meta data, plus [bw_field], [bw_fields], [bw_new] and [bw_related] shortcodes
https://www.oik-plugins.com/oik-plugins/oik-fields-custom-post-type-field-apis/
1 stars 0 forks source link
oik-plugins shortcodes wordpress-plugin

oik-fields

banner

Description

Field formatting for custom post type (CPT) meta data, plus [bw_field], [bw_fields], [bw_new] and [bw_related] shortcodes

Features:

Display

Input

Shortcodes

[bw_new]

Allow end users to create content for a CPT

[bw_field] Display custom fields on the page, without labels or separators

[bw_fields] Display custom fields on the page, with labels and separators

[bw_related]

Display related content. Uses the field definition to determine the search criteria. Works for both noderef type fields and date fields ( using oik-dates ) Now supports the format= parameter to display results using the same logic as [bw_pages] When format=T then it displays results using the same logic as [bw_table]

Actions and filter hooks

Invokes - calls using do_action() or apply_filters()

The [bw_new] shortcode invokes the following filters:

The [bw_related] shortcode invokes the following filters:

Implements - ie. responds to

Installation

  1. Upload the contents of the oik-fields plugin to the `/wp-content/plugins/oik-fields' directory
  2. Activate the oik-fields plugin through the 'Plugins' menu in WordPress

What is this plugin for?

This plugin, working in conjunction with include files from the oik base plugin, provides the support to display meta data associated with custom post types. It provides basic support for the following types of field:

Support is also provided for specific fields:

Virtual fields provided:

What other field types are there?

The following field types are provided by the plugins listed below:

What is oik-fields dependent upon?

This plugin is dependent upon the oik base plugin. It specifically includes the following files.

    if ( oik_fields_check_oik_version( "3.2.1" ) ) {
        oik_require( "includes/bw_register.php" );
        oik_require( "includes/bw_metadata.php" );
        oik_require_lib( "bw_fields" );
    } else {
        oik_require( "includes/bw_register.inc" ); // Yes, we know it's deprecated
        oik_require( "bw_metadata.inc" ); // Yes, we know it's deprecated
        oik_require( "includes/bw_fields.inc" ); // Yes, we know it's deprecated
    }

Fields displayed by default

Fields are displayed by default in both forms and [bw_fields] displays. You can control these using two values in the options array

'#theme' => false - if you don't want the field displayed by [bw_fields] '#form' => false - if you don't want the form field displayed by [bw_new]

If you don't want the field's label to be displayed by [bw_fields] add: '#label' => false

Frequently Asked Questions

Where is the FAQ?

oik FAQ

What are ._field_name and _node_ref?

For the tag= and category_name= parameters, the code for the [bw_related] shortcode will lookup the current value for the specified field and pass this as the value for the tag or category slug.

Can I use _node_ref._field_ref with [bw_fields]

Not yet. But supporting 'fieldref' fields ( field references aka field type 'fieldref') is a planned enhancement.

Screenshots

  1. oik-fields displaying custom fields for a custom post type (CPT) called Premium plugins

Upgrade Notice

1.54.3

Upgrade to enable use of bw_form_field_category for hierarchical taxonomies other than Category

Changelog

1.54.3

Further reading

If you want to read more about the oik plugins then please visit the

oik base plugin