accordions_metabox_navs

Add the following code inside the function.php file to add a navigation tab to the accordion.

add_filter('accordions_metabox_navs', 'accordions_metabox_navs_18032020', 10);

function accordions_metabox_navs_18032020($tabs){

    global $post;

    $post_id = $post->ID;
    $accordions_options = get_post_meta($post_id,'accordions_options', true);
    $current_tab = isset($accordions_options['current_tab']) ? $accordions_options['current_tab'] : 'content';

    $tabs[] = array(
        'id' => 'custom',
        'title' => sprintf(__('%s Custom nav','accordions'),'<i class="fas fa-store"></i>'),
        'priority' => 90,
        'active' => ($current_tab == 'custom') ? true : false,
    );

    return $tabs;
}
add_action('accordions_metabox_content_custom', 'accordions_metabox_content_custom_18032020', 10);

function accordions_metabox_content_custom_18032020($post_id){

    $settings_tabs_field = new settings_tabs_field();
    $accordions_options = get_post_meta($post_id,'accordions_options', true);

    $custom = isset($accordions_options['custom']) ? $accordions_options['custom'] : '';

    ?>
        <div class="section">

            <div class="section-title"><?php echo __('Custom section', 'accordions'); ?></div>
            <p class="description section-description"><?php echo __('Custom section details.', 'accordions'); ?></p>

            <?php

            $args = array(
                'id'		=> 'custom',
                'parent'		=> 'accordions_options',
                'title'		=> __('Custom option','accordions'),
                'details'	=> __('Custom option value','accordions'),
                'type'		=> 'text',
                'value'		=> $custom,
                'default'		=> '',
                'placeholder' => '',

            );

            $settings_tabs_field->generate_field($args);

            ?>

        </div>

    <?php
}
accordions_metabox_navs 1