Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_is_auto_update_enabled_for_type ›

Seit5.5.0
Veraltetn/v
wp_is_auto_update_enabled_for_type ( $type )
Parameter:
  • (string) $type The type of update being checked: 'theme' or 'plugin'.
    Erforderlich: Ja
Gibt zurück:
  • (bool) True if auto-updates are enabled for `$type`, false otherwise.
Definiert in:
Codex:

Checks whether auto-updates are enabled.



Quellcode

function wp_is_auto_update_enabled_for_type( $type ) {
	switch ( $type ) {
		case 'plugin':
			/**
			 * Filters whether plugins manual auto-update is enabled.
			 *
			 * @since 5.5.0
			 *
			 * @param bool $enabled True if plugins auto-update is enabled, false otherwise.
			 */
			return apply_filters( 'plugins_auto_update_enabled', true );
		case 'theme':
			/**
			 * Filters whether plugins manual auto-update is enabled.
			 *
			 * @since 5.5.0
			 *
			 * @param bool True if themes auto-update is enabled, false otherwise.
			 */
			return apply_filters( 'themes_auto_update_enabled', true );
	}

	return false;
}