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
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
PUM_Shortcode_Subscribe::data_attr( array $atts = array() )
Returns array of fields & values that will be passed into data attr of the form.
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
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
Parameters Parameters
- $atts
-
(Optional)
Default value: array()
Return Return
(array)
Source Source
File: classes/Shortcode/Subscribe.php
public function data_attr( $atts = array() ) { $data = array(); $data_attr_fields = $this->data_attr_fields(); foreach ( $atts as $key => $value ) { if ( in_array( $key, $data_attr_fields ) ) { $data[ $key ] = $value; if ( $key == 'redirect' ) { $data[ $key ] = base64_encode( $value ); } } } return $data; }
Expand full source code Collapse full source code View on Trac