learndash_support_section

apply_filters( 'learndash_support_section',  array $settings,  string $context )

Filters LearnDash admin support section settings.


Description #


Parameters #

$settings

(array) An array of support section setting details.

$context

(string) The context where the setting is shown like ld_settings, server_settings, wp_settings, ld_templates, ld_database_tables, wp_active_theme, wp_active_plugins, etc.


Source #

File: includes/settings/settings-sections/class-ld-settings-section-support-database-tables.php


Examples #

 <?php
/**
 * Example usage for learndash_support_section filter.
 */
add_filter(
	'learndash_support_section',
	function( $settings_set = array(), $settings_key = '' ) {

		// If the $section_key is for theme or plugins we clear the section set so it doesnt display.
		if ( in_array( $settings_key, array( 'wp_active_theme', 'wp_active_plugins' ) ) ) {
			$settings_set = array();
		}

		// Always return $settings_set.
		return $settings_set;

	},
	30,
	2
);