$args['intro_text'] = '<p>' . sprintf( esc_html__( 'Did you know that Redux sets a global variable for you? To access any of your saved options from within your code you can use your global variable: $%1$s', 'your-textdomain-here' ), '<strong>' . $v . '</strong>' ) . '<p>';
} else {
$args['intro_text'] = '<p>' . esc_html__( 'This text is displayed above the options panel. It isn\'t required, but more info is always better! The intro_text field accepts all HTML.', 'your-textdomain-here' ) . '</p>';
}
// Add content after the form.
$args['footer_text'] = '<p>' . esc_html__( 'This text is displayed below the options panel. It isn\'t required, but more info is always better! The footer_text field accepts all HTML.', 'your-textdomain-here' ) . '</p>';
Redux::set_args( $opt_name, $args );
/*
* ---> END ARGUMENTS
*/
/*
* ---> START HELP TABS
*/
$help_tabs = array(
array(
'id' => 'redux-help-tab-1',
'title' => esc_html__( 'Theme Information 1', 'your-textdomain-here' ),
'content' => '<p>' . esc_html__( 'This is the tab content, HTML is allowed.', 'your-textdomain-here' ) . '</p>',
),
array(
'id' => 'redux-help-tab-2',
'title' => esc_html__( 'Theme Information 2', 'your-textdomain-here' ),
'content' => '<p>' . esc_html__( 'This is the tab content, HTML is allowed.', 'your-textdomain-here' ) . '</p>',
),
);
Redux::set_help_tab( $opt_name, $help_tabs );
// Set the help sidebar.
$content = '<p>' . esc_html__( 'This is the sidebar content, HTML is allowed.', 'your-textdomain-here' ) . '</p>';
'title' => esc_html__( 'Section via hook', 'your-textdomain-here' ),
'desc' => '<p class="description">' . esc_html__( 'This is a section created by adding a filter to the sections array. Can be used by child themes to add/remove sections from the options.', 'your-textdomain-here' ) . '</p>',
'icon' => 'el el-paper-clip',
// Leave this as a blank section, no options just some intro text set above.
'fields' => array(),
);
return$sections;
}
}
if ( ! function_exists( 'change_arguments' ) ) {
/**
* Filter hook for filtering the args.
* Good for child themes to override or add to the args array.
* It can also be used in other functions.
*
* @param array $args Global arguments array.
*
* @return array
*/
functionchange_arguments( array$args ): array {
$args['dev_mode'] = true;
return$args;
}
}
if ( ! function_exists( 'change_defaults' ) ) {
/**
* Filter hook for filtering the default value of any given field. Very useful in development mode.