Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Getting Error Message in Tabs

$
0
0

Replies: 0

I have created a profile tab and have added two shortcodes to display. One displays just fine, but the other does not appear. Further, I continue to get this error message.

Warning: extract() expects parameter 1 to be array, string given in /var/www/aabronchology/staging-site/wp-content/plugins/profile-tabs-for-ultimate-member/shortcode.php on line 28

I am not a developer, so I’m not quite sure what it is that I need to do. I have checked like 28 and I’m not sure what to do about it. This is what the section on has:

<?php

class PP_Tabs_Shortcode {
function __construct() {
add_shortcode( ‘pp-tabs’, array( $this, ‘output_field’ ) );
}

function output_field( $atts ) {
global $ultimatemember;

$a = shortcode_atts( array(
‘field’ => ”,
‘label’ => ‘0’,
), $atts );

if ( strtolower( $a[‘field’] ) == “id” ) {
return um_profile_id();
}

um_fetch_user( um_profile_id() );

$key = $a[‘field’];
$showlabel = $a[‘label’];

if ( um_user( $key ) ) {
$output = null;
$data = $ultimatemember->fields->get_field( $key );
extract( $data );

if ( ! isset( $data[‘type’] ) ) {
return;
}

if ( isset( $data[‘in_group’] ) && $data[‘in_group’] != ” && $rule != ‘group’ ) {
return;
}

if ( in_array( $type, array( ‘block’, ‘shortcode’, ‘spacing’, ‘divider’, ‘group’ ) ) ) {
} else {
if ( ! $ultimatemember->fields->field_value( $key, $default, $data ) ) {
return;
}
}

if ( ! um_can_view_field( $data ) ) {
return;
}

if ( ! um_field_conditions_are_met( $data ) ) {
return;
}

switch ( $type ) {

Line 28 is: extract( $data );

Your help would be greatly appreciated.

Thank you.


Viewing all articles
Browse latest Browse all 59525

Trending Articles