Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Popmake_Fields::render_templ_field( array $args = array() )
Description Description
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Parameters Parameters
- $args
-
(Optional)
Default value: array()
Source Source
File: includes/class-popmake-fields.php
public function render_templ_field( $args = array() ) { // If no type default to text. $type = ! empty( $args['type'] ) ? $args['type'] : 'text'; /** * Check if any actions hooked to this type of field and load run those. */ if ( has_action( "pum_{$type}_templ_field" ) ) { do_action( "pum_{$type}_templ_field", $args, $this ); } else { /** * Check if override or custom function exists and load that. */ if ( function_exists( "pum_{$type}_templ_callback" ) ) { $function_name = "pum_{$type}_templ_callback"; } /** * Check if core method exists and load that. */ elseif ( method_exists( $this, $type . '_templ_callback' ) ) { $function_name = array( $this, $type . '_templ_callback' ); } /** * Check if the field type is hook. */ elseif ( $type == 'hook' ) { $function_name = array( $this, 'hook_callback' ); } /** * No method exists, lets notify them the field type doesn't exist. */ else { $function_name = array( $this, 'missing_callback' ); } /** * Call the determined method, passing the field args & $value to the callback. */ call_user_func_array( $function_name, array( $args, $this ) ); } }
Expand full source code Collapse full source code View on Trac