Filter hook 'allow_major_auto_core_updates'

in WP Core File wp-admin/includes/class-core-upgrader.php at line 386

View Source

allow_major_auto_core_updates

Filter Hook
Description
Filters whether to enable major automatic core updates.

Hook Information

File Location wp-admin/includes/class-core-upgrader.php View on GitHub
Hook Type Filter
Line Number 386

Hook Parameters

Type Name Description
bool $upgrade_major Whether to enable major automatic core updates.

Usage Examples

Basic Usage
<?php
// Hook into allow_major_auto_core_updates
add_filter('allow_major_auto_core_updates', 'my_custom_filter', 10, 1);

function my_custom_filter($upgrade_major) {
    // Your custom filtering logic here
    return $upgrade_major;
}

Source Code Context

wp-admin/includes/class-core-upgrader.php:386 - How this hook is used in WordPress core
<?php
 381  			 *
 382  			 * @since 3.7.0
 383  			 *
 384  			 * @param bool $upgrade_major Whether to enable major automatic core updates.
 385  			 */
 386  			return apply_filters( 'allow_major_auto_core_updates', $upgrade_major );
 387  		}
 388  
 389  		// If we're not sure, we don't want it.
 390  		return false;
 391  	}

PHP Documentation

<?php
/**
			 * Filters whether to enable major automatic core updates.
			 *
			 * @since 3.7.0
			 *
			 * @param bool $upgrade_major Whether to enable major automatic core updates.
			 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/includes/class-core-upgrader.php
Related Hooks

Related hooks will be displayed here in future updates.