Make WordPress Core

Ticket #56628: 56628.patch

File 56628.patch, 2.2 KB (added by thakkarhardik, 20 months ago)
  • src/wp-includes/functions.php

    diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
    index 3ec8523a9048101ee59f0e8cf43df76112da6397..82b11996f4ff5e620f5570aa83b83685ffd28534 100644
    a b function mysql_to_rfc3339( $date_string ) { 
    74217421 * @since 4.6.0
    74227422 *
    74237423 * @param string $context Optional. Context in which the function is called. Accepts either 'admin',
    7424  *                        'image', or an arbitrary other context. If an arbitrary context is passed,
    7425  *                        the similarly arbitrary {@see '$context_memory_limit'} filter will be
     7424 *                        'image', 'cron' or an arbitrary other context. If an arbitrary context is
     7425 *                        passed, the similarly arbitrary {@see '$context_memory_limit'} filter will be
    74267426 *                        invoked. Default 'admin'.
    74277427 * @return int|string|false The limit that was set or false on failure.
    74287428 */
    function wp_raise_memory_limit( $context = 'admin' ) { 
    74827482                        $filtered_limit = apply_filters( 'image_memory_limit', $filtered_limit );
    74837483                        break;
    74847484
     7485                case 'cron':
     7486                        /**
     7487                         * Filters the memory limit allocated for cron.
     7488                         *
     7489                         * @param int|string $filtered_limit Maximum memory limit to allocate for cron.
     7490                         *                                   Default `WP_MAX_MEMORY_LIMIT` or the original
     7491                         *                                   php.ini `memory_limit`, whichever is higher.
     7492                         *                                   Accepts an integer (bytes), or a shorthand string
     7493                         *                                   notation, such as '256M'.
     7494                         */
     7495                        $filtered_limit = apply_filters( 'cron_memory_limit', $filtered_limit );
     7496                        break;
     7497
    74857498                default:
    74867499                        /**
    74877500                         * Filters the memory limit allocated for arbitrary contexts.
  • src/wp-cron.php

    diff --git a/src/wp-cron.php b/src/wp-cron.php
    index 164e4ef191fc7472ac73258c47a7f1b6ed68a62e..acb5e4d9c4b8649b789a6eb76a46f4399623d8a4 100644
    a b if ( ! defined( 'ABSPATH' ) ) { 
    4646        require_once __DIR__ . '/wp-load.php';
    4747}
    4848
     49// Set high memory limit for cron.
     50wp_raise_memory_limit( 'cron' );
     51
    4952/**
    5053 * Retrieves the cron lock.
    5154 *