PluginProbe
Stream – Activity Log & Audit Trail / 3.4.2
Stream – Activity Log & Audit Trail v3.4.2
4.4.0 4.3.0 4.2.2 4.2.1 trunk 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1 3.1.1 3.10.0 3.2.0 3.2.1 3.2.2 3.2.3 All 50 releases
← All changes | includes/functions.php +22 -5 3.2.13.4.2 View file →
@@ -35,9 +35,9 @@
35 35 /**
36 36 * Converts a time into an ISO 8601 extended formatted string.
37 37 *
38 38 * @param int|bool $time Seconds since unix epoc
39 - * @param int $offset Hour offset
39 + * @param int $offset Hour offset
40 40 *
41 41 * @return string an ISO 8601 extended formatted time
42 42 */
43 43 function wp_stream_get_iso_8601_extended_date( $time = false, $offset = 0 ) {
@@ -64,10 +64,10 @@
64 64 /**
65 65 * Encode to JSON in a way that is also backwards compatible
66 66 *
67 67 * @param mixed $data
68 - * @param int $options (optional)
69 - * @param int $depth (optional)
68 + * @param int $options (optional)
69 + * @param int $depth (optional)
70 70 *
71 71 * @return string
72 72 */
73 73 function wp_stream_json_encode( $data, $options = 0, $depth = 512 ) {
@@ -97,9 +97,9 @@
97 97 if ( function_exists( 'get_sites' ) ) {
98 98 $sites = get_sites( $args );
99 99 } else {
100 100 $sites = array();
101 - foreach ( wp_get_sites( $args ) as $site ) {
101 + foreach ( wp_get_sites( $args ) as $site ) { // @codingStandardsIgnoreLine Specifically for old version of WP first, in order to provide backward compatibility
102 102 $sites[] = WP_Site::get_instance( $site['blog_id'] );
103 103 }
104 104 }
105 105
@@ -115,11 +115,28 @@
115 115 return function_exists( 'wpcom_vip_load_plugin' );
116 116 }
117 117
118 118 /**
119 - * True if native WP Cron is enabled, otherwise false
119 + * Check if the default front-end WP Cron is enabled. It doesn't
120 + * mean that the Cron is disabled in general.
120 121 *
121 122 * @return bool
122 123 */
123 124 function wp_stream_is_cron_enabled() {
124 125 return ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) ? false : true;
126 +}
127 +
128 +/**
129 + * Get the asset min suffix if defined.
130 + *
131 + * @return string
132 + */
133 +function wp_stream_min_suffix() {
134 + $min = '';
135 + $is_script_debugging = ! defined( 'SCRIPT_DEBUG' ) || false === SCRIPT_DEBUG;
136 +
137 + if ( apply_filters( 'wp_stream_load_min_assets', $is_script_debugging ) ) {
138 + $min = 'min.';
139 + }
140 +
141 + return $min;
125 142 }