PluginProbe
Stream – Activity Log & Audit Trail / 4.0.2
Stream – Activity Log & Audit Trail v4.0.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 | classes/class-export.php +17 -7 3.2.34.0.2 View file →
@@ -1,10 +1,19 @@
1 1 <?php
2 +/**
3 + * Loads & Manages exporter classes.
4 + *
5 + * @package WP_Stream
6 + */
7 +
2 8 namespace WP_Stream;
3 9
10 +/**
11 + * Class - Export
12 + */
4 13 class Export {
5 14 /**
6 - * Hold Plugin class
15 + * Holds instance of plugin object
7 16 *
8 17 * @var Plugin
9 18 */
10 19 public $plugin;
@@ -72,14 +81,16 @@
72 81
73 82 /**
74 83 * Add Export options to record actions menu
75 84 *
85 + * @param array $action_menu_items Export types.
86 + *
76 87 * @return array
77 88 */
78 89 public function actions_menu_export_items( $action_menu_items ) {
79 90 foreach ( $this->get_exporters() as $exporter ) {
80 91 $action = 'export-' . $exporter->slug;
81 - // translators: Placeholder refers to an export format (e.g. "CSV")
92 + /* translators: %s: an export format (e.g. "CSV") */
82 93 $action_menu_items[ $action ] = sprintf( __( 'Export as %s', 'stream' ), $exporter->name );
83 94 }
84 95
85 96 return $action_menu_items;
@@ -98,9 +109,9 @@
98 109 $row_out = array();
99 110 foreach ( array_keys( $columns ) as $column_name ) {
100 111 switch ( $column_name ) {
101 112 case 'date':
102 - $created = date( 'Y-m-d H:i:s', strtotime( $record->created ) );
113 + $created = gmdate( 'Y-m-d H:i:s', strtotime( $record->created ) );
103 114 $row_out[ $column_name ] = get_date_from_gmt( $created, 'Y/m/d h:i:s A' );
104 115 break;
105 116
106 117 case 'summary':
@@ -139,12 +150,11 @@
139 150
140 151 /**
141 152 * Increase pagination limit for CSV Output
142 153 *
143 - * @param int $records_per_page Old limit for records_per_page.
144 154 * @return int
145 155 */
146 - public function disable_paginate( $records_per_page ) {
156 + public function disable_paginate() {
147 157 return 10000;
148 158 }
149 159
150 160 /**
@@ -163,9 +173,9 @@
163 173 'action' => $columns['action'],
164 174 'ip' => $columns['ip'],
165 175 );
166 176
167 - if ( is_multisite() && is_plugin_active_for_network( $this->plugin->locations['plugin'] ) ) {
177 + if ( is_multisite() && $this->plugin->is_network_activated() ) {
168 178 $new_columns['blog_id'] = __( 'Blog ID', 'stream' );
169 179 }
170 180
171 181 return $new_columns;
@@ -202,9 +212,9 @@
202 212 * @param array $classes An array of Exporter objects. In the format exporter_slug => Exporter_Class()
203 213 */
204 214 $this->exporters = apply_filters( 'wp_stream_exporters', $classes );
205 215
206 - // Ensure that all exporters extend Exporter
216 + // Ensure that all exporters extend Exporter.
207 217 foreach ( $this->exporters as $key => $exporter ) {
208 218 if ( ! $this->is_valid_exporter( $exporter ) ) {
209 219 unset( $this->exporters[ $key ] );
210 220 }