• BTW

    (@48fourteen)


    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 2 replies - 1 through 2 (of 2 total)
  • Plugin Author PlusPlugins

    (@plusplugins)

    Hi,

    I am sorry about the trouble.

    Could you please tell me the shortcode you are using and the plugin name from which it is provided, to better assist you.

    Thanks !!

    Thread Starter BTW

    (@48fourteen)

    Thanks for responding. The shortcodes are as follows:

    [pp-tabs field=aab_member_number label=1]
    [pp-tabs field=jobip_print_access label=1]

    The meta/field key was created using the User Insights plugin, custom fields. This plugin is compatible with Ultimate Member.

    Please let me know if you need additional information.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting Error Message in Tabs’ is closed to new replies.