Code Duplication    Length = 12-14 lines in 2 locations

modules/videopress/class.videopress-scheduler.php 1 location

@@ 70-81 (lines=12) @@
67
	 *
68
	 * @return array
69
	 */
70
	public function add_30_minute_cron_interval( $current_schedules ) {
71
72
		// Only add the 30 minute interval if it wasn't already set.
73
		if ( ! isset( $current_schedules['minutes_30'] ) ) {
74
			$current_schedules['minutes_30'] = array(
75
				'interval' => 30 * MINUTE_IN_SECONDS,
76
				'display'  => 'Every 30 minutes'
77
			);
78
		}
79
80
		return $current_schedules;
81
	}
82
83
	/**
84
	 * Activate a single cron

modules/widgets/wordpress-post-widget.php 1 location

@@ 40-53 (lines=14) @@
37
 *
38
 * @return array
39
 */
40
function jetpack_display_posts_widget_cron_intervals( $current_schedules ) {
41
42
	/**
43
	 * Only add the 10 minute interval if it wasn't already set.
44
	 */
45
	if ( ! isset( $current_schedules['minutes_10'] ) ) {
46
		$current_schedules['minutes_10'] = array(
47
			'interval' => 10 * MINUTE_IN_SECONDS,
48
			'display'  => 'Every 10 minutes'
49
		);
50
	}
51
52
	return $current_schedules;
53
}
54
55
/**
56
 * Execute the cron task