auto_update_{$type}

auto_update_{$type}

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('auto_update_{$type}') is found 2 times:

  • /wp-admin/includes/class-wp-automatic-updater.php line 268
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    * @param bool|null $update Whether to update. The value of null is internally used
     *                          to detect whether nothing has hooked into this filter.
     * @param object    $item   The update offer.
     */
    $update = apply_filters( "auto_update_{$type}", $update, $item );
     
    if ( ! $update ) {
        if ( 'core' === $type ) {
            $this->send_core_update_notification_email( $item );
        }
        return false;
  • /wp-admin/includes/update.php line 1089
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    * @return bool True if auto-updates are forced for `$item`, false otherwise.
     */
    function wp_is_auto_update_forced_for_item( $type, $update, $item ) {
        /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */
        return apply_filters( "auto_update_{$type}", $update, $item );
    }
     
    /**
     * Determines the appropriate auto-update message to be displayed.
     *
     * @since 5.5.0