PHP Classes

File: vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CronIntervalStandard.xml

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Download Installed Plugin   vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CronIntervalStandard.xml   Download  
File: vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/CronIntervalStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Download Installed Plugin
Download a WordPress plugin as a ZIP archive
Author: By
Last change:
Date: 2 days ago
Size: 1,289 bytes
 

Contents

Class file image Download
<?xml version="1.0"?> <documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd" title="Cron Interval" > <standard> <![CDATA[ Cron schedules running more often than once every 15 minutes are discouraged. Crons running that frequently can negatively impact the performance of a site. ]]> </standard> <code_comparison> <code title="Valid: Cron schedule is created to run once every hour."> <![CDATA[ function adjust_schedules( $schedules ) { $schedules['every_hour'] = array( 'interval' => <em>HOUR_IN_SECONDS</em>, 'display' => __( 'Every hour' ) ); return $schedules; } add_filter( 'cron_schedules', 'adjust_schedules' ); ]]> </code> <code title="Invalid: Cron schedule is added to run more than once per 15 minutes."> <![CDATA[ function adjust_schedules( $schedules ) { $schedules['every_9_mins'] = array( 'interval' => <em>9 * 60</em>, 'display' => __( 'Every 9 minutes' ) ); return $schedules; } add_filter( 'cron_schedules', 'adjust_schedules' ); ]]> </code> </code_comparison> </documentation>