You appear to be a bot. Output may be restricted
Description
Implement "oik_fields_loaded" action for oik-fields
Here we register the virtual fields that may be used directly in the bw_fields shortcode or can be registered as a virtual field of a post type For example the "_file_size" virtual field could be applied to an attachment such as a PDF The "featured" image is the full size image The "thumbnail" is the thumbnail sized version of the featured image
Usage
oik_fields_oik_fields_loaded();
Parameters
Returns
void
Source
File name: oik-fields/oik-fields.php
Lines:
1 to 54 of 54
function oik_fields_oik_fields_loaded() { $field_args = array( "#callback" => "bw_fields_get_file_size" , "#parms" => "_wp_attached_file" , "#plugin" => "oik-fields" , "#file" => "includes/oik-fields-virtual.php" , "#form" => false , "hint" => __( "virtual field", "oik-fields" ) ); bw_register_field( "file_size", "virtual", "File size", $field_args ); $field_args = array( "#callback" => "bw_fields_get_dimensions" , "#parms" => "_wp_attachment_metadata" , "#plugin" => "oik-fields" , "#file" => "includes/oik-fields-virtual.php" , "#form" => false , "hint" => __( "virtual field", "oik-fields" ) ); bw_register_field( "dimensions", "virtual", "Dimensions", $field_args ); $field_args = array( "#callback" => "bw_fields_get_featured_image" , "#parms" => "_thumbnail_id" , "#plugin" => "oik-fields" , "#file" => "includes/oik-fields-virtual.php" , "#form" => false , "hint" => __( "virtual field", "oik-fields" ) , "#label" => false ); bw_register_field( "featured", "virtual", "Featured image", $field_args ); $field_args[ "#callback" ] = "bw_fields_get_thumbnail"; bw_register_field( "thumbnail", "virtual", "Thumbnail", $field_args ); $field_args = array( "#callback" => "bw_fields_get_google_map" , "#parms" => "_post_code,_lat,_long" , "#plugin" => "oik-fields" , "#file" => "includes/oik-fields-virtual-google-map.php" , "#form" => false , "hint" => __( "virtual field", "oik-fields" ) ); bw_register_field( "googlemap", "virtual", "Google map", $field_args ); $field_args = array( "#callback" => "bw_fields_get_template" , "#parms" => "_wp_page_template" , "#plugin" => "oik-fields" , "#file" => "includes/oik-fields-virtual.php" , "#form" => false , "hint" => __( "virtual field", "oik-fields" ) ); bw_register_field( "template", "virtual", "Page template", $field_args ); }