ActionScheduler_Compatibility

Located in classes/ActionScheduler_Compatibility.php.

Provides lightweight compatibility wrappers for WordPress core functions that were introduced in later WP versions.

Public Methods

convert_hr_to_bytes( $value )

Convert a shorthand byte value (e.g., 256M) into bytes.

  • Parameters: $value (string) shorthand or plain byte value.
  • Returns: int byte value (capped at PHP_INT_MAX).

Notes:

  • Delegates to wp_convert_hr_to_bytes() when available.

raise_memory_limit()

Attempt to increase PHP memory limit for memory-intensive processes.

  • Returns: bool|int|string the limit that was set, or false on failure.

Notes:

  • Delegates to wp_raise_memory_limit( 'admin' ) when available.
  • Uses admin_memory_limit filter when core function is not available.

raise_time_limit( $limit = 0 )

Attempt to increase the PHP execution time limit.

  • Parameters: $limit (int) seconds to raise by; 0 uses current max.
  • Returns: void

Notes:

  • Uses wc_set_time_limit() when available.
  • Falls back to set_time_limit() if allowed and not disabled.