A WordPress-centric search engine for devs and theme authors



wp_is_auto_update_enabled_for_type ›

Since5.5.0
Deprecatedn/a
wp_is_auto_update_enabled_for_type ( $type )
Parameters:
  • (string) $type The type of update being checked: 'theme' or 'plugin'.
    Required: Yes
Returns:
  • (bool) True if auto-updates are enabled for `$type`, false otherwise.
Defined at:
Codex:

Checks whether auto-updates are enabled.



Source

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

	return false;
}