Version Description
- Includes all previously "premium" functionality for free. This includes report snapshots, snapshot comparison tool, custom URL reporting, and scheduled report checks.
- Added in URL hotlinking in report details for paths to assets (images/scripts/etc)
Download this release
Release Info
Developer | mattkeys |
Plugin | Google Pagespeed Insights |
Version | 3.0.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 3.0.0
- assets/js/templates/details/rule_blocks.php +1 -1
- assets/js/templates/view-snapshot/comment.php +6 -0
- assets/js/view-snapshot.js +152 -0
- classes/class-GPI-Actions.php +388 -1
- classes/class-GPI-Activation.php +22 -0
- classes/class-GPI-Admin.php +251 -2
- classes/class-GPI-Core.php +3 -0
- classes/class-GPI-List-Table.php +131 -63
- classes/class-GPI-Uninstall.php +5 -0
- documentation/index.html +4 -10
- google-pagespeed-insights.php +2 -2
- readme.txt +47 -15
- templates/about.php +0 -139
- templates/add-custom-urls-bulk.php +53 -0
- templates/add-custom-urls.php +58 -0
- templates/custom-urls.php +21 -0
- templates/options.php +22 -5
- templates/parts/messages.php +10 -4
- templates/parts/navigation.php +16 -4
- templates/snapshots.php +21 -0
- templates/summary.php +13 -0
- templates/view-snapshot.php +156 -0
- translations/gpagespeedi.pot +371 -254
assets/js/templates/details/rule_blocks.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
<h3>{{{data[ i ].header}}}</h3>
|
6 |
<ul>
|
7 |
<# for (x = 0; x < data[ i ].urls.length; x++ ) { #>
|
8 |
-
<li>{{data[ i ].urls[x]}}</li>
|
9 |
<# } #>
|
10 |
</ul>
|
11 |
<# } #>
|
5 |
<h3>{{{data[ i ].header}}}</h3>
|
6 |
<ul>
|
7 |
<# for (x = 0; x < data[ i ].urls.length; x++ ) { #>
|
8 |
+
<li>{{{data[ i ].urls[x]}}}</li>
|
9 |
<# } #>
|
10 |
</ul>
|
11 |
<# } #>
|
assets/js/templates/view-snapshot/comment.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script type="text/html" id="tmpl-comment">
|
2 |
+
<p>
|
3 |
+
<strong>{{data.label}}: </strong>
|
4 |
+
{{data.comment}}
|
5 |
+
</p>
|
6 |
+
</script>
|
assets/js/view-snapshot.js
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function( $ ) {
|
2 |
+
|
3 |
+
GPI_View_Snapshot.snapshot.summary_stats = JSON.parse( GPI_View_Snapshot.snapshot.summary_stats );
|
4 |
+
GPI_View_Snapshot.snapshot.summary_reports = JSON.parse( GPI_View_Snapshot.snapshot.summary_reports );
|
5 |
+
|
6 |
+
if ( GPI_View_Snapshot.compare ) {
|
7 |
+
GPI_View_Snapshot.compare.summary_stats = JSON.parse( GPI_View_Snapshot.compare.summary_stats );
|
8 |
+
GPI_View_Snapshot.compare.summary_reports = JSON.parse( GPI_View_Snapshot.compare.summary_reports );
|
9 |
+
}
|
10 |
+
|
11 |
+
|
12 |
+
$( document ).ready( function() {
|
13 |
+
|
14 |
+
$('.pagespeed_needle').each( function( index ) {
|
15 |
+
var selector = $(this).data('selector');
|
16 |
+
var rotate = GPI_View_Snapshot[ selector ].summary_stats.odometer_rotation;
|
17 |
+
|
18 |
+
$(this).css({
|
19 |
+
'-webkit-transform' : 'rotate(' + rotate + ')',
|
20 |
+
'-moz-transform' : 'rotate(' + rotate + ')',
|
21 |
+
'-ms-transform' : 'rotate(' + rotate + ')',
|
22 |
+
'-o-transform' : 'rotate(' + rotate + ')',
|
23 |
+
'transform' : 'rotate(' + rotate + ')'
|
24 |
+
});
|
25 |
+
});
|
26 |
+
|
27 |
+
$('.score_text .score').each( function( index ) {
|
28 |
+
var selector = $(this).data('selector');
|
29 |
+
|
30 |
+
$(this).text( GPI_View_Snapshot[ selector ].summary_stats.score );
|
31 |
+
});
|
32 |
+
|
33 |
+
$('.largest_improvement .stats').each( function( index ) {
|
34 |
+
var selector = $(this).data('selector');
|
35 |
+
var areas_of_improvement = wp.template( 'areas_of_improvement' );
|
36 |
+
var container = this;
|
37 |
+
|
38 |
+
$.each( GPI_View_Snapshot[ selector ].summary_reports, function ( index, values ) {
|
39 |
+
var data = {
|
40 |
+
rule_name : values.rule_name,
|
41 |
+
avg_impact : values.avg_impact,
|
42 |
+
occurances : values.occurances
|
43 |
+
};
|
44 |
+
|
45 |
+
$(container).append( areas_of_improvement( data ) );
|
46 |
+
});
|
47 |
+
});
|
48 |
+
|
49 |
+
var scores = wp.template( 'scores' );
|
50 |
+
$('.highest_scores .stats').each( function( index ) {
|
51 |
+
var selector = $(this).data('selector');
|
52 |
+
var container = this;
|
53 |
+
|
54 |
+
$.each( GPI_View_Snapshot[ selector ].summary_stats.page_scores.highest, function ( index, values ) {
|
55 |
+
var data = {
|
56 |
+
report_url : values.report_url,
|
57 |
+
page_url : values.page_url,
|
58 |
+
score : values.score
|
59 |
+
};
|
60 |
+
|
61 |
+
$(container).append( scores( data ) );
|
62 |
+
});
|
63 |
+
});
|
64 |
+
$('.lowest_scores .stats').each( function( index ) {
|
65 |
+
var selector = $(this).data('selector');
|
66 |
+
var container = this;
|
67 |
+
|
68 |
+
$.each( GPI_View_Snapshot[ selector ].summary_stats.page_scores.lowest, function ( index, values ) {
|
69 |
+
var data = {
|
70 |
+
report_url : values.report_url,
|
71 |
+
page_url : values.page_url,
|
72 |
+
score : values.score
|
73 |
+
};
|
74 |
+
|
75 |
+
$(container).append( scores( data ) );
|
76 |
+
});
|
77 |
+
});
|
78 |
+
|
79 |
+
});
|
80 |
+
|
81 |
+
google.charts.load('current', {'packages':['corechart']});
|
82 |
+
google.charts.setOnLoadCallback(drawCharts);
|
83 |
+
|
84 |
+
function drawCharts() {
|
85 |
+
|
86 |
+
/***********************************************
|
87 |
+
Create resource size bar chart
|
88 |
+
************************************************/
|
89 |
+
|
90 |
+
$('.sizes_chart_div').each( function() {
|
91 |
+
var selector = $(this).data('selector');
|
92 |
+
var sizes = new google.visualization.DataTable();
|
93 |
+
sizes.addColumn('string', 'Resource Type');
|
94 |
+
sizes.addColumn('number', 'High', 'highest');
|
95 |
+
sizes.addColumn('number', 'Average', 'average');
|
96 |
+
sizes.addColumn('number', 'Low', 'lowest');
|
97 |
+
|
98 |
+
$.each( GPI_View_Snapshot[ selector ].summary_stats.resource_sizes, function ( index, values ) {
|
99 |
+
var data = [ index, Number( values.highest.value ), Number( values.average ), Number( values.lowest.value ) ];
|
100 |
+
sizes.addRow( data );
|
101 |
+
});
|
102 |
+
|
103 |
+
var sizes_options = {
|
104 |
+
legend : 'none',
|
105 |
+
backgroundColor : 'transparent',
|
106 |
+
width : 615,
|
107 |
+
height : 200,
|
108 |
+
tooltip : { trigger: 'selection' },
|
109 |
+
chartArea : { top: 10, width: '80%', height: '80%' }
|
110 |
+
};
|
111 |
+
|
112 |
+
var sizes_chart = new google.visualization.BarChart( $(this)[0] );
|
113 |
+
sizes_chart.draw(sizes, sizes_options);
|
114 |
+
|
115 |
+
sizes_chart.setAction({
|
116 |
+
id : 'view_report',
|
117 |
+
text : 'View Page Report',
|
118 |
+
action : function() {
|
119 |
+
selection = sizes_chart.getSelection();
|
120 |
+
column_id = sizes.getColumnId( selection[0].column );
|
121 |
+
|
122 |
+
if ( 'average' == column_id ) {
|
123 |
+
return;
|
124 |
+
}
|
125 |
+
|
126 |
+
index = sizes.getValue( selection[0].row, 0 );
|
127 |
+
report_url = GPI_View_Snapshot[ selector ].summary_stats.resource_sizes[ index ][ column_id ].url;
|
128 |
+
|
129 |
+
var win = window.open( report_url, '_blank' );
|
130 |
+
win.focus();
|
131 |
+
},
|
132 |
+
visible: function () {
|
133 |
+
selection = sizes_chart.getSelection();
|
134 |
+
|
135 |
+
if ( selection.length < 1 ) {
|
136 |
+
return false;
|
137 |
+
}
|
138 |
+
|
139 |
+
column_id = sizes.getColumnId( selection[0].column );
|
140 |
+
|
141 |
+
if ( 'average' == column_id ) {
|
142 |
+
return false;
|
143 |
+
} else {
|
144 |
+
return true;
|
145 |
+
}
|
146 |
+
},
|
147 |
+
});
|
148 |
+
});
|
149 |
+
|
150 |
+
}
|
151 |
+
|
152 |
+
})( jQuery );
|
classes/class-GPI-Actions.php
CHANGED
@@ -24,6 +24,7 @@ class GPI_Actions
|
|
24 |
var $gpi_page_stats;
|
25 |
var $gpi_page_reports;
|
26 |
var $gpi_page_blacklist;
|
|
|
27 |
var $gpi_custom_urls;
|
28 |
|
29 |
public function init()
|
@@ -33,13 +34,14 @@ class GPI_Actions
|
|
33 |
$this->action = $_REQUEST['action'];
|
34 |
$this->gpi_options = get_option( 'gpagespeedi_options' );
|
35 |
$this->gpi_ui_options = get_option( 'gpagespeedi_ui_options' );
|
36 |
-
$this->page_id = isset( $_GET['page_id'] ) ? $_GET['page_id'] : false;
|
37 |
$this->bulk_pages = isset( $_GET['gpi_page_report'] ) ? $_GET['gpi_page_report'] : false;
|
38 |
$this->bulk_pages_count = count( $this->bulk_pages );
|
39 |
|
40 |
$this->gpi_page_stats = $wpdb->prefix . 'gpi_page_stats';
|
41 |
$this->gpi_page_reports = $wpdb->prefix . 'gpi_page_reports';
|
42 |
$this->gpi_page_blacklist = $wpdb->prefix . 'gpi_page_blacklist';
|
|
|
43 |
$this->gpi_custom_urls = $wpdb->prefix . 'gpi_custom_urls';
|
44 |
$this->gpi_api_error_logs = $wpdb->prefix . 'gpi_api_error_logs';
|
45 |
|
@@ -85,6 +87,26 @@ class GPI_Actions
|
|
85 |
$action_message = $this->delete_blacklist();
|
86 |
break;
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
case 'set_view_preference':
|
89 |
$new_strategy = isset( $_GET['strategy'] ) ? $_GET['strategy'] : false;
|
90 |
if ( 'mobile' == $new_strategy || 'desktop' == $new_strategy ) {
|
@@ -149,6 +171,8 @@ class GPI_Actions
|
|
149 |
$wpdb->query( "TRUNCATE TABLE $this->gpi_page_reports" );
|
150 |
$wpdb->query( "TRUNCATE TABLE $this->gpi_page_blacklist" );
|
151 |
$wpdb->query( "TRUNCATE TABLE $this->gpi_api_error_logs" );
|
|
|
|
|
152 |
|
153 |
do_action( 'gpi_truncate_custom_tables' );
|
154 |
}
|
@@ -193,6 +217,15 @@ class GPI_Actions
|
|
193 |
update_option( 'gpagespeedi_ui_options', $gpagespeedi_ui_options );
|
194 |
$this->gpi_ui_options = $gpagespeedi_ui_options;
|
195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
return __( 'Settings Saved.', 'gpagespeedi' );
|
197 |
}
|
198 |
|
@@ -411,6 +444,360 @@ class GPI_Actions
|
|
411 |
return $delete_count . ' ' . __( 'URLs have been deleted.', 'gpagespeedi' );
|
412 |
}
|
413 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
}
|
415 |
|
416 |
add_action( 'plugins_loaded', array( new GPI_Actions, 'init' ) );
|
24 |
var $gpi_page_stats;
|
25 |
var $gpi_page_reports;
|
26 |
var $gpi_page_blacklist;
|
27 |
+
var $gpi_summary_snapshots;
|
28 |
var $gpi_custom_urls;
|
29 |
|
30 |
public function init()
|
34 |
$this->action = $_REQUEST['action'];
|
35 |
$this->gpi_options = get_option( 'gpagespeedi_options' );
|
36 |
$this->gpi_ui_options = get_option( 'gpagespeedi_ui_options' );
|
37 |
+
$this->page_id = isset( $_GET['page_id'] ) ? intval( $_GET['page_id'] ) : false;
|
38 |
$this->bulk_pages = isset( $_GET['gpi_page_report'] ) ? $_GET['gpi_page_report'] : false;
|
39 |
$this->bulk_pages_count = count( $this->bulk_pages );
|
40 |
|
41 |
$this->gpi_page_stats = $wpdb->prefix . 'gpi_page_stats';
|
42 |
$this->gpi_page_reports = $wpdb->prefix . 'gpi_page_reports';
|
43 |
$this->gpi_page_blacklist = $wpdb->prefix . 'gpi_page_blacklist';
|
44 |
+
$this->gpi_summary_snapshots = $wpdb->prefix . 'gpi_summary_snapshots';
|
45 |
$this->gpi_custom_urls = $wpdb->prefix . 'gpi_custom_urls';
|
46 |
$this->gpi_api_error_logs = $wpdb->prefix . 'gpi_api_error_logs';
|
47 |
|
87 |
$action_message = $this->delete_blacklist();
|
88 |
break;
|
89 |
|
90 |
+
case 'save-snapshot':
|
91 |
+
$action_message = $this->save_snapshot();
|
92 |
+
break;
|
93 |
+
|
94 |
+
case 'delete-snapshot':
|
95 |
+
$action_message = $this->delete_snapshot();
|
96 |
+
break;
|
97 |
+
|
98 |
+
case 'add-custom-urls':
|
99 |
+
$action_message = $this->add_custom_urls();
|
100 |
+
break;
|
101 |
+
|
102 |
+
case 'add-custom-urls-bulk':
|
103 |
+
$action_message = $this->add_custom_urls_bulk();
|
104 |
+
break;
|
105 |
+
|
106 |
+
case 'delete':
|
107 |
+
$action_message = $this->delete_page();
|
108 |
+
break;
|
109 |
+
|
110 |
case 'set_view_preference':
|
111 |
$new_strategy = isset( $_GET['strategy'] ) ? $_GET['strategy'] : false;
|
112 |
if ( 'mobile' == $new_strategy || 'desktop' == $new_strategy ) {
|
171 |
$wpdb->query( "TRUNCATE TABLE $this->gpi_page_reports" );
|
172 |
$wpdb->query( "TRUNCATE TABLE $this->gpi_page_blacklist" );
|
173 |
$wpdb->query( "TRUNCATE TABLE $this->gpi_api_error_logs" );
|
174 |
+
$wpdb->query( "TRUNCATE TABLE $this->gpi_custom_urls" );
|
175 |
+
$wpdb->query( "TRUNCATE TABLE $this->gpi_summary_snapshots" );
|
176 |
|
177 |
do_action( 'gpi_truncate_custom_tables' );
|
178 |
}
|
217 |
update_option( 'gpagespeedi_ui_options', $gpagespeedi_ui_options );
|
218 |
$this->gpi_ui_options = $gpagespeedi_ui_options;
|
219 |
|
220 |
+
if ( $gpagespeedi_options['use_schedule'] && ! wp_next_scheduled('googlepagespeedinsightsworker') ) {
|
221 |
+
wp_schedule_event( time() + $gpagespeedi_options['recheck_interval'], 'gpi_scheduled_interval', 'googlepagespeedinsightsworker' );
|
222 |
+
} else if ( $gpagespeedi_options['use_schedule'] && ( $gpagespeedi_options['recheck_interval'] != $old_options['recheck_interval'] ) ) {
|
223 |
+
wp_clear_scheduled_hook( 'googlepagespeedinsightsworker' );
|
224 |
+
wp_schedule_event( time() + $gpagespeedi_options['recheck_interval'], 'gpi_scheduled_interval', 'googlepagespeedinsightsworker' );
|
225 |
+
} else if ( ! $gpagespeedi_options['use_schedule'] ) {
|
226 |
+
wp_clear_scheduled_hook( 'googlepagespeedinsightsworker' );
|
227 |
+
}
|
228 |
+
|
229 |
return __( 'Settings Saved.', 'gpagespeedi' );
|
230 |
}
|
231 |
|
444 |
return $delete_count . ' ' . __( 'URLs have been deleted.', 'gpagespeedi' );
|
445 |
}
|
446 |
|
447 |
+
private function save_snapshot()
|
448 |
+
{
|
449 |
+
if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'gpi_save_snapshot' ) ) {
|
450 |
+
return array(
|
451 |
+
'type' => 'error',
|
452 |
+
'message' => __( 'Invalid Nonce. Please refresh the page and try again.', 'gpagespeedi' )
|
453 |
+
);
|
454 |
+
}
|
455 |
+
|
456 |
+
global $wpdb;
|
457 |
+
|
458 |
+
$snapshot_data = array(
|
459 |
+
'strategy' => $this->gpi_options['strategy'],
|
460 |
+
'type' => isset( $_GET['filter'] ) ? $_GET['filter'] : 'all',
|
461 |
+
'snaptime' => current_time( 'timestamp' ),
|
462 |
+
'comment' => isset( $_POST['comment'] ) ? $_POST['comment'] : false,
|
463 |
+
'summary_stats' => json_encode( apply_filters( 'gpi_summary_stats', array() ) ),
|
464 |
+
'summary_reports' => json_encode( apply_filters( 'gpi_summary_reports', array() ) )
|
465 |
+
);
|
466 |
+
|
467 |
+
$save_snapshot = $wpdb->insert(
|
468 |
+
$this->gpi_summary_snapshots,
|
469 |
+
$snapshot_data,
|
470 |
+
array(
|
471 |
+
'%s',
|
472 |
+
'%s',
|
473 |
+
'%d',
|
474 |
+
'%s',
|
475 |
+
'%s',
|
476 |
+
'%s',
|
477 |
+
)
|
478 |
+
);
|
479 |
+
|
480 |
+
if ( $save_snapshot ) {
|
481 |
+
return __( 'Snapshot Saved Successfully', 'gpagespeedi' );
|
482 |
+
}
|
483 |
+
}
|
484 |
+
|
485 |
+
private function delete_snapshot()
|
486 |
+
{
|
487 |
+
if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-gpi_page_reports' ) ) {
|
488 |
+
return array(
|
489 |
+
'type' => 'error',
|
490 |
+
'message' => __( 'Invalid Nonce. Please refresh the page and try again.', 'gpagespeedi' )
|
491 |
+
);
|
492 |
+
}
|
493 |
+
|
494 |
+
if ( empty( $this->bulk_pages ) && ( isset( $_GET['snapshot_id'] ) && ! empty( $_GET['snapshot_id'] ) ) ) {
|
495 |
+
$this->bulk_pages = array( $_GET['snapshot_id'] );
|
496 |
+
}
|
497 |
+
|
498 |
+
if ( empty( $this->bulk_pages ) ) {
|
499 |
+
return array(
|
500 |
+
'type' => 'error',
|
501 |
+
'message' => __( 'No snapshot(s) selected.', 'gpagespeedi' )
|
502 |
+
);
|
503 |
+
}
|
504 |
+
|
505 |
+
global $wpdb;
|
506 |
+
|
507 |
+
foreach ( $this->bulk_pages as $bulk_page_id ) {
|
508 |
+
$wpdb->delete( $this->gpi_summary_snapshots, array( 'ID' => $bulk_page_id ), array( '%d' ) );
|
509 |
+
}
|
510 |
+
|
511 |
+
$delete_count = count( $this->bulk_pages );
|
512 |
+
|
513 |
+
return $delete_count . ' ' . __( 'Snapshots have been deleted.', 'gpagespeedi' );
|
514 |
+
}
|
515 |
+
|
516 |
+
private function add_custom_urls()
|
517 |
+
{
|
518 |
+
$urls_to_store = array();
|
519 |
+
$inserted_urls = 0;
|
520 |
+
|
521 |
+
if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'gpi-add-custom-urls' ) ) {
|
522 |
+
return array(
|
523 |
+
'type' => 'error',
|
524 |
+
'message' => __( 'Invalid Nonce. Please refresh the page and try again.', 'gpagespeedi' )
|
525 |
+
);
|
526 |
+
}
|
527 |
+
|
528 |
+
$custom_url_label = $_POST['custom_url_label'];
|
529 |
+
|
530 |
+
if ( empty( $custom_url_label ) ) {
|
531 |
+
$custom_url_label = 'custom';
|
532 |
+
} else {
|
533 |
+
$custom_url_label = preg_replace( '/[^a-zA-Z0-9\s]/', '', $custom_url_label );
|
534 |
+
$custom_url_label = str_replace(' ', '_', $custom_url_label);
|
535 |
+
$custom_url_label = substr( $custom_url_label, 0, 20 );
|
536 |
+
}
|
537 |
+
|
538 |
+
foreach ( $_POST['custom_urls'] as $custom_url ) {
|
539 |
+
$custom_url = esc_url_raw( $custom_url, array( 'http', 'https' ) );
|
540 |
+
|
541 |
+
if ( ! empty( $custom_url ) ) {
|
542 |
+
$urls_to_store[] = $custom_url;
|
543 |
+
}
|
544 |
+
}
|
545 |
+
|
546 |
+
if ( ! empty( $urls_to_store ) ) {
|
547 |
+
global $wpdb;
|
548 |
+
|
549 |
+
foreach ( $urls_to_store as $key => $url ) {
|
550 |
+
|
551 |
+
$url_already_exist = $wpdb->get_var( $wpdb->prepare(
|
552 |
+
"SELECT ( SELECT COUNT(*) FROM $this->gpi_custom_urls WHERE URL = %s ) + ( SELECT COUNT(*) FROM $this->gpi_page_stats WHERE URL = %s )",
|
553 |
+
$url, $url
|
554 |
+
)
|
555 |
+
);
|
556 |
+
|
557 |
+
if ( ! $url_already_exist ) {
|
558 |
+
$wpdb->insert(
|
559 |
+
$this->gpi_custom_urls,
|
560 |
+
array(
|
561 |
+
'URL' => $url,
|
562 |
+
'type' => $custom_url_label
|
563 |
+
),
|
564 |
+
array(
|
565 |
+
'%s',
|
566 |
+
'%s'
|
567 |
+
)
|
568 |
+
);
|
569 |
+
} else {
|
570 |
+
unset( $urls_to_store[ $key ] );
|
571 |
+
}
|
572 |
+
}
|
573 |
+
|
574 |
+
$inserted_urls = count( $urls_to_store );
|
575 |
+
|
576 |
+
do_action( 'run_gpi', false );
|
577 |
+
}
|
578 |
+
|
579 |
+
return $inserted_urls . ' ' . __( 'URL(s) have been successfully added.', 'gpagespeedi' );
|
580 |
+
}
|
581 |
+
|
582 |
+
private function add_custom_urls_bulk()
|
583 |
+
{
|
584 |
+
$urls_to_store = array();
|
585 |
+
$already_exist = array();
|
586 |
+
$inserted_urls = 0;
|
587 |
+
|
588 |
+
if ( ! isset( $_FILES['xml_sitemap'] ) ) {
|
589 |
+
return array(
|
590 |
+
'type' => 'error',
|
591 |
+
'message' => __( 'There was a problem uploading the sitemap', 'gpagespeedi' )
|
592 |
+
);
|
593 |
+
}
|
594 |
+
|
595 |
+
if ( ! function_exists( 'wp_handle_upload' ) ) {
|
596 |
+
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
597 |
+
}
|
598 |
+
|
599 |
+
$upload_overrides = array( 'test_form' => false, 'mimes' => array( 'xml' => 'application/xml' ) );
|
600 |
+
$movefile = wp_handle_upload( $_FILES['xml_sitemap'], $upload_overrides );
|
601 |
+
|
602 |
+
if ( isset( $movefile['file'] ) ) {
|
603 |
+
if ( $movefile['type'] != 'application/xml' ) {
|
604 |
+
unlink( $movefile['file'] );
|
605 |
+
return array(
|
606 |
+
'type' => 'error',
|
607 |
+
'message' => __( 'File type must be "Application/XML"', 'gpagespeedi' )
|
608 |
+
);
|
609 |
+
}
|
610 |
+
} else if ( isset( $movefile['error'] ) ) {
|
611 |
+
return array(
|
612 |
+
'type' => 'error',
|
613 |
+
'message' => $movefile['error']
|
614 |
+
);
|
615 |
+
} else {
|
616 |
+
return array(
|
617 |
+
'type' => 'error',
|
618 |
+
'message' => __( 'There was a problem uploading the sitemap', 'gpagespeedi' )
|
619 |
+
);
|
620 |
+
}
|
621 |
+
|
622 |
+
$accepted_protocols = array( 'http', 'https' );
|
623 |
+
|
624 |
+
// Create new document object
|
625 |
+
$dom_object = new DOMDocument();
|
626 |
+
|
627 |
+
// Load xml file
|
628 |
+
$dom_object->load( $movefile['file'] );
|
629 |
+
|
630 |
+
$item = $dom_object->getElementsByTagName( 'url' );
|
631 |
+
|
632 |
+
foreach ( $item as $value ) {
|
633 |
+
$locations = $value->getElementsByTagName( 'loc' );
|
634 |
+
$location = $locations->item(0)->nodeValue;
|
635 |
+
$urls_to_store[] = esc_url_raw( $location, $accepted_protocols );
|
636 |
+
}
|
637 |
+
|
638 |
+
if ( ! empty( $urls_to_store ) ) {
|
639 |
+
|
640 |
+
$custom_url_label = isset( $_POST['custom_url_label'] ) ? $_POST['custom_url_label'] : false;
|
641 |
+
|
642 |
+
if ( ! $custom_url_label ) {
|
643 |
+
$custom_url_label = 'custom';
|
644 |
+
} else {
|
645 |
+
$custom_url_label = str_replace( ' ', '_', $custom_url_label );
|
646 |
+
$custom_url_label = preg_replace( '/[^\w\d ]/ui', '', $custom_url_label );
|
647 |
+
$custom_url_label = substr( $custom_url_label, 0, 20 );
|
648 |
+
}
|
649 |
+
|
650 |
+
global $wpdb;
|
651 |
+
|
652 |
+
foreach ( $urls_to_store as $key => $url ) {
|
653 |
+
|
654 |
+
// Make sure the URL does not already exist
|
655 |
+
$url_already_exist = $wpdb->get_var( $wpdb->prepare(
|
656 |
+
"SELECT ( SELECT COUNT(*) FROM $this->gpi_custom_urls WHERE URL = %s ) + ( SELECT COUNT(*) FROM $this->gpi_page_stats WHERE URL = %s )",
|
657 |
+
$url, $url
|
658 |
+
)
|
659 |
+
);
|
660 |
+
|
661 |
+
// If URL does not already exist, add it
|
662 |
+
if ( $url_already_exist == 0 ) {
|
663 |
+
$wpdb->insert(
|
664 |
+
$this->gpi_custom_urls,
|
665 |
+
array(
|
666 |
+
'URL' => $url,
|
667 |
+
'type' => $custom_url_label
|
668 |
+
),
|
669 |
+
array(
|
670 |
+
'%s',
|
671 |
+
'%s'
|
672 |
+
)
|
673 |
+
);
|
674 |
+
} else {
|
675 |
+
$already_exist[] = $url;
|
676 |
+
unset( $urls_to_store[ $key ] );
|
677 |
+
}
|
678 |
+
}
|
679 |
+
|
680 |
+
$already_exist = count( $already_exist );
|
681 |
+
$inserted_urls = count( $urls_to_store );
|
682 |
+
|
683 |
+
if ( ! empty( $urls_to_store ) ) {
|
684 |
+
do_action( 'run_gpi', false );
|
685 |
+
}
|
686 |
+
}
|
687 |
+
|
688 |
+
return $inserted_urls . ' ' . __( 'URL(s) have been successfully added.', 'gpagespeedi' ) . ' ' . $already_exist . ' ' . __( 'URL(s) already exist and have been skipped.', 'gpagespeedi' ) ;
|
689 |
+
}
|
690 |
+
|
691 |
+
private function delete_page()
|
692 |
+
{
|
693 |
+
global $wpdb;
|
694 |
+
|
695 |
+
if ( is_array( $this->bulk_pages ) && ! empty( $this->bulk_pages ) ) {
|
696 |
+
$x = 1;
|
697 |
+
$custom_id_where_clause = '';
|
698 |
+
$select_id_where_clause = '';
|
699 |
+
foreach ( $this->bulk_pages as $page ) {
|
700 |
+
$page = intval( $page );
|
701 |
+
|
702 |
+
if ( ! $page ) {
|
703 |
+
continue;
|
704 |
+
}
|
705 |
+
|
706 |
+
if ( $x < $this->bulk_pages_count ) {
|
707 |
+
$custom_id_where_clause .= 'custom_id = ' . $page . ' OR ';
|
708 |
+
$select_id_where_clause .= 'ID = ' . $page . ' OR ';
|
709 |
+
} else {
|
710 |
+
$custom_id_where_clause .= 'custom_id = ' . $page;
|
711 |
+
$select_id_where_clause .= 'ID = ' . $page;
|
712 |
+
}
|
713 |
+
$x++;
|
714 |
+
}
|
715 |
+
|
716 |
+
// Get the URLs for all pages being deleted
|
717 |
+
$delete_array = $wpdb->get_results( "SELECT URL FROM $this->gpi_custom_urls WHERE $select_id_where_clause", ARRAY_A );
|
718 |
+
$delete_array_count = count( $delete_array );
|
719 |
+
if ( ! empty( $delete_array ) ) {
|
720 |
+
$z = 1;
|
721 |
+
$select_url_where_clause = '';
|
722 |
+
foreach ( $delete_array as $delete_url ) {
|
723 |
+
if ( $z < $delete_array_count ) {
|
724 |
+
$select_url_where_clause .= 'URL = "' . $delete_url['URL'] . '" OR ';
|
725 |
+
} else {
|
726 |
+
$select_url_where_clause .= 'URL = "' . $delete_url['URL'] . '"';
|
727 |
+
}
|
728 |
+
$z++;
|
729 |
+
}
|
730 |
+
|
731 |
+
// Get IDs for all the pages to be deleted
|
732 |
+
$page_stats_ids = $wpdb->get_results( "SELECT ID FROM $this->gpi_page_stats WHERE $select_url_where_clause", ARRAY_A );
|
733 |
+
|
734 |
+
if ( ! empty( $page_stats_ids ) ) {
|
735 |
+
|
736 |
+
$page_stats_ids_count = count( $page_stats_ids );
|
737 |
+
$y = 1;
|
738 |
+
$where_string = '';
|
739 |
+
foreach ( $page_stats_ids as $id ) {
|
740 |
+
if ( $y < $page_stats_ids_count ) {
|
741 |
+
$where_string .= $this->gpi_page_stats . '.ID = ' . $id['ID'] . ' OR ';
|
742 |
+
} else {
|
743 |
+
$where_string .= $this->gpi_page_stats . '.ID = ' . $id['ID'];
|
744 |
+
}
|
745 |
+
$y++;
|
746 |
+
}
|
747 |
+
|
748 |
+
// Delete page stats and page reports if they exist
|
749 |
+
$wpdb->query("
|
750 |
+
DELETE $this->gpi_page_stats, $this->gpi_page_reports
|
751 |
+
FROM $this->gpi_page_stats, $this->gpi_page_reports
|
752 |
+
WHERE $this->gpi_page_stats.ID = $this->gpi_page_reports.page_id
|
753 |
+
AND ($where_string)
|
754 |
+
");
|
755 |
+
}
|
756 |
+
|
757 |
+
// Delete blacklisted URLs if exist
|
758 |
+
$wpdb->query("
|
759 |
+
DELETE $this->gpi_page_blacklist
|
760 |
+
FROM $this->gpi_page_blacklist
|
761 |
+
WHERE $custom_id_where_clause
|
762 |
+
");
|
763 |
+
|
764 |
+
// Delete custom URLs from gpi_custom_urls table
|
765 |
+
$wpdb->query("
|
766 |
+
DELETE $this->gpi_custom_urls
|
767 |
+
FROM $this->gpi_custom_urls
|
768 |
+
WHERE $select_id_where_clause
|
769 |
+
");
|
770 |
+
}
|
771 |
+
|
772 |
+
return $delete_array_count . ' ' . __( 'URLs have been deleted.', 'gpagespeedi' );
|
773 |
+
|
774 |
+
} else if ( ! empty( $this->page_id ) ) {
|
775 |
+
|
776 |
+
// Get the URL for the page being deleted
|
777 |
+
$page_url = $wpdb->get_var( "SELECT URL FROM $this->gpi_custom_urls WHERE ID = $this->page_id" );
|
778 |
+
|
779 |
+
// Get ID for the page to be deleted
|
780 |
+
$page_stats_id = $wpdb->get_var( "SELECT ID FROM $this->gpi_page_stats WHERE URL = '$page_url'" );
|
781 |
+
|
782 |
+
// Delete page stats and page reports if they exist
|
783 |
+
if ( ! empty( $page_stats_id ) ) {
|
784 |
+
$wpdb->query("
|
785 |
+
DELETE $this->gpi_page_stats, $this->gpi_page_reports
|
786 |
+
FROM $this->gpi_page_stats, $this->gpi_page_reports
|
787 |
+
WHERE $this->gpi_page_stats.ID = $this->gpi_page_reports.page_id
|
788 |
+
AND $this->gpi_page_stats.ID = $page_stats_id
|
789 |
+
");
|
790 |
+
}
|
791 |
+
|
792 |
+
// Delete blacklisted URL if exist
|
793 |
+
$wpdb->delete( $this->gpi_page_blacklist, array( 'custom_id' => $this->page_id ), array( '%d' ) );
|
794 |
+
|
795 |
+
// Delete custom URL
|
796 |
+
$wpdb->delete( $this->gpi_custom_urls, array( 'ID' => $this->page_id ), array( '%d' ) );
|
797 |
+
|
798 |
+
return '1 ' . __( 'URLs have been deleted.', 'gpagespeedi' );
|
799 |
+
}
|
800 |
+
}
|
801 |
}
|
802 |
|
803 |
add_action( 'plugins_loaded', array( new GPI_Actions, 'init' ) );
|
classes/class-GPI-Activation.php
CHANGED
@@ -110,6 +110,8 @@ class GPI_Activation
|
|
110 |
$gpi_page_stats_table = $wpdb->prefix . 'gpi_page_stats';
|
111 |
$gpi_page_reports_table = $wpdb->prefix . 'gpi_page_reports';
|
112 |
$gpi_page_blacklist_table = $wpdb->prefix . 'gpi_page_blacklist';
|
|
|
|
|
113 |
$gpi_api_error_logs_table = $wpdb->prefix . 'gpi_api_error_logs';
|
114 |
|
115 |
$charset_collate = $wpdb->get_charset_collate();
|
@@ -157,6 +159,24 @@ class GPI_Activation
|
|
157 |
PRIMARY KEY (ID)
|
158 |
) $charset_collate;";
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
$gpi_api_error_logs = "CREATE TABLE $gpi_api_error_logs_table (
|
161 |
ID bigint(20) NOT NULL AUTO_INCREMENT,
|
162 |
URL text NULL,
|
@@ -171,6 +191,8 @@ class GPI_Activation
|
|
171 |
dbDelta( $gpi_page_stats );
|
172 |
dbDelta( $gpi_page_reports );
|
173 |
dbDelta( $gpi_page_blacklist );
|
|
|
|
|
174 |
dbDelta( $gpi_api_error_logs );
|
175 |
}
|
176 |
|
110 |
$gpi_page_stats_table = $wpdb->prefix . 'gpi_page_stats';
|
111 |
$gpi_page_reports_table = $wpdb->prefix . 'gpi_page_reports';
|
112 |
$gpi_page_blacklist_table = $wpdb->prefix . 'gpi_page_blacklist';
|
113 |
+
$gpi_custom_urls_table = $wpdb->prefix . 'gpi_custom_urls';
|
114 |
+
$gpi_summary_snapshots_table = $wpdb->prefix . 'gpi_summary_snapshots';
|
115 |
$gpi_api_error_logs_table = $wpdb->prefix . 'gpi_api_error_logs';
|
116 |
|
117 |
$charset_collate = $wpdb->get_charset_collate();
|
159 |
PRIMARY KEY (ID)
|
160 |
) $charset_collate;";
|
161 |
|
162 |
+
$gpi_custom_urls = "CREATE TABLE $gpi_custom_urls_table (
|
163 |
+
ID bigint(20) NOT NULL AUTO_INCREMENT,
|
164 |
+
URL text NULL,
|
165 |
+
type varchar(200) DEFAULT NULL,
|
166 |
+
PRIMARY KEY (ID)
|
167 |
+
) $charset_collate;";
|
168 |
+
|
169 |
+
$gpi_summary_snapshots = "CREATE TABLE $gpi_summary_snapshots_table (
|
170 |
+
ID bigint(20) NOT NULL AUTO_INCREMENT,
|
171 |
+
strategy varchar(20) NOT NULL,
|
172 |
+
type varchar(200) DEFAULT NULL,
|
173 |
+
snaptime varchar(20) NOT NULL,
|
174 |
+
comment varchar(200) DEFAULT NULL,
|
175 |
+
summary_stats longtext,
|
176 |
+
summary_reports longtext,
|
177 |
+
PRIMARY KEY (ID)
|
178 |
+
) $charset_collate;";
|
179 |
+
|
180 |
$gpi_api_error_logs = "CREATE TABLE $gpi_api_error_logs_table (
|
181 |
ID bigint(20) NOT NULL AUTO_INCREMENT,
|
182 |
URL text NULL,
|
191 |
dbDelta( $gpi_page_stats );
|
192 |
dbDelta( $gpi_page_reports );
|
193 |
dbDelta( $gpi_page_blacklist );
|
194 |
+
dbDelta( $gpi_custom_urls );
|
195 |
+
dbDelta( $gpi_summary_snapshots );
|
196 |
dbDelta( $gpi_api_error_logs );
|
197 |
}
|
198 |
|
classes/class-GPI-Admin.php
CHANGED
@@ -26,12 +26,15 @@ class GPI_Admin
|
|
26 |
$this->strategy = ( isset( $_GET['strategy'] ) ) ? $_GET['strategy'] : $this->gpi_ui_options['view_preference'];
|
27 |
|
28 |
add_action( 'admin_init', array( $this, 'upgrade_check' ), 10 );
|
|
|
|
|
29 |
add_action( 'admin_menu', array( $this, 'google_pageinsights_menu' ), 10 );
|
30 |
add_action( 'admin_notices', array( $this, 'admin_notice' ) );
|
31 |
add_action( 'plugins_loaded', array( $this, 'register_languages_dir' ) );
|
32 |
add_action( 'admin_enqueue_scripts', array( $this, 'load_GPI_style' ) );
|
33 |
add_action( 'admin_enqueue_scripts', array( $this, 'details_scripts' ) );
|
34 |
add_action( 'admin_enqueue_scripts', array( $this, 'summary_scripts' ) );
|
|
|
35 |
add_action( 'admin_enqueue_scripts', array( $this, 'global_scripts' ) );
|
36 |
add_action( 'admin_footer', array( $this, 'js_templates' ) );
|
37 |
add_action( 'admin_init', array( $this, 'redirect' ), 9 );
|
@@ -42,8 +45,11 @@ class GPI_Admin
|
|
42 |
add_filter( 'gpi_error_logs', array( $this, 'get_error_logs' ), 10, 1 );
|
43 |
add_filter( 'gpi_filter_options', array( $this, 'get_filter_options' ), 10, 2 );
|
44 |
add_filter( 'gpi_custom_post_types', array( $this, 'get_custom_post_types' ), 10, 1 );
|
|
|
|
|
45 |
add_filter( 'gpi_summary_stats', array( $this, 'get_summary_stats' ), 10, 1 );
|
46 |
add_filter( 'gpi_summary_reports', array( $this, 'get_summary_reports' ), 10, 1 );
|
|
|
47 |
|
48 |
load_plugin_textdomain( 'gpagespeedi', false, 'google-pagespeed-insights/translations' );
|
49 |
}
|
@@ -54,9 +60,64 @@ class GPI_Admin
|
|
54 |
GPI_Activation::upgrade( $this->gpi_options, $this->gpi_ui_options );
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
do_action( 'gpi_addon_upgrade_check' );
|
58 |
}
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
public function google_pageinsights_menu()
|
61 |
{
|
62 |
$this->gpi_management_page = add_management_page( 'Google Pagespeed Insights', 'Pagespeed Insights', 'manage_options', 'google-pagespeed-insights', array( $this, 'render_admin_page' ) );
|
@@ -191,6 +252,29 @@ class GPI_Admin
|
|
191 |
);
|
192 |
}
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
public function global_scripts( $hook )
|
195 |
{
|
196 |
if ( $hook != $this->gpi_management_page ) {
|
@@ -227,6 +311,12 @@ class GPI_Admin
|
|
227 |
include_once GPI_DIRECTORY . '/assets/js/templates/summary/scores.php';
|
228 |
break;
|
229 |
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
case apply_filters( 'gpi_custom_js_templates', $_GET['render'] ):
|
231 |
do_action( 'gpi_load_custom_js_template', $_GET['render'] );
|
232 |
break;
|
@@ -320,6 +410,39 @@ class GPI_Admin
|
|
320 |
}
|
321 |
}
|
322 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
$options = apply_filters( 'gpi_custom_filter_options', $options, $flatlist, $this->gpi_options );
|
324 |
|
325 |
if ( ! $flatlist ) {
|
@@ -352,6 +475,40 @@ class GPI_Admin
|
|
352 |
return $cpt;
|
353 |
}
|
354 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
public function get_summary_stats( $summary_stats = array() )
|
356 |
{
|
357 |
global $wpdb;
|
@@ -363,7 +520,7 @@ class GPI_Admin
|
|
363 |
$filter = 'all' != $filter ? $filter : implode( '|', $all_types );
|
364 |
|
365 |
if ( 'gpi_custom_urls' == $filter ) {
|
366 |
-
$filter = apply_filters( '
|
367 |
}
|
368 |
|
369 |
$all_page_stats = $wpdb->get_results( $wpdb->prepare(
|
@@ -459,7 +616,7 @@ class GPI_Admin
|
|
459 |
$filter = 'all' != $filter ? $filter : implode( '|', $all_types );
|
460 |
|
461 |
if ( 'gpi_custom_urls' == $filter ) {
|
462 |
-
$filter = apply_filters( '
|
463 |
}
|
464 |
|
465 |
$all_page_reports = $wpdb->get_results( $wpdb->prepare(
|
@@ -615,12 +772,104 @@ class GPI_Admin
|
|
615 |
if ( $page_reports ) {
|
616 |
foreach ( $page_reports as &$page_report ) {
|
617 |
$page_report['rule_blocks'] = unserialize( $page_report['rule_blocks'] );
|
|
|
|
|
|
|
|
|
618 |
}
|
619 |
}
|
620 |
|
621 |
return $page_reports;
|
622 |
}
|
623 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
624 |
private function sort_array( $array, $key )
|
625 |
{
|
626 |
usort( $array, function( $a, $b ) use ( $key ) {
|
26 |
$this->strategy = ( isset( $_GET['strategy'] ) ) ? $_GET['strategy'] : $this->gpi_ui_options['view_preference'];
|
27 |
|
28 |
add_action( 'admin_init', array( $this, 'upgrade_check' ), 10 );
|
29 |
+
add_action( 'pre_uninstall_plugin', array( $this, 'backup_addon_tables' ), 10, 1 );
|
30 |
+
add_action( 'deleted_plugin', array( $this, 'restore_addon_tables' ), 10, 2 );
|
31 |
add_action( 'admin_menu', array( $this, 'google_pageinsights_menu' ), 10 );
|
32 |
add_action( 'admin_notices', array( $this, 'admin_notice' ) );
|
33 |
add_action( 'plugins_loaded', array( $this, 'register_languages_dir' ) );
|
34 |
add_action( 'admin_enqueue_scripts', array( $this, 'load_GPI_style' ) );
|
35 |
add_action( 'admin_enqueue_scripts', array( $this, 'details_scripts' ) );
|
36 |
add_action( 'admin_enqueue_scripts', array( $this, 'summary_scripts' ) );
|
37 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'snapshot_scripts' ) );
|
38 |
add_action( 'admin_enqueue_scripts', array( $this, 'global_scripts' ) );
|
39 |
add_action( 'admin_footer', array( $this, 'js_templates' ) );
|
40 |
add_action( 'admin_init', array( $this, 'redirect' ), 9 );
|
45 |
add_filter( 'gpi_error_logs', array( $this, 'get_error_logs' ), 10, 1 );
|
46 |
add_filter( 'gpi_filter_options', array( $this, 'get_filter_options' ), 10, 2 );
|
47 |
add_filter( 'gpi_custom_post_types', array( $this, 'get_custom_post_types' ), 10, 1 );
|
48 |
+
add_filter( 'gpi_custom_urls_count', array( $this, 'get_custom_urls_count' ), 10, 1 );
|
49 |
+
add_filter( 'gpi_custom_url_labels', array( $this, 'get_custom_url_labels' ), 10, 1 );
|
50 |
add_filter( 'gpi_summary_stats', array( $this, 'get_summary_stats' ), 10, 1 );
|
51 |
add_filter( 'gpi_summary_reports', array( $this, 'get_summary_reports' ), 10, 1 );
|
52 |
+
add_filter( 'gpi_similar_snapshots', array( $this, 'get_similar_snapshots' ), 10, 2 );
|
53 |
|
54 |
load_plugin_textdomain( 'gpagespeedi', false, 'google-pagespeed-insights/translations' );
|
55 |
}
|
60 |
GPI_Activation::upgrade( $this->gpi_options, $this->gpi_ui_options );
|
61 |
}
|
62 |
|
63 |
+
if ( defined( 'GPIA_PLUGIN_FILE' ) ) {
|
64 |
+
deactivate_plugins( GPIA_PLUGIN_FILE );
|
65 |
+
|
66 |
+
add_action( 'admin_notices', array( $this, 'notify_addon_deactivate' ) );
|
67 |
+
}
|
68 |
+
|
69 |
do_action( 'gpi_addon_upgrade_check' );
|
70 |
}
|
71 |
|
72 |
+
public function backup_addon_tables( $plugin_file )
|
73 |
+
{
|
74 |
+
if ( 'google-pagespeed-insights-addon/google-pagespeed-insights-addon.php' != $plugin_file ) {
|
75 |
+
return;
|
76 |
+
}
|
77 |
+
|
78 |
+
global $wpdb;
|
79 |
+
|
80 |
+
$gpi_summary_snapshots = $wpdb->prefix . 'gpi_summary_snapshots';
|
81 |
+
$gpi_custom_urls = $wpdb->prefix . 'gpi_custom_urls';
|
82 |
+
$gpi_summary_snapshots_backup = $wpdb->prefix . 'gpi_summary_snapshots_backup';
|
83 |
+
$gpi_custom_urls_backup = $wpdb->prefix . 'gpi_custom_urls_backup';
|
84 |
+
|
85 |
+
// Rename current tables
|
86 |
+
$wpdb->query( "RENAME TABLE $gpi_summary_snapshots TO $gpi_summary_snapshots_backup" );
|
87 |
+
$wpdb->query( "RENAME TABLE $gpi_custom_urls TO $gpi_custom_urls_backup" );
|
88 |
+
|
89 |
+
// Create new blank tables so uninstall hook doesn't produce errors
|
90 |
+
$wpdb->query( "CREATE TABLE $gpi_summary_snapshots (id INT(1) )" );
|
91 |
+
$wpdb->query( "CREATE TABLE $gpi_custom_urls (id INT(1) )" );
|
92 |
+
}
|
93 |
+
|
94 |
+
public function restore_addon_tables( $plugin_file, $deleted )
|
95 |
+
{
|
96 |
+
if ( 'google-pagespeed-insights-addon/google-pagespeed-insights-addon.php' != $plugin_file ) {
|
97 |
+
return;
|
98 |
+
}
|
99 |
+
|
100 |
+
global $wpdb;
|
101 |
+
|
102 |
+
$gpi_summary_snapshots = $wpdb->prefix . 'gpi_summary_snapshots';
|
103 |
+
$gpi_custom_urls = $wpdb->prefix . 'gpi_custom_urls';
|
104 |
+
$gpi_summary_snapshots_backup = $wpdb->prefix . 'gpi_summary_snapshots_backup';
|
105 |
+
$gpi_custom_urls_backup = $wpdb->prefix . 'gpi_custom_urls_backup';
|
106 |
+
|
107 |
+
// Rename backed up tables to restore
|
108 |
+
$wpdb->query( "RENAME TABLE $gpi_summary_snapshots_backup TO $gpi_summary_snapshots" );
|
109 |
+
$wpdb->query( "RENAME TABLE $gpi_custom_urls_backup TO $gpi_custom_urls" );
|
110 |
+
}
|
111 |
+
|
112 |
+
public function notify_addon_deactivate()
|
113 |
+
{
|
114 |
+
?>
|
115 |
+
<div class="notice notice-error is-dismissible">
|
116 |
+
<p><?php _e( 'The plugin "Google Pagespeed Insights Addon" has automatically been deactivated. As of v3.0 Google Pagespeed Insights now includes all "addon" functionality for free. The "Google Pagespeed Insights Addon" can be uninstalled from the plugins page.', 'gpagespeedi' ); ?></p>
|
117 |
+
</div>
|
118 |
+
<?php
|
119 |
+
}
|
120 |
+
|
121 |
public function google_pageinsights_menu()
|
122 |
{
|
123 |
$this->gpi_management_page = add_management_page( 'Google Pagespeed Insights', 'Pagespeed Insights', 'manage_options', 'google-pagespeed-insights', array( $this, 'render_admin_page' ) );
|
252 |
);
|
253 |
}
|
254 |
|
255 |
+
public function snapshot_scripts( $hook )
|
256 |
+
{
|
257 |
+
if ( $hook != 'tools_page_google-pagespeed-insights' ) {
|
258 |
+
return;
|
259 |
+
}
|
260 |
+
|
261 |
+
if ( ! isset( $_GET['render'] ) || 'view-snapshot' != $_GET['render'] ) {
|
262 |
+
return;
|
263 |
+
}
|
264 |
+
|
265 |
+
$snapshot_data = $this->get_snapshot_data();
|
266 |
+
$strings = array(
|
267 |
+
'strings' => array(
|
268 |
+
'comment' => __('Comment', 'gpagespeedi')
|
269 |
+
)
|
270 |
+
);
|
271 |
+
|
272 |
+
$localize_data = array_merge( $snapshot_data, $strings );
|
273 |
+
|
274 |
+
wp_enqueue_script( 'gpagespeedi_view_snapshot_js', plugins_url( '/assets/js/view-snapshot.js', GPI_PLUGIN_FILE ), array( 'jquery', 'gpagespeedi_google_charts', 'wp-util' ), '2.0.0' );
|
275 |
+
wp_localize_script( 'gpagespeedi_view_snapshot_js', 'GPI_View_Snapshot', $localize_data );
|
276 |
+
}
|
277 |
+
|
278 |
public function global_scripts( $hook )
|
279 |
{
|
280 |
if ( $hook != $this->gpi_management_page ) {
|
311 |
include_once GPI_DIRECTORY . '/assets/js/templates/summary/scores.php';
|
312 |
break;
|
313 |
|
314 |
+
case 'view-snapshot':
|
315 |
+
include_once GPI_DIRECTORY . '/assets/js/templates/summary/areas_of_improvement.php';
|
316 |
+
include_once GPI_DIRECTORY . '/assets/js/templates/summary/scores.php';
|
317 |
+
include_once GPI_DIRECTORY . '/assets/js/templates/view-snapshot/comment.php';
|
318 |
+
break;
|
319 |
+
|
320 |
case apply_filters( 'gpi_custom_js_templates', $_GET['render'] ):
|
321 |
do_action( 'gpi_load_custom_js_template', $_GET['render'] );
|
322 |
break;
|
410 |
}
|
411 |
}
|
412 |
|
413 |
+
if ( $this->gpi_options['check_custom_urls'] ) {
|
414 |
+
global $wpdb;
|
415 |
+
|
416 |
+
$gpi_custom_urls = $wpdb->prefix . 'gpi_custom_urls';
|
417 |
+
$custom_url_types = $wpdb->get_col(
|
418 |
+
"
|
419 |
+
SELECT DISTINCT type
|
420 |
+
FROM $gpi_custom_urls
|
421 |
+
"
|
422 |
+
);
|
423 |
+
|
424 |
+
if ( ! empty( $custom_url_types ) ) {
|
425 |
+
if ( ! $flatlist ) {
|
426 |
+
$custom_url_options = array( 'gpi_custom_urls' => __( 'All Custom URLs', 'gpagespeedi' ) );
|
427 |
+
}
|
428 |
+
|
429 |
+
foreach ( $custom_url_types as $custom_url_type ) {
|
430 |
+
$custom_url_options[ $custom_url_type ] = $custom_url_type;
|
431 |
+
}
|
432 |
+
|
433 |
+
if ( ! $flatlist ) {
|
434 |
+
$options['custom_urls'] = array(
|
435 |
+
'optgroup_label' => __( 'Custom URLs', 'gpagespeedi' ),
|
436 |
+
'options' => $custom_url_options
|
437 |
+
);
|
438 |
+
} else {
|
439 |
+
if ( ! empty( $custom_url_options ) ) {
|
440 |
+
$options = array_merge( $options, $custom_url_options );
|
441 |
+
}
|
442 |
+
}
|
443 |
+
}
|
444 |
+
}
|
445 |
+
|
446 |
$options = apply_filters( 'gpi_custom_filter_options', $options, $flatlist, $this->gpi_options );
|
447 |
|
448 |
if ( ! $flatlist ) {
|
475 |
return $cpt;
|
476 |
}
|
477 |
|
478 |
+
public function get_custom_urls_count( $url_count )
|
479 |
+
{
|
480 |
+
global $wpdb;
|
481 |
+
|
482 |
+
$gpi_custom_urls = $wpdb->prefix. 'gpi_custom_urls';
|
483 |
+
|
484 |
+
return $wpdb->get_var(
|
485 |
+
"
|
486 |
+
SELECT COUNT(*)
|
487 |
+
FROM $gpi_custom_urls
|
488 |
+
"
|
489 |
+
);
|
490 |
+
}
|
491 |
+
|
492 |
+
public function get_custom_url_labels( $custom_url_labels = false )
|
493 |
+
{
|
494 |
+
global $wpdb;
|
495 |
+
|
496 |
+
$gpi_custom_urls = $wpdb->prefix . 'gpi_custom_urls';
|
497 |
+
|
498 |
+
$custom_url_labels = $wpdb->get_col(
|
499 |
+
"
|
500 |
+
SELECT DISTINCT type
|
501 |
+
FROM $gpi_custom_urls
|
502 |
+
"
|
503 |
+
);
|
504 |
+
|
505 |
+
if ( ! empty( $custom_url_labels ) ) {
|
506 |
+
$custom_url_labels = implode( '|', $custom_url_labels );
|
507 |
+
}
|
508 |
+
|
509 |
+
return $custom_url_labels;
|
510 |
+
}
|
511 |
+
|
512 |
public function get_summary_stats( $summary_stats = array() )
|
513 |
{
|
514 |
global $wpdb;
|
520 |
$filter = 'all' != $filter ? $filter : implode( '|', $all_types );
|
521 |
|
522 |
if ( 'gpi_custom_urls' == $filter ) {
|
523 |
+
$filter = apply_filters( 'gpi_custom_url_labels', false );
|
524 |
}
|
525 |
|
526 |
$all_page_stats = $wpdb->get_results( $wpdb->prepare(
|
616 |
$filter = 'all' != $filter ? $filter : implode( '|', $all_types );
|
617 |
|
618 |
if ( 'gpi_custom_urls' == $filter ) {
|
619 |
+
$filter = apply_filters( 'gpi_custom_url_labels', false );
|
620 |
}
|
621 |
|
622 |
$all_page_reports = $wpdb->get_results( $wpdb->prepare(
|
772 |
if ( $page_reports ) {
|
773 |
foreach ( $page_reports as &$page_report ) {
|
774 |
$page_report['rule_blocks'] = unserialize( $page_report['rule_blocks'] );
|
775 |
+
|
776 |
+
if ( 'OptimizeImages' == $page_report['rule_key'] ) {
|
777 |
+
$page_report['rule_blocks'] = $this->shortpixel_image_rule_blocks( $page_report['rule_blocks'] );
|
778 |
+
}
|
779 |
}
|
780 |
}
|
781 |
|
782 |
return $page_reports;
|
783 |
}
|
784 |
|
785 |
+
private function get_snapshot_data()
|
786 |
+
{
|
787 |
+
global $wpdb;
|
788 |
+
|
789 |
+
$gpi_summary_snapshots = $wpdb->prefix . 'gpi_summary_snapshots';
|
790 |
+
|
791 |
+
if ( isset( $_GET['snapshot_id'] ) ) {
|
792 |
+
$snapshot = $wpdb->get_row( $wpdb->prepare(
|
793 |
+
"
|
794 |
+
SELECT strategy, type, snaptime, comment, summary_stats, summary_reports
|
795 |
+
FROM $gpi_summary_snapshots
|
796 |
+
WHERE ID = %d
|
797 |
+
",
|
798 |
+
$_GET['snapshot_id']
|
799 |
+
), ARRAY_A );
|
800 |
+
} else {
|
801 |
+
$snapshot = false;
|
802 |
+
}
|
803 |
+
|
804 |
+
if ( isset( $_GET['compare_id'] ) ) {
|
805 |
+
$compare_snapshot = $wpdb->get_row( $wpdb->prepare(
|
806 |
+
"
|
807 |
+
SELECT strategy, type, snaptime, comment, summary_stats, summary_reports
|
808 |
+
FROM $gpi_summary_snapshots
|
809 |
+
WHERE ID = %d
|
810 |
+
",
|
811 |
+
$_GET['compare_id']
|
812 |
+
), ARRAY_A );
|
813 |
+
} else {
|
814 |
+
$compare_snapshot = false;
|
815 |
+
}
|
816 |
+
|
817 |
+
return array(
|
818 |
+
'snapshot' => $snapshot,
|
819 |
+
'compare' => $compare_snapshot
|
820 |
+
);
|
821 |
+
}
|
822 |
+
|
823 |
+
public function get_similar_snapshots( $similar_snapshots, $current_snapshot_id )
|
824 |
+
{
|
825 |
+
if ( $current_snapshot_id ) {
|
826 |
+
global $wpdb;
|
827 |
+
|
828 |
+
$gpi_summary_snapshots = $wpdb->prefix . 'gpi_summary_snapshots';
|
829 |
+
|
830 |
+
$current_snapshot = $wpdb->get_row( $wpdb->prepare(
|
831 |
+
"
|
832 |
+
SELECT strategy, type
|
833 |
+
FROM $gpi_summary_snapshots
|
834 |
+
WHERE ID = %d
|
835 |
+
",
|
836 |
+
$current_snapshot_id
|
837 |
+
), ARRAY_A );
|
838 |
+
|
839 |
+
$similar_snapshots = $wpdb->get_results( $wpdb->prepare(
|
840 |
+
"
|
841 |
+
SELECT ID, snaptime
|
842 |
+
FROM $gpi_summary_snapshots
|
843 |
+
WHERE strategy = %s
|
844 |
+
AND type = %s
|
845 |
+
",
|
846 |
+
$current_snapshot['strategy'],
|
847 |
+
$current_snapshot['type']
|
848 |
+
), ARRAY_A );
|
849 |
+
}
|
850 |
+
|
851 |
+
return $similar_snapshots;
|
852 |
+
}
|
853 |
+
|
854 |
+
private function shortpixel_image_rule_blocks( $rule_blocks )
|
855 |
+
{
|
856 |
+
if ( ! isset( $rule_blocks[0]['urls'] ) ) {
|
857 |
+
return $rule_blocks;
|
858 |
+
}
|
859 |
+
|
860 |
+
foreach ( $rule_blocks as $index => $rule_block ) {
|
861 |
+
foreach ( $rule_block['urls'] as $key => $rule ) {
|
862 |
+
$rule_blocks[ $index ]['urls'][ $key ] = preg_replace(
|
863 |
+
'/(?:href=")(.*?)(?:")/',
|
864 |
+
'href="https://shortpixel.com/gpi/af/PCFTWNN142247?site-url=$1"',
|
865 |
+
$rule
|
866 |
+
);
|
867 |
+
}
|
868 |
+
}
|
869 |
+
|
870 |
+
return $rule_blocks;
|
871 |
+
}
|
872 |
+
|
873 |
private function sort_array( $array, $key )
|
874 |
{
|
875 |
usort( $array, function( $a, $b ) use ( $key ) {
|
classes/class-GPI-Core.php
CHANGED
@@ -692,6 +692,9 @@ class GPI_Core
|
|
692 |
$format = str_replace( '{{END_LINK}}', '</a>', $format );
|
693 |
break;
|
694 |
|
|
|
|
|
|
|
695 |
default:
|
696 |
$format = str_replace( '{{' . $key . '}}', $value, $format );
|
697 |
break;
|
692 |
$format = str_replace( '{{END_LINK}}', '</a>', $format );
|
693 |
break;
|
694 |
|
695 |
+
case 'URL':
|
696 |
+
$format = str_replace( '{{URL}}', '<a href="' . $value . '" target="_blank">' . $value . '</a>', $format );
|
697 |
+
|
698 |
default:
|
699 |
$format = str_replace( '{{' . $key . '}}', $value, $format );
|
700 |
break;
|
classes/class-GPI-List-Table.php
CHANGED
@@ -55,6 +55,16 @@ class GPI_List_Table extends WP_List_Table
|
|
55 |
$this->db_columns = array( 'ID', 'URL', 'type' );
|
56 |
break;
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
case apply_filters( 'gpi_list_table_custom_case_1_type', 'reserved_for_internal_use' ):
|
59 |
$this->table = apply_filters( 'gpi_list_table_custom_case_1_table', 'reserved_for_internal_use' );
|
60 |
$this->db_columns = apply_filters( 'gpi_list_table_custom_case_1_db_columns', 'reserved_for_internal_use' );
|
@@ -70,19 +80,9 @@ class GPI_List_Table extends WP_List_Table
|
|
70 |
$this->db_columns = apply_filters( 'gpi_list_table_custom_case_3_db_columns', 'reserved_for_internal_use' );
|
71 |
break;
|
72 |
|
73 |
-
case apply_filters( 'gpi_list_table_custom_case_4_type', '
|
74 |
-
$this->table = apply_filters( 'gpi_list_table_custom_case_4_table', '
|
75 |
-
$this->db_columns = apply_filters( 'gpi_list_table_custom_case_4_db_columns', '
|
76 |
-
break;
|
77 |
-
|
78 |
-
case apply_filters( 'gpi_list_table_custom_case_5_type', 'reserved_for_internal_use' ):
|
79 |
-
$this->table = apply_filters( 'gpi_list_table_custom_case_5_table', 'reserved_for_internal_use' );
|
80 |
-
$this->db_columns = apply_filters( 'gpi_list_table_custom_case_5_db_columns', 'reserved_for_internal_use' );
|
81 |
-
break;
|
82 |
-
|
83 |
-
case apply_filters( 'gpi_list_table_custom_case_6_type', 'available_for_custom_integration' ):
|
84 |
-
$this->table = apply_filters( 'gpi_list_table_custom_case_6_table', 'available_for_custom_integration' );
|
85 |
-
$this->db_columns = apply_filters( 'gpi_list_table_custom_case_6_db_columns', 'available_for_custom_integration' );
|
86 |
break;
|
87 |
|
88 |
default:
|
@@ -150,6 +150,14 @@ class GPI_List_Table extends WP_List_Table
|
|
150 |
_e( 'No Ignored URLs found. A URL can be ignored from the <a href="?page=' . $_REQUEST['page'] . '&render=report-list">Report List</a> page if you would like to remove it from report pages', 'gpagespeedi' );
|
151 |
break;
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
case apply_filters( 'gpi_list_table_custom_case_1_type', 'reserved_for_internal_use' ):
|
154 |
echo apply_filters( 'gpi_list_table_custom_case_1_no_items', 'reserved_for_internal_use' );
|
155 |
break;
|
@@ -162,16 +170,8 @@ class GPI_List_Table extends WP_List_Table
|
|
162 |
echo apply_filters( 'gpi_list_table_custom_case_3_no_items', 'reserved_for_internal_use' );
|
163 |
break;
|
164 |
|
165 |
-
case apply_filters( 'gpi_list_table_custom_case_4_type', '
|
166 |
-
echo apply_filters( 'gpi_list_table_custom_case_4_no_items', '
|
167 |
-
break;
|
168 |
-
|
169 |
-
case apply_filters( 'gpi_list_table_custom_case_5_type', 'reserved_for_internal_use' ):
|
170 |
-
echo apply_filters( 'gpi_list_table_custom_case_5_no_items', 'reserved_for_internal_use' );
|
171 |
-
break;
|
172 |
-
|
173 |
-
case apply_filters( 'gpi_list_table_custom_case_6_type', 'available_for_custom_integration' ):
|
174 |
-
echo apply_filters( 'gpi_list_table_custom_case_6_no_items', 'available_for_custom_integration' );
|
175 |
break;
|
176 |
|
177 |
default:
|
@@ -218,6 +218,49 @@ class GPI_List_Table extends WP_List_Table
|
|
218 |
case 'type':
|
219 |
return $item[ $column_name ];
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
case apply_filters( 'gpi_custom_column', $column_name ):
|
222 |
return apply_filters( 'gpi_custom_column_config', $column_name, $item );
|
223 |
|
@@ -241,11 +284,11 @@ class GPI_List_Table extends WP_List_Table
|
|
241 |
$actions['delete_report'] = '<a href="' . wp_nonce_url( $actions['delete_report'], 'bulk-gpi_page_reports' ) . '">'.__( 'Delete', 'gpagespeedi' ) . '</a>';
|
242 |
|
243 |
return sprintf( '<a href="?page=%3$s&render=%4$s&page_id=%5$s">%1$s</a> %2$s',
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
);
|
250 |
}
|
251 |
|
@@ -263,8 +306,8 @@ class GPI_List_Table extends WP_List_Table
|
|
263 |
$actions['delete_blacklist'] = '<a href="' . wp_nonce_url( $actions['delete_blacklist'], 'bulk-gpi_page_reports' ) . '">'.__( 'Delete', 'gpagespeedi' ) . '</a>';
|
264 |
|
265 |
return sprintf( '%1$s %2$s',
|
266 |
-
|
267 |
-
|
268 |
);
|
269 |
}
|
270 |
|
@@ -298,8 +341,8 @@ class GPI_List_Table extends WP_List_Table
|
|
298 |
{
|
299 |
return sprintf(
|
300 |
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
|
301 |
-
|
302 |
-
|
303 |
);
|
304 |
}
|
305 |
|
@@ -314,6 +357,24 @@ class GPI_List_Table extends WP_List_Table
|
|
314 |
);
|
315 |
break;
|
316 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
case apply_filters( 'gpi_list_table_custom_case_1_type', 'reserved_for_internal_use' ):
|
318 |
$columns = apply_filters( 'gpi_list_table_custom_case_1_columns', 'reserved_for_internal_use' );
|
319 |
break;
|
@@ -326,16 +387,8 @@ class GPI_List_Table extends WP_List_Table
|
|
326 |
$columns = apply_filters( 'gpi_list_table_custom_case_3_columns', 'reserved_for_internal_use' );
|
327 |
break;
|
328 |
|
329 |
-
case apply_filters( 'gpi_list_table_custom_case_4_type', '
|
330 |
-
$columns = apply_filters( 'gpi_list_table_custom_case_4_columns', '
|
331 |
-
break;
|
332 |
-
|
333 |
-
case apply_filters( 'gpi_list_table_custom_case_5_type', 'reserved_for_internal_use' ):
|
334 |
-
$columns = apply_filters( 'gpi_list_table_custom_case_5_columns', 'reserved_for_internal_use' );
|
335 |
-
break;
|
336 |
-
|
337 |
-
case apply_filters( 'gpi_list_table_custom_case_6_type', 'available_for_custom_integration' ):
|
338 |
-
$columns = apply_filters( 'gpi_list_table_custom_case_6_columns', 'available_for_custom_integration' );
|
339 |
break;
|
340 |
|
341 |
default:
|
@@ -383,6 +436,20 @@ class GPI_List_Table extends WP_List_Table
|
|
383 |
);
|
384 |
break;
|
385 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
case apply_filters( 'gpi_list_table_custom_case_1_type', 'reserved_for_internal_use' ):
|
387 |
$sortable_columns = apply_filters( 'gpi_list_table_custom_case_1_sortable_columns', 'reserved_for_internal_use' );
|
388 |
break;
|
@@ -395,16 +462,8 @@ class GPI_List_Table extends WP_List_Table
|
|
395 |
$sortable_columns = apply_filters( 'gpi_list_table_custom_case_3_sortable_columns', 'reserved_for_internal_use' );
|
396 |
break;
|
397 |
|
398 |
-
case apply_filters( 'gpi_list_table_custom_case_4_type', '
|
399 |
-
$sortable_columns = apply_filters( 'gpi_list_table_custom_case_4_sortable_columns', '
|
400 |
-
break;
|
401 |
-
|
402 |
-
case apply_filters( 'gpi_list_table_custom_case_5_type', 'reserved_for_internal_use' ):
|
403 |
-
$sortable_columns = apply_filters( 'gpi_list_table_custom_case_5_sortable_columns', 'reserved_for_internal_use' );
|
404 |
-
break;
|
405 |
-
|
406 |
-
case apply_filters( 'gpi_list_table_custom_case_6_type', 'available_for_custom_integration' ):
|
407 |
-
$sortable_columns = apply_filters( 'gpi_list_table_custom_case_6_sortable_columns', 'available_for_custom_integration' );
|
408 |
break;
|
409 |
|
410 |
default:
|
@@ -438,6 +497,18 @@ class GPI_List_Table extends WP_List_Table
|
|
438 |
);
|
439 |
break;
|
440 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
case apply_filters( 'gpi_list_table_custom_case_1_type', 'reserved_for_internal_use' ):
|
442 |
$actions = apply_filters( 'gpi_list_table_custom_case_1_bulk_actions', 'reserved_for_internal_use' );
|
443 |
break;
|
@@ -450,16 +521,8 @@ class GPI_List_Table extends WP_List_Table
|
|
450 |
$actions = apply_filters( 'gpi_list_table_custom_case_3_bulk_actions', 'reserved_for_internal_use' );
|
451 |
break;
|
452 |
|
453 |
-
case apply_filters( 'gpi_list_table_custom_case_4_type', '
|
454 |
-
$actions = apply_filters( 'gpi_list_table_custom_case_4_bulk_actions', '
|
455 |
-
break;
|
456 |
-
|
457 |
-
case apply_filters( 'gpi_list_table_custom_case_5_type', 'reserved_for_internal_use' ):
|
458 |
-
$actions = apply_filters( 'gpi_list_table_custom_case_5_bulk_actions', 'reserved_for_internal_use' );
|
459 |
-
break;
|
460 |
-
|
461 |
-
case apply_filters( 'gpi_list_table_custom_case_6_type', 'available_for_custom_integration' ):
|
462 |
-
$actions = apply_filters( 'gpi_list_table_custom_case_6_bulk_actions', 'available_for_custom_integration' );
|
463 |
break;
|
464 |
|
465 |
default:
|
@@ -526,6 +589,11 @@ class GPI_List_Table extends WP_List_Table
|
|
526 |
submit_button( __( 'Filter', 'gpagespeedi' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
|
527 |
?>
|
528 |
|
|
|
|
|
|
|
|
|
|
|
529 |
<?php do_action( 'gpi_after_tablenav', $_GET['render'] ); ?>
|
530 |
|
531 |
</div>
|
@@ -546,7 +614,7 @@ class GPI_List_Table extends WP_List_Table
|
|
546 |
if ( 'default' == $this->type ) {
|
547 |
$filter = isset( $_GET['filter'] ) ? $_GET['filter'] : 'all';
|
548 |
$filter = 'all' != $filter ? $filter : implode( '|', $all_types );
|
549 |
-
$filter = 'gpi_custom_urls' != $filter ? $filter : apply_filters( '
|
550 |
|
551 |
$data = $wpdb->get_results( $wpdb->prepare(
|
552 |
"
|
55 |
$this->db_columns = array( 'ID', 'URL', 'type' );
|
56 |
break;
|
57 |
|
58 |
+
case 'snapshots':
|
59 |
+
$this->table = $wpdb->prefix . 'gpi_summary_snapshots';
|
60 |
+
$this->db_columns = array( 'ID', 'strategy', 'type', 'snaptime', 'comment' );
|
61 |
+
break;
|
62 |
+
|
63 |
+
case 'custom-urls':
|
64 |
+
$this->table = $wpdb->prefix . 'gpi_custom_urls';
|
65 |
+
$this->db_columns = array( 'ID', 'URL', 'type' );
|
66 |
+
break;
|
67 |
+
|
68 |
case apply_filters( 'gpi_list_table_custom_case_1_type', 'reserved_for_internal_use' ):
|
69 |
$this->table = apply_filters( 'gpi_list_table_custom_case_1_table', 'reserved_for_internal_use' );
|
70 |
$this->db_columns = apply_filters( 'gpi_list_table_custom_case_1_db_columns', 'reserved_for_internal_use' );
|
80 |
$this->db_columns = apply_filters( 'gpi_list_table_custom_case_3_db_columns', 'reserved_for_internal_use' );
|
81 |
break;
|
82 |
|
83 |
+
case apply_filters( 'gpi_list_table_custom_case_4_type', 'available_for_custom_integration' ):
|
84 |
+
$this->table = apply_filters( 'gpi_list_table_custom_case_4_table', 'available_for_custom_integration' );
|
85 |
+
$this->db_columns = apply_filters( 'gpi_list_table_custom_case_4_db_columns', 'available_for_custom_integration' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
break;
|
87 |
|
88 |
default:
|
150 |
_e( 'No Ignored URLs found. A URL can be ignored from the <a href="?page=' . $_REQUEST['page'] . '&render=report-list">Report List</a> page if you would like to remove it from report pages', 'gpagespeedi' );
|
151 |
break;
|
152 |
|
153 |
+
case 'snapshots':
|
154 |
+
_e( 'No Snapshots found. Snapshots can be created from the', 'gpagespeedi' ) . ' ' . '<a href="?page=' . $_REQUEST['page'] . '&render=summary">' . __( 'Report Summary', 'gpagespeedi' ) . '</a>' . ' ' . __( 'page', 'gpagespeedi' ) . '.';
|
155 |
+
break;
|
156 |
+
|
157 |
+
case 'custom-urls':
|
158 |
+
_e( 'No Custom URLs found. Click "Add New URLs" or "Bulk Upload New URLs" above to add custom URLs.', 'gpagespeedi' );
|
159 |
+
break;
|
160 |
+
|
161 |
case apply_filters( 'gpi_list_table_custom_case_1_type', 'reserved_for_internal_use' ):
|
162 |
echo apply_filters( 'gpi_list_table_custom_case_1_no_items', 'reserved_for_internal_use' );
|
163 |
break;
|
170 |
echo apply_filters( 'gpi_list_table_custom_case_3_no_items', 'reserved_for_internal_use' );
|
171 |
break;
|
172 |
|
173 |
+
case apply_filters( 'gpi_list_table_custom_case_4_type', 'available_for_custom_integration' ):
|
174 |
+
echo apply_filters( 'gpi_list_table_custom_case_4_no_items', 'available_for_custom_integration' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
break;
|
176 |
|
177 |
default:
|
218 |
case 'type':
|
219 |
return $item[ $column_name ];
|
220 |
|
221 |
+
case 'custom_url':
|
222 |
+
$actions = array(
|
223 |
+
'delete' => sprintf( '?page=%s&render=%s&action=%s&page_id=%s', $_REQUEST['page'], 'custom-urls', 'delete', $item['ID'] ),
|
224 |
+
'visit' => sprintf( '<a href="%s" target="_blank">%s</a>', $item['URL'], __( 'View URL', 'gpagespeedi' ) )
|
225 |
+
);
|
226 |
+
|
227 |
+
$nonced_url = wp_nonce_url( $actions['delete'], 'bulk-gpi_page_reports' );
|
228 |
+
$actions['delete'] = '<a href="' . $nonced_url . '">' . __( 'Delete', 'gpagespeedi') . '</a>';
|
229 |
+
|
230 |
+
return sprintf( '%1$s %2$s',
|
231 |
+
$item['URL'],
|
232 |
+
$this->row_actions( $actions )
|
233 |
+
);
|
234 |
+
|
235 |
+
case 'snaptime':
|
236 |
+
$date = $item['snaptime'];
|
237 |
+
$date = date( 'M d, Y - h:i a', $date );
|
238 |
+
|
239 |
+
$actions = array(
|
240 |
+
'delete' => sprintf( '?page=%s&render=%s&action=%s&snapshot_id=%s' ,$_REQUEST['page'], 'snapshots', 'delete-snapshot', $item['ID'] ),
|
241 |
+
'view' => sprintf( '<a href="?page=%s&render=%s&snapshot_id=%s">%s</a>' , $_REQUEST['page'], 'view-snapshot', $item['ID'], __( 'View Snapshot', 'gpagespeedi' ) )
|
242 |
+
);
|
243 |
+
|
244 |
+
$nonced_url = wp_nonce_url( $actions['delete'], 'bulk-gpi_page_reports' );
|
245 |
+
$actions['delete'] = '<a href="' . $nonced_url . '">' . __('Delete', 'gpagespeedi') . '</a>';
|
246 |
+
|
247 |
+
|
248 |
+
return sprintf( '<a href="?page=%1$s&render=%2$s&snapshot_id=%3$s">%4$s</a> %5$s',
|
249 |
+
$_REQUEST['page'],
|
250 |
+
'view-snapshot',
|
251 |
+
$item['ID'],
|
252 |
+
$date,
|
253 |
+
$this->row_actions( $actions )
|
254 |
+
);
|
255 |
+
|
256 |
+
case 'snapfilter':
|
257 |
+
$filter = $item['type'];
|
258 |
+
$filter_search = array( 'all', 'page', 'post', 'category', 'gpi_custom_posts-', 'gpi_custom_urls-', 'gpi_custom_posts', 'gpi_custom_urls' );
|
259 |
+
$filter_replace = array( __( 'All Reports', 'gpagespeedi' ), __( 'Pages', 'gpagespeedi' ), __( 'Posts', 'gpagespeedi' ), __( 'Categories', 'gpagespeedi' ), '', '', __( 'All Custom Post Types', 'gpagespeedi' ), __( 'All Custom URLs', 'gpagespeedi' ) );
|
260 |
+
$cleaned_filter = str_replace( $filter_search, $filter_replace, $filter );
|
261 |
+
|
262 |
+
return $cleaned_filter;
|
263 |
+
|
264 |
case apply_filters( 'gpi_custom_column', $column_name ):
|
265 |
return apply_filters( 'gpi_custom_column_config', $column_name, $item );
|
266 |
|
284 |
$actions['delete_report'] = '<a href="' . wp_nonce_url( $actions['delete_report'], 'bulk-gpi_page_reports' ) . '">'.__( 'Delete', 'gpagespeedi' ) . '</a>';
|
285 |
|
286 |
return sprintf( '<a href="?page=%3$s&render=%4$s&page_id=%5$s">%1$s</a> %2$s',
|
287 |
+
$cleaned_url,
|
288 |
+
$this->row_actions( $actions ),
|
289 |
+
$_REQUEST['page'],
|
290 |
+
'details',
|
291 |
+
$item['ID']
|
292 |
);
|
293 |
}
|
294 |
|
306 |
$actions['delete_blacklist'] = '<a href="' . wp_nonce_url( $actions['delete_blacklist'], 'bulk-gpi_page_reports' ) . '">'.__( 'Delete', 'gpagespeedi' ) . '</a>';
|
307 |
|
308 |
return sprintf( '%1$s %2$s',
|
309 |
+
$cleaned_url,
|
310 |
+
$this->row_actions( $actions )
|
311 |
);
|
312 |
}
|
313 |
|
341 |
{
|
342 |
return sprintf(
|
343 |
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
|
344 |
+
$this->_args['singular'],
|
345 |
+
$item['ID']
|
346 |
);
|
347 |
}
|
348 |
|
357 |
);
|
358 |
break;
|
359 |
|
360 |
+
case 'snapshots':
|
361 |
+
$columns = array(
|
362 |
+
'cb' => '<input type="checkbox" />',
|
363 |
+
'snaptime' => __( 'Snapshot Date', 'gpagespeedi' ),
|
364 |
+
'snapfilter' => __( 'Report Description', 'gpagespeedi' ),
|
365 |
+
'strategy' => __( 'Report Type', 'gpagespeedi' ),
|
366 |
+
'comment' => __( 'Comment', 'gpagespeedi' )
|
367 |
+
);
|
368 |
+
break;
|
369 |
+
|
370 |
+
case 'custom-urls':
|
371 |
+
$columns = array(
|
372 |
+
'cb' => '<input type="checkbox" />',
|
373 |
+
'custom_url' => __( 'Custom URL', 'gpagespeedi' ),
|
374 |
+
'type' => __( 'Page Type', 'gpagespeedi' )
|
375 |
+
);
|
376 |
+
break;
|
377 |
+
|
378 |
case apply_filters( 'gpi_list_table_custom_case_1_type', 'reserved_for_internal_use' ):
|
379 |
$columns = apply_filters( 'gpi_list_table_custom_case_1_columns', 'reserved_for_internal_use' );
|
380 |
break;
|
387 |
$columns = apply_filters( 'gpi_list_table_custom_case_3_columns', 'reserved_for_internal_use' );
|
388 |
break;
|
389 |
|
390 |
+
case apply_filters( 'gpi_list_table_custom_case_4_type', 'available_for_custom_integration' ):
|
391 |
+
$columns = apply_filters( 'gpi_list_table_custom_case_4_columns', 'available_for_custom_integration' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
break;
|
393 |
|
394 |
default:
|
436 |
);
|
437 |
break;
|
438 |
|
439 |
+
case 'snapshots':
|
440 |
+
$sortable_columns = array(
|
441 |
+
'snaptime' => array( 'snaptime', false ),
|
442 |
+
'snapfilter' => array( 'type', false ),
|
443 |
+
'strategy' => array( 'strategy', false )
|
444 |
+
);
|
445 |
+
break;
|
446 |
+
|
447 |
+
case 'custom-urls':
|
448 |
+
$sortable_columns = array(
|
449 |
+
'type' => array( 'type', false )
|
450 |
+
);
|
451 |
+
break;
|
452 |
+
|
453 |
case apply_filters( 'gpi_list_table_custom_case_1_type', 'reserved_for_internal_use' ):
|
454 |
$sortable_columns = apply_filters( 'gpi_list_table_custom_case_1_sortable_columns', 'reserved_for_internal_use' );
|
455 |
break;
|
462 |
$sortable_columns = apply_filters( 'gpi_list_table_custom_case_3_sortable_columns', 'reserved_for_internal_use' );
|
463 |
break;
|
464 |
|
465 |
+
case apply_filters( 'gpi_list_table_custom_case_4_type', 'available_for_custom_integration' ):
|
466 |
+
$sortable_columns = apply_filters( 'gpi_list_table_custom_case_4_sortable_columns', 'available_for_custom_integration' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
break;
|
468 |
|
469 |
default:
|
497 |
);
|
498 |
break;
|
499 |
|
500 |
+
case 'snapshots':
|
501 |
+
$actions = array(
|
502 |
+
'delete-snapshot' => __( 'Delete', 'gpagespeedi' )
|
503 |
+
);
|
504 |
+
break;
|
505 |
+
|
506 |
+
case 'custom-urls':
|
507 |
+
$actions = array(
|
508 |
+
'delete' => __( 'Delete', 'gpagespeedi' )
|
509 |
+
);
|
510 |
+
break;
|
511 |
+
|
512 |
case apply_filters( 'gpi_list_table_custom_case_1_type', 'reserved_for_internal_use' ):
|
513 |
$actions = apply_filters( 'gpi_list_table_custom_case_1_bulk_actions', 'reserved_for_internal_use' );
|
514 |
break;
|
521 |
$actions = apply_filters( 'gpi_list_table_custom_case_3_bulk_actions', 'reserved_for_internal_use' );
|
522 |
break;
|
523 |
|
524 |
+
case apply_filters( 'gpi_list_table_custom_case_4_type', 'available_for_custom_integration' ):
|
525 |
+
$actions = apply_filters( 'gpi_list_table_custom_case_4_bulk_actions', 'available_for_custom_integration' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
526 |
break;
|
527 |
|
528 |
default:
|
589 |
submit_button( __( 'Filter', 'gpagespeedi' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
|
590 |
?>
|
591 |
|
592 |
+
<?php if ( 'custom-urls' == $_GET['render'] ) : ?>
|
593 |
+
<a href="?page=<?php echo $_REQUEST['page']; ?>&render=add-custom-urls" class="button-secondary"><?php _e( 'Add New URLs', 'gpagespeedi' ); ?></a>
|
594 |
+
<a href="?page=<?php echo $_REQUEST['page']; ?>&render=add-custom-urls-bulk" class="button-secondary"><?php _e( 'Bulk Upload New URLs', 'gpagespeedi' ); ?></a>
|
595 |
+
<?php endif; ?>
|
596 |
+
|
597 |
<?php do_action( 'gpi_after_tablenav', $_GET['render'] ); ?>
|
598 |
|
599 |
</div>
|
614 |
if ( 'default' == $this->type ) {
|
615 |
$filter = isset( $_GET['filter'] ) ? $_GET['filter'] : 'all';
|
616 |
$filter = 'all' != $filter ? $filter : implode( '|', $all_types );
|
617 |
+
$filter = 'gpi_custom_urls' != $filter ? $filter : apply_filters( 'gpi_custom_url_labels', $filter );
|
618 |
|
619 |
$data = $wpdb->get_results( $wpdb->prepare(
|
620 |
"
|
classes/class-GPI-Uninstall.php
CHANGED
@@ -22,11 +22,15 @@ class GPI_Uninstall
|
|
22 |
$gpi_page_stats = $wpdb->prefix . 'gpi_page_stats';
|
23 |
$gpi_page_reports = $wpdb->prefix . 'gpi_page_reports';
|
24 |
$gpi_page_blacklist = $wpdb->prefix . 'gpi_page_blacklist';
|
|
|
|
|
25 |
$gpi_api_error_logs = $wpdb->prefix . 'gpi_api_error_logs';
|
26 |
|
27 |
$wpdb->query( "DROP TABLE $gpi_page_stats" );
|
28 |
$wpdb->query( "DROP TABLE $gpi_page_reports" );
|
29 |
$wpdb->query( "DROP TABLE $gpi_page_blacklist" );
|
|
|
|
|
30 |
$wpdb->query( "DROP TABLE $gpi_api_error_logs" );
|
31 |
|
32 |
delete_option('gpagespeedi_options');
|
@@ -35,6 +39,7 @@ class GPI_Uninstall
|
|
35 |
delete_option('gpi_progress');
|
36 |
|
37 |
wp_clear_scheduled_hook( 'gpi_prune_logs' );
|
|
|
38 |
}
|
39 |
|
40 |
}
|
22 |
$gpi_page_stats = $wpdb->prefix . 'gpi_page_stats';
|
23 |
$gpi_page_reports = $wpdb->prefix . 'gpi_page_reports';
|
24 |
$gpi_page_blacklist = $wpdb->prefix . 'gpi_page_blacklist';
|
25 |
+
$gpi_custom_urls = $wpdb->prefix . 'gpi_custom_urls';
|
26 |
+
$gpi_summary_snapshots = $wpdb->prefix . 'gpi_summary_snapshots';
|
27 |
$gpi_api_error_logs = $wpdb->prefix . 'gpi_api_error_logs';
|
28 |
|
29 |
$wpdb->query( "DROP TABLE $gpi_page_stats" );
|
30 |
$wpdb->query( "DROP TABLE $gpi_page_reports" );
|
31 |
$wpdb->query( "DROP TABLE $gpi_page_blacklist" );
|
32 |
+
$wpdb->query( "DROP TABLE $gpi_custom_urls" );
|
33 |
+
$wpdb->query( "DROP TABLE $gpi_summary_snapshots" );
|
34 |
$wpdb->query( "DROP TABLE $gpi_api_error_logs" );
|
35 |
|
36 |
delete_option('gpagespeedi_options');
|
39 |
delete_option('gpi_progress');
|
40 |
|
41 |
wp_clear_scheduled_hook( 'gpi_prune_logs' );
|
42 |
+
wp_clear_scheduled_hook( 'googlepagespeedinsightsworker' );
|
43 |
}
|
44 |
|
45 |
}
|
documentation/index.html
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
<body>
|
18 |
<div class="container">
|
19 |
|
20 |
-
<h3 class="center alt">Google Pagespeed Insights for Wordpress v2.
|
21 |
|
22 |
<hr>
|
23 |
|
@@ -150,12 +150,10 @@
|
|
150 |
|
151 |
<h4 style="font-weight: bold;">Scheduling and URL Configuration:</h4>
|
152 |
|
153 |
-
<h5 style="color: red;">Note: Features Marked with Asterisk are not available in the free version.</h5>
|
154 |
-
|
155 |
<ol>
|
156 |
-
<li><strong
|
157 |
-
<li><strong
|
158 |
-
<li><strong>Configure which types of URLs to check</strong>: Choices include: Pages, Posts, Category Indexes,
|
159 |
</ol>
|
160 |
|
161 |
<h5 style="color: red;">Note: It takes a number of seconds for Google to check each page. Checking 500 pages may take approximately 30+ minutes for example. Keep this in mind when choosing which types of pages you wish to include in your reports. Some Custom Post Types generate MANY posts and should probably be avoided. Such as the bbPress Reply Custom Post Type.</h5>
|
@@ -194,8 +192,6 @@
|
|
194 |
<img src="assets/images/snapshots.png" alt="Snapshots" /></li>
|
195 |
<br />
|
196 |
|
197 |
-
<h5 style="color: red;">Note: This feature is not available in the free version of Google Pagespeed Insights for Wordpress</h5>
|
198 |
-
|
199 |
<p>The Report Snapshot tool builds on the power of Report Summaries, to provide historical “Point In Time” data about your website.</p>
|
200 |
|
201 |
<p>Take a snapshot of any Report Summary screen to store that data for future retrieval. Add comments to your snapshots to provide additional meaning, such as “Before Installing W3 Total Cache.” Additionally, filter a Report Summary before taking a Snapshot to save a summary of the filtered data.</p>
|
@@ -234,8 +230,6 @@
|
|
234 |
<img src="assets/images/custom_urls.png" alt="Custom URLs" /></li>
|
235 |
<br />
|
236 |
|
237 |
-
<h5 style="color: red;">Note: This feature is not available in the free version of Google Pagespeed Insights for Wordpress</h5>
|
238 |
-
|
239 |
<p>Easily add additional URLs for inclusion in Pagespeed Reports. Even add URLs for non-Wordpress sites, even if they are not hosted on your server. URLs can be added manually, or upload a properly formatted XML sitemap to add multiple pages at once.</p>
|
240 |
|
241 |
<p>Custom URLs can be tagged and filtered in Report Summaries. Take Report Snapshots of your Custom URLs just like you would with any other report type.</p>
|
17 |
<body>
|
18 |
<div class="container">
|
19 |
|
20 |
+
<h3 class="center alt">Google Pagespeed Insights for Wordpress v2.x Documentation by Matt Keys</h3>
|
21 |
|
22 |
<hr>
|
23 |
|
150 |
|
151 |
<h4 style="font-weight: bold;">Scheduling and URL Configuration:</h4>
|
152 |
|
|
|
|
|
153 |
<ol>
|
154 |
+
<li><strong>Automatically re-check Pagespeed Insights scores using a schedule</strong>: Schedule the Google Pagespeed Insights plugin to automatically find new pages, and recheck existing pages.</li>
|
155 |
+
<li><strong>Recheck Schedule</strong>: Recheck Schedule can be set to Daily, Weekly, Bi-Monthly, and Monthly.</li>
|
156 |
+
<li><strong>Configure which types of URLs to check</strong>: Choices include: Pages, Posts, Category Indexes, Custom URLs, Custom Post Types</li>
|
157 |
</ol>
|
158 |
|
159 |
<h5 style="color: red;">Note: It takes a number of seconds for Google to check each page. Checking 500 pages may take approximately 30+ minutes for example. Keep this in mind when choosing which types of pages you wish to include in your reports. Some Custom Post Types generate MANY posts and should probably be avoided. Such as the bbPress Reply Custom Post Type.</h5>
|
192 |
<img src="assets/images/snapshots.png" alt="Snapshots" /></li>
|
193 |
<br />
|
194 |
|
|
|
|
|
195 |
<p>The Report Snapshot tool builds on the power of Report Summaries, to provide historical “Point In Time” data about your website.</p>
|
196 |
|
197 |
<p>Take a snapshot of any Report Summary screen to store that data for future retrieval. Add comments to your snapshots to provide additional meaning, such as “Before Installing W3 Total Cache.” Additionally, filter a Report Summary before taking a Snapshot to save a summary of the filtered data.</p>
|
230 |
<img src="assets/images/custom_urls.png" alt="Custom URLs" /></li>
|
231 |
<br />
|
232 |
|
|
|
|
|
233 |
<p>Easily add additional URLs for inclusion in Pagespeed Reports. Even add URLs for non-Wordpress sites, even if they are not hosted on your server. URLs can be added manually, or upload a properly formatted XML sitemap to add multiple pages at once.</p>
|
234 |
|
235 |
<p>Custom URLs can be tagged and filtered in Report Summaries. Take Report Snapshots of your Custom URLs just like you would with any other report type.</p>
|
google-pagespeed-insights.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Google Pagespeed Insights
|
|
4 |
Plugin URI: http://mattkeys.me
|
5 |
Description: Google Pagespeed Insights
|
6 |
Author: Matt Keys
|
7 |
-
Version:
|
8 |
Author URI: http://mattkeys.me
|
9 |
*/
|
10 |
|
@@ -40,7 +40,7 @@ if ( ! defined( 'GPI_PUBLIC_PATH' ) ) {
|
|
40 |
|
41 |
// Internal version number
|
42 |
if ( ! defined( 'GPI_VERSION' ) ) {
|
43 |
-
define( 'GPI_VERSION', '
|
44 |
}
|
45 |
|
46 |
if ( is_admin() ) {
|
4 |
Plugin URI: http://mattkeys.me
|
5 |
Description: Google Pagespeed Insights
|
6 |
Author: Matt Keys
|
7 |
+
Version: 3.0.0
|
8 |
Author URI: http://mattkeys.me
|
9 |
*/
|
10 |
|
40 |
|
41 |
// Internal version number
|
42 |
if ( ! defined( 'GPI_VERSION' ) ) {
|
43 |
+
define( 'GPI_VERSION', '3.0.0' );
|
44 |
}
|
45 |
|
46 |
if ( is_admin() ) {
|
readme.txt
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
=== Google Pagespeed Insights ===
|
2 |
Contributors: mattkeys
|
3 |
-
|
4 |
-
Tags: SEO, seo, performance, speed, google, search engine optimization, pagespeed, google page speed, page speed, pagespeed insights, google pagespeed insights
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.8
|
7 |
Stable tag: trunk
|
@@ -14,13 +13,7 @@ Use Google Pagespeed Insights to increase your sites performance, your search en
|
|
14 |
|
15 |
Google Pagespeed Insights is a tool that empowers you to make decisions that increase the performance of your website. Recommendations from Google Pagespeed are based upon current industry best practices for desktop and mobile web performance.
|
16 |
|
17 |
-
Through the addition of advanced data visualization, tagging, filtering, and snapshot technology, Google Pagespeed Insights for
|
18 |
-
|
19 |
-
= Additional Languages =
|
20 |
-
|
21 |
-
* (v1.x translation) Russian Translation provided by: Ivanka from [coupofy.com](http://coupofy.com)
|
22 |
-
* (v1.x translation) Spanish Translation provided by: Ogi Djuraskovic from [firstsiteguide.com](http://firstsiteguide.com)
|
23 |
-
* (v1.x translation) Serbian Translation provided by: Ogi Djuraskovic from [firstsiteguide.com](http://firstsiteguide.com)
|
24 |
|
25 |
= Detailed Page Reporting =
|
26 |
|
@@ -38,11 +31,42 @@ Best practices for site performance differ greatly between Desktop and Mobile de
|
|
38 |
|
39 |
Toggle back and forth between report types to see specific suggestions for improving the performance and experience on each platform.
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
== Installation ==
|
42 |
|
43 |
-
1. Login to your
|
44 |
2. Navigate to the Plugins screen and then click the "Add New" button
|
45 |
-
3. Click on the "Upload" link near the top of the page and browse for the Google Pagespeed Insights for
|
46 |
4. Upload the file, and click "Activate Plugin" after the installation completes
|
47 |
5. Congratulations, installation is complete; proceed to configuration.
|
48 |
|
@@ -55,7 +79,7 @@ Google Pagespeed Insights requires a Google API Key. Keys are free and can be ob
|
|
55 |
1. Navigate to https://code.google.com/apis/console
|
56 |
2. Login with your Google Account (Create a Google account if you do not have one)
|
57 |
3. Create a new API Key and enable the Google Pagespeed Insights API* (see note about restrictions)
|
58 |
-
4. Paste your API Key into the Options page of Google Pagespeed Insights for
|
59 |
|
60 |
* Try first creating the API key without any 'restrictions'. In my testing there seems to be a bug with using restricitons with the Pagespeed API.
|
61 |
|
@@ -107,11 +131,15 @@ Google Pagespeed Insights requires a Google API Key. Keys are free and can be ob
|
|
107 |
|
108 |
1. Filter reports by Pages, Posts, Category Indexes, or Custom Post Types. Sort Report Lists by Page Score to see your highest and lowest performing pages.
|
109 |
2. Seperate reports for Desktop and Mobile page reports. Check each report to receive platform specific recommendations to increase your sites performance.
|
110 |
-
3. Configure Google Report Language, Report Types, and choose which
|
111 |
4. View in-depth report details for recommendations on increasing your sites performance.
|
112 |
|
113 |
== Changelog ==
|
114 |
|
|
|
|
|
|
|
|
|
115 |
= 2.0.3 =
|
116 |
* Updating to latest google api php library 2.2.0 to resolve issues with PHP 7.1
|
117 |
|
@@ -121,7 +149,7 @@ Google Pagespeed Insights requires a Google API Key. Keys are free and can be ob
|
|
121 |
= 2.0.1 =
|
122 |
* Removed phpseclib unit tests from Google PHP API library to avoid false-positive with WordFence
|
123 |
|
124 |
-
= 2.0 =
|
125 |
* Major rewrite for better compatibility and performance
|
126 |
* Updated to the latest Google Pagespeed Insights API verison and library
|
127 |
* Fixed issues with bulk installers not generating DB tables
|
@@ -162,6 +190,10 @@ Google Pagespeed Insights requires a Google API Key. Keys are free and can be ob
|
|
162 |
|
163 |
== Upgrade Notice ==
|
164 |
|
|
|
|
|
|
|
|
|
165 |
= 2.0.3 =
|
166 |
* Updating to latest google api php library 2.2.0 to resolve issues with PHP 7.1
|
167 |
|
@@ -171,7 +203,7 @@ Google Pagespeed Insights requires a Google API Key. Keys are free and can be ob
|
|
171 |
= 2.0.1 =
|
172 |
* Removed phpseclib unit tests from Google PHP API library to avoid false-positive with WordFence
|
173 |
|
174 |
-
= 2.0 =
|
175 |
* Major rewrite for better compatibility and performance
|
176 |
* Updated to the latest Google Pagespeed Insights API verison and library
|
177 |
* Fixed issues with bulk installers not generating DB tables
|
1 |
=== Google Pagespeed Insights ===
|
2 |
Contributors: mattkeys
|
3 |
+
Tags: SEO, performance, speed, page speed, search engine optimization, pagespeed, google page speed, pagespeed insights, google pagespeed insights
|
|
|
4 |
Requires at least: 3.6
|
5 |
Tested up to: 4.8
|
6 |
Stable tag: trunk
|
13 |
|
14 |
Google Pagespeed Insights is a tool that empowers you to make decisions that increase the performance of your website. Recommendations from Google Pagespeed are based upon current industry best practices for desktop and mobile web performance.
|
15 |
|
16 |
+
Through the addition of advanced data visualization, tagging, filtering, and snapshot technology, Google Pagespeed Insights for WordPress provides a comprehensive solution for any webmaster looking to increase their site performance, their search engine ranking, and their visitors browsing experience.
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
= Detailed Page Reporting =
|
19 |
|
31 |
|
32 |
Toggle back and forth between report types to see specific suggestions for improving the performance and experience on each platform.
|
33 |
|
34 |
+
= Report Snapshots =
|
35 |
+
|
36 |
+
The Report Snapshot tool builds on the power of Report Summaries, to provide historical “Point In Time” data about your website.
|
37 |
+
|
38 |
+
Take a snapshot of any Report Summary screen to store that data for future retrieval. Add comments to your snapshots to provide additional meaning, such as “Before Installing W3 Total Cache.” Additionally, filter a Report Summary before taking a Snapshot to save a summary of the filtered data.
|
39 |
+
|
40 |
+
= Snapshot Comparison Tool =
|
41 |
+
|
42 |
+
The Snapshot Comparison Tool is an amazing utility that lets you visualize side-by-side results from any two similar Report Snapshots.
|
43 |
+
|
44 |
+
Take a Report Snapshot before installing new plugins, or before implementing performance recommendations. Take another snapshot when you are finished and compare your results to measure the effect of your changes.
|
45 |
+
|
46 |
+
= Add/Import Custom URLs =
|
47 |
+
|
48 |
+
Easily add additional URLs for inclusion in Pagespeed Reports. Even add URLs for non-WordPress sites, even if they are not hosted on your server. URLs can be added manually, or upload a properly formatted XML sitemap to add multiple pages at once.
|
49 |
+
|
50 |
+
Custom URLs can be tagged and filtered in Report Summaries. Take Report Snapshots of your Custom URLs just like you would with any other report type.
|
51 |
+
|
52 |
+
= Scheduled Report Checks =
|
53 |
+
|
54 |
+
Configure Google Pagespeed Insights for WordPress to automatically recheck your site on a Daily, Weekly, Bi-Monthly, or Monthly basis.
|
55 |
+
|
56 |
+
With each scan, any new pages or posts will be discovered, and existing reports will be updated to reflect any changes to your site, as well as any changes in the Pagespeed recommendations.
|
57 |
+
|
58 |
+
= Additional Languages =
|
59 |
+
|
60 |
+
* (v1.x translation) Russian Translation provided by: Ivanka from [coupofy.com](http://coupofy.com)
|
61 |
+
* (v1.x translation) Spanish Translation provided by: Ogi Djuraskovic from [firstsiteguide.com](http://firstsiteguide.com)
|
62 |
+
* (v1.x translation) Serbian Translation provided by: Ogi Djuraskovic from [firstsiteguide.com](http://firstsiteguide.com)
|
63 |
+
|
64 |
+
|
65 |
== Installation ==
|
66 |
|
67 |
+
1. Login to your WordPress Admin page (usually http://yourdomain.com/wp-admin)
|
68 |
2. Navigate to the Plugins screen and then click the "Add New" button
|
69 |
+
3. Click on the "Upload" link near the top of the page and browse for the Google Pagespeed Insights for WordPress zip file
|
70 |
4. Upload the file, and click "Activate Plugin" after the installation completes
|
71 |
5. Congratulations, installation is complete; proceed to configuration.
|
72 |
|
79 |
1. Navigate to https://code.google.com/apis/console
|
80 |
2. Login with your Google Account (Create a Google account if you do not have one)
|
81 |
3. Create a new API Key and enable the Google Pagespeed Insights API* (see note about restrictions)
|
82 |
+
4. Paste your API Key into the Options page of Google Pagespeed Insights for WordPress
|
83 |
|
84 |
* Try first creating the API key without any 'restrictions'. In my testing there seems to be a bug with using restricitons with the Pagespeed API.
|
85 |
|
131 |
|
132 |
1. Filter reports by Pages, Posts, Category Indexes, or Custom Post Types. Sort Report Lists by Page Score to see your highest and lowest performing pages.
|
133 |
2. Seperate reports for Desktop and Mobile page reports. Check each report to receive platform specific recommendations to increase your sites performance.
|
134 |
+
3. Configure Google Report Language, Report Types, and choose which WordPress URLs to run reports on.
|
135 |
4. View in-depth report details for recommendations on increasing your sites performance.
|
136 |
|
137 |
== Changelog ==
|
138 |
|
139 |
+
= 3.0.0 =
|
140 |
+
* Includes all previously "premium" functionality for free. This includes report snapshots, snapshot comparison tool, custom URL reporting, and scheduled report checks.
|
141 |
+
* Added in URL hotlinking in report details for paths to assets (images/scripts/etc)
|
142 |
+
|
143 |
= 2.0.3 =
|
144 |
* Updating to latest google api php library 2.2.0 to resolve issues with PHP 7.1
|
145 |
|
149 |
= 2.0.1 =
|
150 |
* Removed phpseclib unit tests from Google PHP API library to avoid false-positive with WordFence
|
151 |
|
152 |
+
= 2.0.0 =
|
153 |
* Major rewrite for better compatibility and performance
|
154 |
* Updated to the latest Google Pagespeed Insights API verison and library
|
155 |
* Fixed issues with bulk installers not generating DB tables
|
190 |
|
191 |
== Upgrade Notice ==
|
192 |
|
193 |
+
= 3.0.0 =
|
194 |
+
* Includes all previously "premium" functionality for free. This includes report snapshots, snapshot comparison tool, custom URL reporting, and scheduled report checks.
|
195 |
+
* Added in URL hotlinking in report details for paths to assets (images/scripts/etc)
|
196 |
+
|
197 |
= 2.0.3 =
|
198 |
* Updating to latest google api php library 2.2.0 to resolve issues with PHP 7.1
|
199 |
|
203 |
= 2.0.1 =
|
204 |
* Removed phpseclib unit tests from Google PHP API library to avoid false-positive with WordFence
|
205 |
|
206 |
+
= 2.0.0 =
|
207 |
* Major rewrite for better compatibility and performance
|
208 |
* Updated to the latest Google Pagespeed Insights API verison and library
|
209 |
* Fixed issues with bulk installers not generating DB tables
|
templates/about.php
DELETED
@@ -1,139 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Template - About
|
4 |
-
*/
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
-
exit;
|
8 |
-
}
|
9 |
-
|
10 |
-
?>
|
11 |
-
|
12 |
-
<div class="framed boxsizing">
|
13 |
-
<div class="boxheader large">
|
14 |
-
<span class="left about"><?php _e( 'About Google Pagespeed Insights for Wordpress', 'gpagespeedi' ); ?></span>
|
15 |
-
</div>
|
16 |
-
<div class="padded">
|
17 |
-
|
18 |
-
<p><?php _e( 'Google Pagespeed Insights is a tool that empowers you to make decisions that increase the performance of your website by expanding on the existing technology of Google Pagespeeds recommendations for current industry best practices for desktop and mobile web performance.', 'gpagespeedi' ); ?></p>
|
19 |
-
<p><?php _e( 'Through the addition of advanced data visualization, tagging, filtering, and snapshot technology, Google Pagespeed Insights for WordPress provides a comprehensive solution for any webmaster looking to increase their site performance, search engine ranking, and visitors browsing experience.', 'gpagespeedi' ); ?></p>
|
20 |
-
|
21 |
-
<h2 dir="ltr">
|
22 |
-
<?php _e( 'Compare Versions', 'gpagespeedi' ); ?>
|
23 |
-
</h2>
|
24 |
-
<table class="tblGenFixed" dir="ltr" id="tblMain" border="0" cellspacing="0" cellpadding="0">
|
25 |
-
<thead>
|
26 |
-
<tr class="head" dir="ltr">
|
27 |
-
<th class="s0 col1"></th>
|
28 |
-
<th class="s1 col2" dir="ltr"><?php _e( 'Free Edition', 'gpagespeedi' ); ?></th>
|
29 |
-
<th class="s1 col3" dir="ltr"><a href="http://mattkeys.me/products/google-pagespeed-insights/" target="_blank"><?php _e( 'Premium Edition', 'gpagespeedi' ); ?></a></th>
|
30 |
-
<th class="s1 col4" dir="ltr"><a href="http://mattkeys.me/products/google-pagespeed-insights/" target="_blank"><?php _e( 'Agency Edition', 'gpagespeedi' ); ?></a></th>
|
31 |
-
</tr>
|
32 |
-
</thead>
|
33 |
-
<tbody>
|
34 |
-
<tr dir="ltr">
|
35 |
-
<td class="s2 col1" dir="ltr"><a href="http://mattkeys.me/products/google-pagespeed-insights/" target="_blank"><?php _e( 'Detailed Page Reporting', 'gpagespeedi' ); ?></a></td>
|
36 |
-
<td class="s3 col2" dir="ltr">
|
37 |
-
<span class="checkmark">X</span>
|
38 |
-
</td>
|
39 |
-
<td class="s3 col3" dir="ltr">
|
40 |
-
<span class="checkmark">X</span>
|
41 |
-
</td>
|
42 |
-
<td class="s3 col4" dir="ltr">
|
43 |
-
<span class="checkmark">X</span>
|
44 |
-
</td>
|
45 |
-
</tr>
|
46 |
-
<tr dir="ltr">
|
47 |
-
<td class="s2 col1" dir="ltr"><a href="http://mattkeys.me/products/google-pagespeed-insights/" target="_blank"><?php _e( 'Report Summaries', 'gpagespeedi' ); ?></a></td>
|
48 |
-
<td class="s3 col2" dir="ltr">
|
49 |
-
<span class="checkmark">X</span>
|
50 |
-
</td>
|
51 |
-
<td class="s3 col3" dir="ltr">
|
52 |
-
<span class="checkmark">X</span>
|
53 |
-
</td>
|
54 |
-
<td class="s3 col4" dir="ltr">
|
55 |
-
<span class="checkmark">X</span>
|
56 |
-
</td>
|
57 |
-
</tr>
|
58 |
-
<tr dir="ltr">
|
59 |
-
<td class="s2 col1" dir="ltr"><a href="http://mattkeys.me/products/google-pagespeed-insights/" target="_blank"><?php _e( 'Report Snapshots', 'gpagespeedi' ); ?></a></td>
|
60 |
-
<td class="s3 col2" dir="ltr"></td>
|
61 |
-
<td class="s3 col3" dir="ltr">
|
62 |
-
<span class="checkmark">X</span>
|
63 |
-
</td>
|
64 |
-
<td class="s3 col4" dir="ltr">
|
65 |
-
<span class="checkmark">X</span>
|
66 |
-
</td>
|
67 |
-
</tr>
|
68 |
-
<tr dir="ltr">
|
69 |
-
<td class="s2 col1" dir="ltr"><a href="http://mattkeys.me/products/google-pagespeed-insights/" target="_blank"><?php _e( 'Snapshot Comparison Tool', 'gpagespeedi' ); ?></a></td>
|
70 |
-
<td class="s3 col2" dir="ltr"></td>
|
71 |
-
<td class="s3 col3" dir="ltr">
|
72 |
-
<span class="checkmark">X</span>
|
73 |
-
</td>
|
74 |
-
<td class="s3 col4" dir="ltr">
|
75 |
-
<span class="checkmark">X</span>
|
76 |
-
</td>
|
77 |
-
</tr>
|
78 |
-
<tr dir="ltr">
|
79 |
-
<td class="s2 col1" dir="ltr"><a href="http://mattkeys.me/products/google-pagespeed-insights/" target="_blank"><?php _e( 'Add/Import Custom URLs', 'gpagespeedi' ); ?></a></td>
|
80 |
-
<td class="s3 col2" dir="ltr"></td>
|
81 |
-
<td class="s3 col3" dir="ltr">
|
82 |
-
<span class="checkmark">X</span>
|
83 |
-
</td>
|
84 |
-
<td class="s3 col4" dir="ltr">
|
85 |
-
<span class="checkmark">X</span>
|
86 |
-
</td>
|
87 |
-
</tr>
|
88 |
-
<tr dir="ltr">
|
89 |
-
<td class="s2 col1" dir="ltr"><a href="http://mattkeys.me/products/google-pagespeed-insights/" target="_blank"><?php _e( 'Desktop and Mobile Page Reports', 'gpagespeedi' ); ?></a></td>
|
90 |
-
<td class="s3 col2" dir="ltr">
|
91 |
-
<span class="checkmark">X</span>
|
92 |
-
</td>
|
93 |
-
<td class="s3 col3" dir="ltr">
|
94 |
-
<span class="checkmark">X</span>
|
95 |
-
</td>
|
96 |
-
<td class="s3 col4" dir="ltr">
|
97 |
-
<span class="checkmark">X</span>
|
98 |
-
</td>
|
99 |
-
</tr>
|
100 |
-
<tr dir="ltr">
|
101 |
-
<td class="s2 col1" dir="ltr"><a href="http://mattkeys.me/products/google-pagespeed-insights/" target="_blank"><?php _e( 'Scheduled Report Checks', 'gpagespeedi' ); ?></a></td>
|
102 |
-
<td class="s3 col2" dir="ltr"></td>
|
103 |
-
<td class="s3 col3" dir="ltr">
|
104 |
-
<span class="checkmark">X</span>
|
105 |
-
</td>
|
106 |
-
<td class="s3 col4" dir="ltr">
|
107 |
-
<span class="checkmark">X</span>
|
108 |
-
</td>
|
109 |
-
</tr>
|
110 |
-
<tr dir="ltr">
|
111 |
-
<td class="s2 col1" dir="ltr"><?php _e( 'Site Licenses', 'gpagespeedi' ); ?></td>
|
112 |
-
<td class="s3 col2" dir="ltr"><?php _e( 'N/A', 'gpagespeedi' ); ?></td>
|
113 |
-
<td class="s3 col3" dir="ltr"><?php _e( '1', 'gpagespeedi' ); ?></td>
|
114 |
-
<td class="s3 col4" dir="ltr"><?php _e( 'Unlimited**', 'gpagespeedi' ); ?></td>
|
115 |
-
</tr>
|
116 |
-
<tr class="support" dir="ltr">
|
117 |
-
<td class="s2 col1" dir="ltr"><?php _e( 'Support', 'gpagespeedi' ); ?></td>
|
118 |
-
<td class="s3 col2" dir="ltr"><?php _e( 'N/A', 'gpagespeedi' ); ?></td>
|
119 |
-
<td class="s3 col3" dir="ltr"><?php _e( 'Forum Based', 'gpagespeedi' ); ?></td>
|
120 |
-
<td class="s3 col4" dir="ltr"><?php _e( 'Email & Forum Based', 'gpagespeedi' ); ?></td>
|
121 |
-
</tr>
|
122 |
-
<tr class="price" dir="ltr">
|
123 |
-
<td class="s2 col1" dir="ltr"><?php _e( 'Price', 'gpagespeedi' ); ?></td>
|
124 |
-
<td class="s3 col2" dir="ltr">
|
125 |
-
<?php _e( 'Installed', 'gpagespeedi' ); ?>
|
126 |
-
</td>
|
127 |
-
<td class="s5 col3">
|
128 |
-
$29.99
|
129 |
-
</td>
|
130 |
-
<td class="s5 col4">
|
131 |
-
$189.99
|
132 |
-
</td>
|
133 |
-
</tr>
|
134 |
-
</tbody>
|
135 |
-
</table>
|
136 |
-
<p><?php _e( '** Use Google Pagespeed Insights for Wordpress on any site that you own or manage.', 'gpagespeedi' ); ?></p>
|
137 |
-
<br />
|
138 |
-
</div>
|
139 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/add-custom-urls-bulk.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template - Bulk Upload New URLs
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
|
12 |
+
<form method="post" action="" enctype="multipart/form-data">
|
13 |
+
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'];?>" />
|
14 |
+
<input type="hidden" name="render" value="add-custom-urls-bulk" />
|
15 |
+
<input type="hidden" name="action" value="add-custom-urls-bulk" />
|
16 |
+
|
17 |
+
<?php wp_nonce_field('gpi-add-custom-urls'); ?>
|
18 |
+
|
19 |
+
<div class="framed boxsizing">
|
20 |
+
<div class="boxheader large">
|
21 |
+
<span class="left add"><?php _e( 'Bulk Upload Custom URLs', 'gpagespeedi' ); ?></span>
|
22 |
+
</div>
|
23 |
+
<div class="padded">
|
24 |
+
|
25 |
+
<p><?php _e( 'Add any valid URL, even from sites outside of WordPress. Upload a properly formatted XML sitemap below to add pages.', 'gpagespeedi' ); ?></p>
|
26 |
+
<p><?php _e( 'XML must conform to the <a href="http://www.sitemaps.org/protocol.html" target="_blank">sitemaps.org standards</a>. There are free services that can help you generate a sitemap such as', 'gpagespeedi' ); ?> <a href="http://www.xml-sitemaps.com/" target="_blank">http://www.xml-sitemaps.com/</a>.</p>
|
27 |
+
|
28 |
+
<table class="form-table">
|
29 |
+
<tbody>
|
30 |
+
<tr valign="top">
|
31 |
+
<th scope="row">
|
32 |
+
<label for="custom_url_label"><?php _e( 'Custom URL Label', 'gpagespeedi' ); ?>:</label>
|
33 |
+
</th>
|
34 |
+
<td>
|
35 |
+
<input type="text" maxlength="20" name="custom_url_label" id="custom_url_label" placeholder="Custom Label" class="regular-text code" />
|
36 |
+
<p class="description"><?php _e( 'Choose a custom label for your new URLs, this will be used later when sorting your reports.', 'gpagespeedi' ); ?><br /><span style="color:red"><?php _e( 'Max 20 Charactors, Alpha-Numeric Only. Spaces will be replaced with underscores', 'gpagespeedi' ); ?></span></p>
|
37 |
+
</td>
|
38 |
+
</tr>
|
39 |
+
<tr valign="top">
|
40 |
+
<th scope="row">
|
41 |
+
<label for="xml_sitemap"><?php _e( 'XML Sitemap File', 'gpagespeedi' ); ?>:</label>
|
42 |
+
</th>
|
43 |
+
<td>
|
44 |
+
<input type="file" name="xml_sitemap" id="xml_sitemap" />
|
45 |
+
</td>
|
46 |
+
</tr>
|
47 |
+
</tbody>
|
48 |
+
</table>
|
49 |
+
<br />
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
<?php submit_button( __( 'Submit Sitemap', 'gpagespeedi' ) ); ?>
|
53 |
+
</form>
|
templates/add-custom-urls.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template - Add Custom URLs
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
|
12 |
+
<form method="post" action="">
|
13 |
+
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'];?>" />
|
14 |
+
<input type="hidden" name="render" value="add-custom-urls" />
|
15 |
+
<input type="hidden" name="action" value="add-custom-urls" />
|
16 |
+
|
17 |
+
<?php wp_nonce_field('gpi-add-custom-urls'); ?>
|
18 |
+
|
19 |
+
<div class="framed boxsizing">
|
20 |
+
<div class="boxheader large">
|
21 |
+
<span class="left add"><?php _e( 'Add Custom URLs', 'gpagespeedi' ); ?></span>
|
22 |
+
</div>
|
23 |
+
<div class="padded">
|
24 |
+
|
25 |
+
<p><?php _e( 'Add any valid URL, even from sites outside of WordPress. Enter up to 10 URLs below. If you need to enter a lot of URLs check out the', 'gpagespeedi' ); ?> <a href="?page=<?php echo $_REQUEST['page'];?>&render=add-custom-urls-bulk"><?php _e( 'Bulk URL uploader', 'gpagespeedi' ); ?></a>.</p>
|
26 |
+
|
27 |
+
<table class="form-table">
|
28 |
+
<tbody>
|
29 |
+
<tr valign="top">
|
30 |
+
<th scope="row">
|
31 |
+
<label for="custom_url_label"><?php _e( 'Custom URL Label', 'gpagespeedi' ); ?>:</label>
|
32 |
+
</th>
|
33 |
+
<td>
|
34 |
+
<input type="text" maxlength="20" name="custom_url_label" id="custom_url_label" placeholder="Custom Label" class="regular-text code" />
|
35 |
+
<p class="description"><?php _e( 'Choose a custom label for your new URLs, this will be used later when sorting your reports.', 'gpagespeedi' ); ?><br /><span style="color:red"><?php _e( 'Max 20 Charactors, Alpha-Numeric Only. Spaces will be replaced with underscores', 'gpagespeedi' ); ?></span></p>
|
36 |
+
</td>
|
37 |
+
</tr>
|
38 |
+
<tr valign="top">
|
39 |
+
<th scope="row">
|
40 |
+
<label ><?php _e( 'Custom URLs', 'gpagespeedi' ); ?>:</label>
|
41 |
+
</th>
|
42 |
+
<td>
|
43 |
+
<?php
|
44 |
+
for ( $x = 0; $x < 10; $x++ ) :
|
45 |
+
?>
|
46 |
+
<input type="text" name="custom_urls[]" id="custom_urls" placeholder="Custom URL" class="regular-text code" />
|
47 |
+
<?php
|
48 |
+
endfor;
|
49 |
+
?>
|
50 |
+
</td>
|
51 |
+
</tr>
|
52 |
+
</tbody>
|
53 |
+
</table>
|
54 |
+
<br />
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
<?php submit_button( __( 'Submit URLs', 'gpagespeedi' ) ); ?>
|
58 |
+
</form>
|
templates/custom-urls.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template - Custom URLs
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
require_once GPI_DIRECTORY . '/classes/class-GPI-List-Table.php';
|
11 |
+
|
12 |
+
$GPI_List_Table = new GPI_List_Table( 'custom-urls' );
|
13 |
+
$GPI_List_Table->prepare_items();
|
14 |
+
?>
|
15 |
+
|
16 |
+
<form id="reports-filter" action="" method="get">
|
17 |
+
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
|
18 |
+
<input type="hidden" name="render" value="custom-urls" />
|
19 |
+
|
20 |
+
<?php $GPI_List_Table->display(); ?>
|
21 |
+
</form>
|
templates/options.php
CHANGED
@@ -83,18 +83,32 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
83 |
</div>
|
84 |
<div class="padded hidden">
|
85 |
|
86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
-
<p><label for="recheck_interval"><?php
|
89 |
<select name="recheck_interval" id="recheck_interval">
|
90 |
<option value="<?php echo DAY_IN_SECONDS;?>" <?php selected( $this->gpi_options['recheck_interval'], DAY_IN_SECONDS ); ?>><?php _e( '1 Day', 'gpagespeedi' ); ?></option>
|
91 |
<option value="<?php echo WEEK_IN_SECONDS;?>" <?php selected( $this->gpi_options['recheck_interval'], WEEK_IN_SECONDS ); ?>><?php _e( '7 Days', 'gpagespeedi' ); ?></option>
|
92 |
<option value="<?php echo MONTH_IN_SECONDS / 2;?>" <?php selected( $this->gpi_options['recheck_interval'], MONTH_IN_SECONDS / 2 ); ?>><?php _e( '15 Days', 'gpagespeedi' ); ?></option>
|
93 |
<option value="<?php echo MONTH_IN_SECONDS;?>" <?php selected( $this->gpi_options['recheck_interval'], MONTH_IN_SECONDS ); ?>><?php _e( '30 Days', 'gpagespeedi' ); ?></option>
|
94 |
</select>
|
95 |
-
<p class="description"><?php
|
96 |
|
97 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
<hr>
|
100 |
<p><h4><?php _e( 'Configure which types of URLs should be checked when running reports.', 'gpagespeedi' ); ?></h4></p>
|
@@ -112,7 +126,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
112 |
<label for="check_categories"><?php _e( 'Check Category Indexes', 'gpagespeedi' ); ?> (<?php echo count( get_categories() ) ?>)</label>
|
113 |
</p>
|
114 |
|
115 |
-
|
|
|
|
|
|
|
116 |
|
117 |
<?php
|
118 |
$custom_post_types = apply_filters( 'gpi_custom_post_types', array() );
|
83 |
</div>
|
84 |
<div class="padded hidden">
|
85 |
|
86 |
+
<p><h4><?php _e( 'Choose wether or not Google Pagespeed Insights should automatically re-check page scores, and if so, how often.', 'gpagespeedi' ); ?></h4></p>
|
87 |
+
<p class="checkbx">
|
88 |
+
<input type="checkbox" name="use_schedule" id="use_schedule" <?php checked( $this->gpi_options['use_schedule'] ); ?>/>
|
89 |
+
<label for="use_schedule"><?php _e( 'Automatically re-check Pagespeed Insights scores using a schedule', 'gpagespeedi' ); ?></label>
|
90 |
+
<?php if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) : ?>
|
91 |
+
<p class="description"><strong><?php _e( 'Notice', 'gpagespeedi' ); ?>:</strong> <?php _e( 'The WP Cron service this plugin uses to check pages is disabled. Hosting providers often disable the WP Cron service and run their own manual Cron service on an interval of their choosing. Contact your hosting provider if scheduled checks fail to run.', 'gpagespeedi' ); ?></p>
|
92 |
+
<?php endif; ?>
|
93 |
+
</p>
|
94 |
|
95 |
+
<p><label for="recheck_interval"><?php _e( 'Report Expiration / Recheck Interval', 'gpagespeedi' ); ?>:</label></p>
|
96 |
<select name="recheck_interval" id="recheck_interval">
|
97 |
<option value="<?php echo DAY_IN_SECONDS;?>" <?php selected( $this->gpi_options['recheck_interval'], DAY_IN_SECONDS ); ?>><?php _e( '1 Day', 'gpagespeedi' ); ?></option>
|
98 |
<option value="<?php echo WEEK_IN_SECONDS;?>" <?php selected( $this->gpi_options['recheck_interval'], WEEK_IN_SECONDS ); ?>><?php _e( '7 Days', 'gpagespeedi' ); ?></option>
|
99 |
<option value="<?php echo MONTH_IN_SECONDS / 2;?>" <?php selected( $this->gpi_options['recheck_interval'], MONTH_IN_SECONDS / 2 ); ?>><?php _e( '15 Days', 'gpagespeedi' ); ?></option>
|
100 |
<option value="<?php echo MONTH_IN_SECONDS;?>" <?php selected( $this->gpi_options['recheck_interval'], MONTH_IN_SECONDS ); ?>><?php _e( '30 Days', 'gpagespeedi' ); ?></option>
|
101 |
</select>
|
102 |
+
<p class="description"><?php _e( 'When page reporting is running, pages which are newer than the specified Report Expiration will be skipped.', 'gpagespeedi' ) . '<br />' . __( 'If "Automatically re-check Pagespeed Insights scores" is checked above, this option will control its frequency.', 'gpagespeedi' ); ?></p>
|
103 |
|
104 |
+
<?php
|
105 |
+
$timestamp = wp_next_scheduled( 'googlepagespeedinsightsworker' );
|
106 |
+
if ( $timestamp ) {
|
107 |
+
?>
|
108 |
+
<p><strong><?php _e( 'Next Scheduled Check', 'gpagespeedi' ); ?></strong>: <?php echo get_date_from_gmt( gmdate( 'Y-m-d H:i:s', $timestamp ), 'F, d @ g:i a' ); ?></p>
|
109 |
+
<?php
|
110 |
+
}
|
111 |
+
?>
|
112 |
|
113 |
<hr>
|
114 |
<p><h4><?php _e( 'Configure which types of URLs should be checked when running reports.', 'gpagespeedi' ); ?></h4></p>
|
126 |
<label for="check_categories"><?php _e( 'Check Category Indexes', 'gpagespeedi' ); ?> (<?php echo count( get_categories() ) ?>)</label>
|
127 |
</p>
|
128 |
|
129 |
+
<p class="checkbx">
|
130 |
+
<input type="checkbox" name="check_custom_urls" id="check_custom_urls" <?php checked( $this->gpi_options['check_custom_urls'] ); ?>/>
|
131 |
+
<label for="check_custom_urls"><?php _e( 'Check Custom URLs', 'gpagespeedi' ); ?> (<?php echo $custom_urls_count = apply_filters( 'gpi_custom_urls_count', 0 ); ?>)</label>
|
132 |
+
</p>
|
133 |
|
134 |
<?php
|
135 |
$custom_post_types = apply_filters( 'gpi_custom_post_types', array() );
|
templates/parts/messages.php
CHANGED
@@ -52,10 +52,16 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
52 |
<p><strong><?php _e( 'This referrer or IP address is restricted from using your API Key. To change your API Key restrictions, please visit the', 'gpagespeedi' ); ?> <a href="https://code.google.com/apis/console/" target="_blank"><?php _e( 'Google API Console', 'gpagespeedi' ); ?></a></strong>.</p>
|
53 |
</div>
|
54 |
<?php endif; ?>
|
55 |
-
<?php if ( $action_message = $this->gpi_ui_options['action_message'] ) :
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
<?php endif; ?>
|
60 |
<?php if ( $error_message = get_option('gpi_error_message') ) : ?>
|
61 |
<div id="message" class="error">
|
52 |
<p><strong><?php _e( 'This referrer or IP address is restricted from using your API Key. To change your API Key restrictions, please visit the', 'gpagespeedi' ); ?> <a href="https://code.google.com/apis/console/" target="_blank"><?php _e( 'Google API Console', 'gpagespeedi' ); ?></a></strong>.</p>
|
53 |
</div>
|
54 |
<?php endif; ?>
|
55 |
+
<?php if ( $action_message = $this->gpi_ui_options['action_message'] ) :
|
56 |
+
if ( ! is_array( $action_message ) ) : ?>
|
57 |
+
<div id="message" class="updated">
|
58 |
+
<p><?php echo $action_message; ?></p>
|
59 |
+
</div>
|
60 |
+
<?php elseif ( isset( $action_message['type'] ) && isset( $action_message['message'] ) ) : ?>
|
61 |
+
<div id="message" class="<?php echo $action_message['type']; ?>">
|
62 |
+
<p><?php echo $action_message['message']; ?></p>
|
63 |
+
</div>
|
64 |
+
<?php endif; ?>
|
65 |
<?php endif; ?>
|
66 |
<?php if ( $error_message = get_option('gpi_error_message') ) : ?>
|
67 |
<div id="message" class="error">
|
templates/parts/navigation.php
CHANGED
@@ -16,15 +16,27 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
16 |
<?php endif; ?>
|
17 |
<a href="?page=<?php echo $_REQUEST['page'];?>&render=summary" class="nav-tab <?php if ( $admin_page == 'summary' ) { echo 'nav-tab-active'; } ?>"><?php _e( 'Report Summary', 'gpagespeedi' ); ?></a>
|
18 |
|
19 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
<a href="?page=<?php echo $_REQUEST['page'];?>&render=ignored-urls" class="nav-tab <?php if ( $admin_page == 'ignored-urls' || $admin_page == 'activate' ) { echo 'nav-tab-active'; } ?>"><?php _e( 'Ignored URLs', 'gpagespeedi' ); ?></a>
|
22 |
<a href="?page=<?php echo $_REQUEST['page'];?>&render=options" class="nav-tab <?php if ( $admin_page == 'options' ) { echo 'nav-tab-active'; } ?>"><?php _e( 'Options', 'gpagespeedi' ); ?></a>
|
23 |
<?php if ( $admin_page == 'logs' ) : ?>
|
24 |
<a href="?page=<?php echo $_REQUEST['page'];?>&render=logs" class="nav-tab nav-tab-active nav-tab-temp"><?php _e('Logs', 'gpagespeedi'); ?></a>
|
25 |
<?php endif; ?>
|
26 |
-
|
27 |
-
|
28 |
-
<?php endif; ?>
|
29 |
|
30 |
</h3>
|
16 |
<?php endif; ?>
|
17 |
<a href="?page=<?php echo $_REQUEST['page'];?>&render=summary" class="nav-tab <?php if ( $admin_page == 'summary' ) { echo 'nav-tab-active'; } ?>"><?php _e( 'Report Summary', 'gpagespeedi' ); ?></a>
|
18 |
|
19 |
+
<a href="?page=<?php echo $_REQUEST['page'];?>&render=snapshots" class="nav-tab <?php if ( $admin_page == 'snapshots' ) { echo 'nav-tab-active'; } ?>"><?php _e( 'Snapshots', 'gpagespeedi' ); ?></a>
|
20 |
+
<?php if ( $admin_page == 'view-snapshot' && ! isset( $_GET['compare_id'] ) ) : ?>
|
21 |
+
<a href="?page=<?php echo $_REQUEST['page'];?>&render=view-snapshot&snapshot_id=<?php echo $_GET['snapshot_id']; ?>" class="nav-tab nav-tab-active nav-tab-temp"><?php _e( 'View Snapshot', 'gpagespeedi' ); ?></a>
|
22 |
+
<?php endif; ?>
|
23 |
+
<?php if ( $admin_page == 'view-snapshot' && isset( $_GET['compare_id'] ) ) : ?>
|
24 |
+
<a href="?page=<?php echo $_REQUEST['page'];?>&render=view-snapshot&snapshot_id=<?php echo $_GET['snapshot_id']; ?>&compare_id=<?php echo $_GET['compare_id']; ?>" class="nav-tab nav-tab-active nav-tab-temp"><?php _e('Compare Snapshots', 'gpagespeedi'); ?></a>
|
25 |
+
<?php endif; ?>
|
26 |
+
<a href="?page=<?php echo $_REQUEST['page'];?>&render=custom-urls" class="nav-tab <?php if ( $admin_page == 'custom-urls' || $admin_page == 'delete' ) { echo 'nav-tab-active'; } ?>"><?php _e( 'Custom URLs', 'gpagespeedi' ); ?></a>
|
27 |
+
<?php if($admin_page == 'add-custom-urls') : ?>
|
28 |
+
<a href="?page=<?php echo $_REQUEST['page'];?>&render=add-custom-urls" class="nav-tab nav-tab-active nav-tab-temp"><?php _e( 'Add New URLs', 'gpagespeedi' ); ?></a>
|
29 |
+
<?php endif ?>
|
30 |
+
<?php if ( $admin_page == 'add-custom-urls-bulk' ) : ?>
|
31 |
+
<a href="?page=<?php echo $_REQUEST['page'];?>&render=add-custom-urls-bulk" class="nav-tab nav-tab-active nav-tab-temp"><?php _e( 'Bulk Upload New URLs', 'gpagespeedi' ); ?></a>
|
32 |
+
<?php endif; ?>
|
33 |
|
34 |
<a href="?page=<?php echo $_REQUEST['page'];?>&render=ignored-urls" class="nav-tab <?php if ( $admin_page == 'ignored-urls' || $admin_page == 'activate' ) { echo 'nav-tab-active'; } ?>"><?php _e( 'Ignored URLs', 'gpagespeedi' ); ?></a>
|
35 |
<a href="?page=<?php echo $_REQUEST['page'];?>&render=options" class="nav-tab <?php if ( $admin_page == 'options' ) { echo 'nav-tab-active'; } ?>"><?php _e( 'Options', 'gpagespeedi' ); ?></a>
|
36 |
<?php if ( $admin_page == 'logs' ) : ?>
|
37 |
<a href="?page=<?php echo $_REQUEST['page'];?>&render=logs" class="nav-tab nav-tab-active nav-tab-temp"><?php _e('Logs', 'gpagespeedi'); ?></a>
|
38 |
<?php endif; ?>
|
39 |
+
|
40 |
+
<?php do_action( 'gpi_navigation', $admin_page ); ?>
|
|
|
41 |
|
42 |
</h3>
|
templates/snapshots.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template - Snapshots
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
require_once GPI_DIRECTORY . '/classes/class-GPI-List-Table.php';
|
11 |
+
|
12 |
+
$GPI_List_Table = new GPI_List_Table( 'snapshots' );
|
13 |
+
$GPI_List_Table->prepare_items();
|
14 |
+
?>
|
15 |
+
|
16 |
+
<form id="reports-filter" action="" method="get">
|
17 |
+
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
|
18 |
+
<input type="hidden" name="render" value="snapshots" />
|
19 |
+
|
20 |
+
<?php $GPI_List_Table->display(); ?>
|
21 |
+
</form>
|
templates/summary.php
CHANGED
@@ -48,6 +48,19 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
48 |
?>
|
49 |
</form>
|
50 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
<?php do_action( 'gpi_summary_tablenav' ); ?>
|
52 |
|
53 |
<br class="clear">
|
48 |
?>
|
49 |
</form>
|
50 |
</div>
|
51 |
+
<div class="alignleft actions">
|
52 |
+
<form method="post" action="" id="savesnapshot" name="savesnapshot">
|
53 |
+
<input type="hidden" name="page" value="<?php echo $_REQUEST['page']; ?>" />
|
54 |
+
<input type="hidden" name="render" value="summary" />
|
55 |
+
<input type="hidden" name="action" value="save-snapshot" />
|
56 |
+
<input type="text" name="comment" placeholder="<?php _e( 'Report Description', 'gpagespeedi' ); ?>" value="" />
|
57 |
+
<?php
|
58 |
+
wp_nonce_field( 'gpi_save_snapshot' );
|
59 |
+
submit_button( __( 'Save Report Snapshot', 'gpagespeedi' ), 'button', 'save-snapshot', false );
|
60 |
+
?>
|
61 |
+
</form>
|
62 |
+
</div>
|
63 |
+
|
64 |
<?php do_action( 'gpi_summary_tablenav' ); ?>
|
65 |
|
66 |
<br class="clear">
|
templates/view-snapshot.php
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template - View Snapshot
|
4 |
+
*/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
11 |
+
|
12 |
+
<div class="toolbar">
|
13 |
+
<div class="left">
|
14 |
+
<form method="get" action="" name="filter">
|
15 |
+
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'];?>" />
|
16 |
+
<input type="hidden" name="render" value="view-snapshot" />
|
17 |
+
<div class="tablenav top">
|
18 |
+
<select name="snapshot_id">
|
19 |
+
<?php
|
20 |
+
$similar_snapshots = apply_filters( 'gpi_similar_snapshots', array(), $_GET['snapshot_id'] );
|
21 |
+
|
22 |
+
foreach( $similar_snapshots as $snapshot ) :
|
23 |
+
?>
|
24 |
+
<option value="<?php echo $snapshot['ID']; ?>" <?php selected( $snapshot['ID'], $_GET['snapshot_id'] ); ?>><?php echo date_i18n( 'M d Y g:ia', $snapshot['snaptime'] ); ?></option>
|
25 |
+
<?php
|
26 |
+
endforeach;
|
27 |
+
?>
|
28 |
+
</select>
|
29 |
+
<?php
|
30 |
+
submit_button( __( 'Apply', 'gpagespeedi' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
|
31 |
+
?>
|
32 |
+
<div class="comment" data-selector="snapshot"></div>
|
33 |
+
</div>
|
34 |
+
</form>
|
35 |
+
</div>
|
36 |
+
<?php if ( count( $similar_snapshots ) >= 2 ) : ?>
|
37 |
+
<div class="right">
|
38 |
+
<form method="get" action="" name="filter">
|
39 |
+
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'];?>" />
|
40 |
+
<input type="hidden" name="render" value="view-snapshot" />
|
41 |
+
<input type="hidden" name="snapshot_id" value="<?php echo $_GET['snapshot_id']; ?>" />
|
42 |
+
<div class="tablenav top">
|
43 |
+
<select name="compare_id">
|
44 |
+
<?php
|
45 |
+
foreach( $similar_snapshots as $snapshot ) :
|
46 |
+
if ( $_GET['snapshot_id'] == $snapshot['ID'] ) :
|
47 |
+
continue;
|
48 |
+
endif;
|
49 |
+
$current_compare_id = isset( $_GET['compare_id'] ) ? $_GET['compare_id'] : false
|
50 |
+
?>
|
51 |
+
<option value="<?php echo $snapshot['ID']; ?>" <?php selected( $snapshot['ID'], $current_compare_id ); ?>><?php echo date_i18n( 'M d Y g:ia', $snapshot['snaptime'] ); ?></option>
|
52 |
+
<?php
|
53 |
+
endforeach;
|
54 |
+
?>
|
55 |
+
</select>
|
56 |
+
<?php
|
57 |
+
submit_button( __( 'Compare', 'gpagespeedi' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
|
58 |
+
?>
|
59 |
+
<div class="comment" data-selector="compare"></div>
|
60 |
+
</div>
|
61 |
+
</form>
|
62 |
+
</div>
|
63 |
+
<?php endif; ?>
|
64 |
+
</div>
|
65 |
+
|
66 |
+
<div <?php if ( isset( $_GET['compare_id'] ) ) { echo 'class="left half"'; } ?>>
|
67 |
+
<div class="row">
|
68 |
+
<div class="top-row boxsizing pagespeed_gauge_wrapper">
|
69 |
+
<div class="score_chart_div">
|
70 |
+
<img class="pagespeed_needle" data-selector="snapshot" src="<?php echo GPI_PUBLIC_PATH; ?>assets/images/pagespeed_gauge_needle.png" width="204" height="204" alt="" />
|
71 |
+
<div class="score_text"><span class="score" data-selector="snapshot"></span><span class="label"><?php _e( 'score', 'gpagespeedi' ); ?></span></div>
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
<div class="top-row boxsizing framed pagespeed_avg_sizes_wrapper">
|
75 |
+
<div class="boxheader">
|
76 |
+
<span class="left"><?php _e( 'Size of Resources (in kB)', 'gpagespeedi' ); ?></span>
|
77 |
+
<span class="right light"><span class="legend low"></span><?php _e( 'Lowest', 'gpagespeedi' ); ?></span>
|
78 |
+
<span class="right light"><span class="legend avg"></span><?php _e( 'Average', 'gpagespeedi' ); ?></span>
|
79 |
+
<span class="right light"><span class="legend"></span><?php _e( 'Highest', 'gpagespeedi' ); ?></span>
|
80 |
+
</div>
|
81 |
+
<div class="sizes_chart_div" data-selector="snapshot"></div>
|
82 |
+
</div>
|
83 |
+
</div>
|
84 |
+
<div class="row boxsizing framed largest_improvement">
|
85 |
+
<div class="boxheader">
|
86 |
+
<span class="left"><?php _e( 'Largest Areas for Improvement', 'gpagespeedi' ); ?></span>
|
87 |
+
<span class="right"><?php _e( 'Pages Effected', 'gpagespeedi' ); ?></span>
|
88 |
+
<span class="right"><?php _e( 'Average Impact', 'gpagespeedi' ); ?></span>
|
89 |
+
</div>
|
90 |
+
<table class="stats" data-selector="snapshot"></table>
|
91 |
+
</div>
|
92 |
+
<div class="row scores_div">
|
93 |
+
<div class="halfwidth boxsizing framed left highest_scores">
|
94 |
+
<div class="boxheader">
|
95 |
+
<span class="left"><?php _e( 'Highest Scoring Pages', 'gpagespeedi' ); ?></span>
|
96 |
+
<span class="right"><?php _e( 'Score', 'gpagespeedi' ); ?></span>
|
97 |
+
</div>
|
98 |
+
<table class="stats" data-selector="snapshot"></table>
|
99 |
+
</div>
|
100 |
+
<div class="halfwidth boxsizing framed right lowest_scores">
|
101 |
+
<div class="boxheader">
|
102 |
+
<span class="left"><?php _e( 'Lowest Scoring Pages', 'gpagespeedi' ); ?></span>
|
103 |
+
<span class="right"><?php _e( 'Score', 'gpagespeedi' ); ?></span>
|
104 |
+
</div>
|
105 |
+
<table class="stats" data-selector="snapshot"></table>
|
106 |
+
</div>
|
107 |
+
</div>
|
108 |
+
</div>
|
109 |
+
|
110 |
+
<?php if ( isset( $_GET['compare_id'] ) ) : ?>
|
111 |
+
|
112 |
+
<div class="right half">
|
113 |
+
<div class="row">
|
114 |
+
<div class="top-row boxsizing pagespeed_gauge_wrapper">
|
115 |
+
<div class="score_chart_div">
|
116 |
+
<img class="pagespeed_needle" data-selector="compare" src="<?php echo GPI_PUBLIC_PATH; ?>assets/images/pagespeed_gauge_needle.png" width="204" height="204" alt="" />
|
117 |
+
<div class="score_text"><span class="score" data-selector="compare"></span><span class="label"><?php _e( 'score', 'gpagespeedi' ); ?></span></div>
|
118 |
+
</div>
|
119 |
+
</div>
|
120 |
+
<div class="top-row boxsizing framed pagespeed_avg_sizes_wrapper">
|
121 |
+
<div class="boxheader">
|
122 |
+
<span class="left"><?php _e( 'Size of Resources (in kB)', 'gpagespeedi' ); ?></span>
|
123 |
+
<span class="right light"><span class="legend low"></span><?php _e( 'Lowest', 'gpagespeedi' ); ?></span>
|
124 |
+
<span class="right light"><span class="legend avg"></span><?php _e( 'Average', 'gpagespeedi' ); ?></span>
|
125 |
+
<span class="right light"><span class="legend"></span><?php _e( 'Highest', 'gpagespeedi' ); ?></span>
|
126 |
+
</div>
|
127 |
+
<div class="sizes_chart_div" data-selector="compare"></div>
|
128 |
+
</div>
|
129 |
+
</div>
|
130 |
+
<div class="row boxsizing framed largest_improvement">
|
131 |
+
<div class="boxheader">
|
132 |
+
<span class="left"><?php _e( 'Largest Areas for Improvement', 'gpagespeedi' ); ?></span>
|
133 |
+
<span class="right"><?php _e( 'Pages Effected', 'gpagespeedi' ); ?></span>
|
134 |
+
<span class="right"><?php _e( 'Average Impact', 'gpagespeedi' ); ?></span>
|
135 |
+
</div>
|
136 |
+
<table class="stats" data-selector="compare"></table>
|
137 |
+
</div>
|
138 |
+
<div class="row scores_div">
|
139 |
+
<div class="halfwidth boxsizing framed left highest_scores">
|
140 |
+
<div class="boxheader">
|
141 |
+
<span class="left"><?php _e( 'Highest Scoring Pages', 'gpagespeedi' ); ?></span>
|
142 |
+
<span class="right"><?php _e( 'Score', 'gpagespeedi' ); ?></span>
|
143 |
+
</div>
|
144 |
+
<table class="stats" data-selector="compare"></table>
|
145 |
+
</div>
|
146 |
+
<div class="halfwidth boxsizing framed right lowest_scores">
|
147 |
+
<div class="boxheader">
|
148 |
+
<span class="left"><?php _e( 'Lowest Scoring Pages', 'gpagespeedi' ); ?></span>
|
149 |
+
<span class="right"><?php _e( 'Score', 'gpagespeedi' ); ?></span>
|
150 |
+
</div>
|
151 |
+
<table class="stats" data-selector="compare"></table>
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
|
156 |
+
<?php endif; ?>
|
translations/gpagespeedi.pot
CHANGED
@@ -1,7 +1,8 @@
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Google Pagespeed Insights v2.0\n"
|
4 |
-
"POT-Creation-Date: 2017-
|
5 |
"PO-Revision-Date: 2017-07-07 23:56-0400\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
@@ -9,7 +10,7 @@ msgstr ""
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 2.0.
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
"X-Poedit-KeywordsList: ;__;_e\n"
|
@@ -19,14 +20,14 @@ msgstr ""
|
|
19 |
"X-Poedit-SearchPathExcluded-2: translations/documentation\n"
|
20 |
"X-Poedit-SearchPathExcluded-3: translations/translations\n"
|
21 |
|
22 |
-
#: classes/class-GPI-Actions.php:
|
23 |
msgid ""
|
24 |
"Successfully initiated Google Pagespeed Insights to recheck all reports. "
|
25 |
"Full plugin functionality will be restored after all pages have been "
|
26 |
"rechecked."
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: classes/class-GPI-Actions.php:
|
30 |
msgid ""
|
31 |
"Starting Reporting. Google Pagespeed will work in the background to load and "
|
32 |
"report on each URL. The amount of time needed to complete all reports will "
|
@@ -35,120 +36,163 @@ msgid ""
|
|
35 |
"this page if desired."
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: classes/class-GPI-Actions.php:
|
39 |
msgid ""
|
40 |
"Scan abort request received. Please allow a moment for the in-progress page "
|
41 |
"report to complete before the abort request can take effect."
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: classes/class-GPI-Actions.php:
|
45 |
msgid "Settings Saved."
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: classes/class-GPI-Actions.php:
|
49 |
msgid "The API is busy checking other pages, please try again later."
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: classes/class-GPI-Actions.php:
|
53 |
msgid "Recheck Complete."
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: classes/class-GPI-Actions.php:
|
57 |
msgid ""
|
58 |
"URLs have been scheduled for a recheck. Depending on the number of URLs to "
|
59 |
"check, this may take a while to complete."
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: classes/class-GPI-Actions.php:
|
63 |
msgid "URLs have been reactivated."
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: classes/class-GPI-Actions.php:
|
67 |
msgid "Reports have been ignored."
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: classes/class-GPI-Actions.php:
|
71 |
msgid "Reports have been deleted."
|
72 |
msgstr ""
|
73 |
|
74 |
-
#: classes/class-GPI-Actions.php:
|
|
|
75 |
msgid "URLs have been deleted."
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: classes/class-GPI-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
msgid "Abort Current Scan"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: classes/class-GPI-Admin.php:
|
83 |
msgid "Start Reporting"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: classes/class-GPI-Admin.php:
|
87 |
msgid "Recheck All"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: classes/class-GPI-Admin.php:
|
91 |
msgid "Ignore last checked date to generate new reports for all pages"
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: classes/class-GPI-Admin.php:
|
95 |
msgid ""
|
96 |
"Google Pagespeed Insights for Wordpress has been activated. It can be "
|
97 |
"accessed via Tools"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: classes/class-GPI-Admin.php:
|
101 |
msgid "Number of Hosts"
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: classes/class-GPI-Admin.php:
|
105 |
msgid "Total Request Bytes"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: classes/class-GPI-Admin.php:
|
109 |
msgid "Total Resources"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: classes/class-GPI-Admin.php:
|
113 |
msgid "JavaScript Resources"
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: classes/class-GPI-Admin.php:
|
117 |
msgid "CSS Resources"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: classes/class-GPI-Admin.php:
|
121 |
msgid "Score Impact"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: classes/class-GPI-Admin.php:
|
125 |
msgid ""
|
126 |
"Google Pagespeed Insights for WordPress has detected an outdated format in "
|
127 |
"this report due to an update in version 2.0 of this plugin. Some report "
|
128 |
"features are unavailable. Please recheck results to resolve this problem."
|
129 |
msgstr ""
|
130 |
|
131 |
-
#: classes/class-GPI-Admin.php:
|
132 |
msgid "Resource Type"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: classes/class-GPI-Admin.php:
|
136 |
msgid "High"
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: classes/class-GPI-Admin.php:
|
|
|
140 |
msgid "Average"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: classes/class-GPI-Admin.php:
|
144 |
msgid "Low"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: classes/class-GPI-Admin.php:
|
148 |
msgid "View Page Report"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: classes/class-GPI-Admin.php:
|
152 |
msgid ""
|
153 |
"Google Pagespeed Insights for WordPress has detected an outdated format in "
|
154 |
"one or more reports due to an update in version 2.0 of this plugin. Some "
|
@@ -156,36 +200,48 @@ msgid ""
|
|
156 |
"options page to resolve this problem."
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: classes/class-GPI-Admin.php:
|
|
|
|
|
|
|
|
|
160 |
msgid "All Reports"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: classes/class-GPI-Admin.php:
|
164 |
msgid "Pages"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: classes/class-GPI-Admin.php:
|
168 |
msgid "Posts"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: classes/class-GPI-Admin.php:
|
172 |
msgid "Categories"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: classes/class-GPI-Admin.php:
|
176 |
msgid "All Custom Post Types"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: classes/class-GPI-Admin.php:
|
180 |
msgid "Custom Post Types"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: classes/class-GPI-Admin.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
msgid "Auto-Optimize images with ShortPixel. Sign up for 150 free credits!"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: classes/class-GPI-Admin.php:
|
188 |
-
#: templates/about.php:118
|
189 |
msgid "N/A"
|
190 |
msgstr ""
|
191 |
|
@@ -240,33 +296,47 @@ msgstr ""
|
|
240 |
msgid "No Ignored URLs found. A URL can be ignored from the <a href=\"?page="
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: classes/class-GPI-List-Table.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
msgid ""
|
245 |
"No Pagespeed Reports Found. Google Pagespeed may still be checking your "
|
246 |
"pages. If problems persist, see the following possible solutions:"
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: classes/class-GPI-List-Table.php:181 templates/summary.php:
|
250 |
msgid "Make sure that you have entered your Google API key on the "
|
251 |
msgstr ""
|
252 |
|
253 |
#: classes/class-GPI-List-Table.php:181 templates/parts/messages.php:37
|
254 |
-
#: templates/parts/messages.php:42 templates/parts/messages.php:
|
255 |
-
#: templates/parts/navigation.php:
|
256 |
msgid "Options"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: classes/class-GPI-List-Table.php:
|
260 |
-
msgid "page"
|
261 |
-
msgstr ""
|
262 |
-
|
263 |
-
#: classes/class-GPI-List-Table.php:182 templates/summary.php:113
|
264 |
msgid ""
|
265 |
"Make sure that you have enabled \"PageSpeed Insights API\" from the Services "
|
266 |
"page of the "
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: classes/class-GPI-List-Table.php:183 templates/summary.php:
|
270 |
msgid "Make sure that your URLs are publicly accessible"
|
271 |
msgstr ""
|
272 |
|
@@ -274,202 +344,193 @@ msgstr ""
|
|
274 |
msgid "homepage"
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: classes/class-GPI-List-Table.php:
|
278 |
-
|
|
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: classes/class-GPI-List-Table.php:
|
282 |
-
|
|
|
|
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: classes/class-GPI-List-Table.php:
|
286 |
-
msgid "
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: classes/class-GPI-List-Table.php:
|
290 |
-
msgid "
|
|
|
|
|
|
|
|
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: classes/class-GPI-List-Table.php:
|
294 |
msgid "Reactivate"
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: classes/class-GPI-List-Table.php:
|
298 |
msgid "Ignored URL"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: classes/class-GPI-List-Table.php:
|
302 |
-
#: classes/class-GPI-List-Table.php:
|
|
|
303 |
msgid "Page Type"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: classes/class-GPI-List-Table.php:
|
307 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
msgid "URL"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: classes/class-GPI-List-Table.php:
|
312 |
-
#: templates/summary.php:
|
|
|
|
|
313 |
msgid "Score"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: classes/class-GPI-List-Table.php:
|
317 |
#: templates/details.php:34
|
318 |
msgid "Last Checked"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: classes/class-GPI-List-Table.php:
|
322 |
msgid "Score (Desktop)"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#: classes/class-GPI-List-Table.php:
|
326 |
msgid "Score (Mobile)"
|
327 |
msgstr ""
|
328 |
|
329 |
-
#: classes/class-GPI-List-Table.php:
|
330 |
msgid "Last Checked (Desktop)"
|
331 |
msgstr ""
|
332 |
|
333 |
-
#: classes/class-GPI-List-Table.php:
|
334 |
msgid "Last Checked (Mobile)"
|
335 |
msgstr ""
|
336 |
|
337 |
-
#: classes/class-GPI-List-Table.php:
|
338 |
msgid "Delete URL"
|
339 |
msgstr ""
|
340 |
|
341 |
-
#: classes/class-GPI-List-Table.php:
|
342 |
msgid "Ignore Reports"
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: classes/class-GPI-List-Table.php:
|
346 |
msgid "Delete Reports"
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: classes/class-GPI-List-Table.php:
|
350 |
msgid "25 Results/Page"
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: classes/class-GPI-List-Table.php:
|
354 |
msgid "50 Results/Page"
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: classes/class-GPI-List-Table.php:
|
358 |
msgid "100 Results/Page"
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: classes/class-GPI-List-Table.php:
|
362 |
msgid "500 Results/Page"
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: classes/class-GPI-List-Table.php:
|
366 |
msgid "1000 Results/Page"
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: classes/class-GPI-List-Table.php:
|
370 |
msgid "Filter"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: templates/
|
374 |
-
msgid "
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: templates/
|
378 |
-
msgid ""
|
379 |
-
"Google Pagespeed Insights is a tool that empowers you to make decisions that "
|
380 |
-
"increase the performance of your website by expanding on the existing "
|
381 |
-
"technology of Google Pagespeeds recommendations for current industry best "
|
382 |
-
"practices for desktop and mobile web performance."
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: templates/
|
386 |
-
msgid ""
|
387 |
-
"Through the addition of advanced data visualization, tagging, filtering, and "
|
388 |
-
"snapshot technology, Google Pagespeed Insights for WordPress provides a "
|
389 |
-
"comprehensive solution for any webmaster looking to increase their site "
|
390 |
-
"performance, search engine ranking, and visitors browsing experience."
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: templates/
|
394 |
-
msgid "
|
395 |
-
|
396 |
-
|
397 |
-
#: templates/about.php:28
|
398 |
-
msgid "Free Edition"
|
399 |
-
msgstr ""
|
400 |
-
|
401 |
-
#: templates/about.php:29
|
402 |
-
msgid "Premium Edition"
|
403 |
-
msgstr ""
|
404 |
-
|
405 |
-
#: templates/about.php:30
|
406 |
-
msgid "Agency Edition"
|
407 |
-
msgstr ""
|
408 |
-
|
409 |
-
#: templates/about.php:35
|
410 |
-
msgid "Detailed Page Reporting"
|
411 |
-
msgstr ""
|
412 |
-
|
413 |
-
#: templates/about.php:47
|
414 |
-
msgid "Report Summaries"
|
415 |
-
msgstr ""
|
416 |
-
|
417 |
-
#: templates/about.php:59
|
418 |
-
msgid "Report Snapshots"
|
419 |
-
msgstr ""
|
420 |
-
|
421 |
-
#: templates/about.php:69
|
422 |
-
msgid "Snapshot Comparison Tool"
|
423 |
-
msgstr ""
|
424 |
-
|
425 |
-
#: templates/about.php:79
|
426 |
-
msgid "Add/Import Custom URLs"
|
427 |
-
msgstr ""
|
428 |
-
|
429 |
-
#: templates/about.php:89
|
430 |
-
msgid "Desktop and Mobile Page Reports"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: templates/
|
434 |
-
msgid "
|
|
|
|
|
|
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: templates/
|
438 |
-
msgid "
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: templates/
|
442 |
-
msgid "
|
|
|
|
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: templates/
|
446 |
-
msgid "
|
|
|
|
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: templates/
|
450 |
-
msgid "
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: templates/
|
454 |
-
msgid "
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: templates/
|
458 |
-
msgid "
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: templates/
|
462 |
-
msgid "
|
|
|
|
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: templates/
|
466 |
-
msgid "
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: templates/
|
470 |
-
msgid ""
|
471 |
-
"** Use Google Pagespeed Insights for Wordpress on any site that you own or "
|
472 |
-
"manage."
|
473 |
msgstr ""
|
474 |
|
475 |
#: templates/details.php:15
|
@@ -480,7 +541,8 @@ msgstr ""
|
|
480 |
msgid "Recheck Results"
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: templates/details.php:24 templates/summary.php:
|
|
|
484 |
msgid "score"
|
485 |
msgstr ""
|
486 |
|
@@ -586,7 +648,7 @@ msgstr ""
|
|
586 |
msgid "Google Response Language:"
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: templates/options.php:67 templates/options.php:
|
590 |
msgid "Note"
|
591 |
msgstr ""
|
592 |
|
@@ -617,102 +679,134 @@ msgstr ""
|
|
617 |
msgid "Scheduling and URL Configuration"
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: templates/options.php:
|
621 |
-
msgid "
|
|
|
|
|
622 |
msgstr ""
|
623 |
|
624 |
-
#: templates/options.php:
|
625 |
-
msgid "
|
|
|
|
|
|
|
|
|
626 |
msgstr ""
|
627 |
|
628 |
#: templates/options.php:91
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
629 |
msgid "7 Days"
|
630 |
msgstr ""
|
631 |
|
632 |
-
#: templates/options.php:
|
633 |
msgid "15 Days"
|
634 |
msgstr ""
|
635 |
|
636 |
-
#: templates/options.php:
|
637 |
msgid "30 Days"
|
638 |
msgstr ""
|
639 |
|
640 |
-
#: templates/options.php:
|
641 |
msgid ""
|
642 |
-
"When
|
643 |
-
"
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: templates/options.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
647 |
msgid "Configure which types of URLs should be checked when running reports."
|
648 |
msgstr ""
|
649 |
|
650 |
-
#: templates/options.php:
|
651 |
msgid ""
|
652 |
"Google Pagespeed will load each page to generate a report. The more pages "
|
653 |
"you select, the longer it will take for the scan to complete."
|
654 |
msgstr ""
|
655 |
|
656 |
-
#: templates/options.php:
|
657 |
msgid "Check Wordpress Pages"
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: templates/options.php:
|
661 |
msgid "Check Wordpress Posts"
|
662 |
msgstr ""
|
663 |
|
664 |
-
#: templates/options.php:
|
665 |
msgid "Check Category Indexes"
|
666 |
msgstr ""
|
667 |
|
668 |
-
#: templates/options.php:
|
|
|
|
|
|
|
|
|
669 |
msgid "Advanced Configuration"
|
670 |
msgstr ""
|
671 |
|
672 |
-
#: templates/options.php:
|
673 |
msgid ""
|
674 |
"For most users, the following settings can be left at their defaults unless "
|
675 |
"otherwise instructed by support."
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: templates/options.php:
|
679 |
msgid "Maximum Execution Time"
|
680 |
msgstr ""
|
681 |
|
682 |
-
#: templates/options.php:
|
683 |
msgid "1 Minute"
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: templates/options.php:
|
687 |
msgid "5 Minutes"
|
688 |
msgstr ""
|
689 |
|
690 |
-
#: templates/options.php:
|
691 |
msgid "10 Minutes"
|
692 |
msgstr ""
|
693 |
|
694 |
-
#: templates/options.php:
|
695 |
msgid "15 Minutes"
|
696 |
msgstr ""
|
697 |
|
698 |
-
#: templates/options.php:
|
699 |
msgid "30 Minutes"
|
700 |
msgstr ""
|
701 |
|
702 |
-
#: templates/options.php:
|
703 |
msgid "The default value of 5 minutes is fine for most sites."
|
704 |
msgstr ""
|
705 |
|
706 |
-
#: templates/options.php:
|
707 |
msgid ""
|
708 |
"Increasing this value may help if your page reports do not finish completely."
|
709 |
msgstr ""
|
710 |
|
711 |
-
#: templates/options.php:
|
712 |
-
msgid "Notice"
|
713 |
-
msgstr ""
|
714 |
-
|
715 |
-
#: templates/options.php:161
|
716 |
msgid ""
|
717 |
"We have detected that your server may not allow the maximum execution time "
|
718 |
"to be overridden by this plugin. If you experience problems with pagespeed "
|
@@ -720,39 +814,39 @@ msgid ""
|
|
720 |
"Maximum Execution Time: "
|
721 |
msgstr ""
|
722 |
|
723 |
-
#: templates/options.php:
|
724 |
msgid "seconds"
|
725 |
msgstr ""
|
726 |
|
727 |
-
#: templates/options.php:
|
728 |
msgid "Maximum Script Run Time"
|
729 |
msgstr ""
|
730 |
|
731 |
-
#: templates/options.php:
|
732 |
msgid "No Limit"
|
733 |
msgstr ""
|
734 |
|
735 |
-
#: templates/options.php:
|
736 |
msgid "60 Seconds"
|
737 |
msgstr ""
|
738 |
|
739 |
-
#: templates/options.php:
|
740 |
msgid "90 Seconds"
|
741 |
msgstr ""
|
742 |
|
743 |
-
#: templates/options.php:
|
744 |
msgid "120 Seconds"
|
745 |
msgstr ""
|
746 |
|
747 |
-
#: templates/options.php:
|
748 |
msgid "150 Seconds"
|
749 |
msgstr ""
|
750 |
|
751 |
-
#: templates/options.php:
|
752 |
msgid "180 Seconds"
|
753 |
msgstr ""
|
754 |
|
755 |
-
#: templates/options.php:
|
756 |
msgid ""
|
757 |
"Some web hosting providers have limits on script runtime that cannot be "
|
758 |
"overridden. If your scans do not finish completely and changing the Maximum "
|
@@ -760,7 +854,7 @@ msgid ""
|
|
760 |
"specified run time is reached a new scan process will automatically start."
|
761 |
msgstr ""
|
762 |
|
763 |
-
#: templates/options.php:
|
764 |
msgid ""
|
765 |
"It is best to find the largest value that still allows the script to "
|
766 |
"complete successfully. Test first at 60 seconds, then raise the value to 90 "
|
@@ -768,115 +862,115 @@ msgid ""
|
|
768 |
"host allows."
|
769 |
msgstr ""
|
770 |
|
771 |
-
#: templates/options.php:
|
772 |
msgid "Report Throttling Delay Time"
|
773 |
msgstr ""
|
774 |
|
775 |
-
#: templates/options.php:
|
776 |
msgid "0 Seconds"
|
777 |
msgstr ""
|
778 |
|
779 |
-
#: templates/options.php:
|
780 |
msgid "1 Seconds"
|
781 |
msgstr ""
|
782 |
|
783 |
-
#: templates/options.php:
|
784 |
msgid "2 Seconds"
|
785 |
msgstr ""
|
786 |
|
787 |
-
#: templates/options.php:
|
788 |
msgid "3 Seconds"
|
789 |
msgstr ""
|
790 |
|
791 |
-
#: templates/options.php:
|
792 |
msgid "4 Seconds"
|
793 |
msgstr ""
|
794 |
|
795 |
-
#: templates/options.php:
|
796 |
msgid "5 Seconds"
|
797 |
msgstr ""
|
798 |
|
799 |
-
#: templates/options.php:
|
800 |
msgid "10 Seconds"
|
801 |
msgstr ""
|
802 |
|
803 |
-
#: templates/options.php:
|
804 |
msgid "The default value of 0 seconds is fine for most sites."
|
805 |
msgstr ""
|
806 |
|
807 |
-
#: templates/options.php:
|
808 |
msgid ""
|
809 |
"Raising this value will slow down page reporting, but may help provide more "
|
810 |
"accurate reports on poorly performing web servers"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: templates/options.php:
|
814 |
msgid "Report Status Indicator Refresh Rate"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: templates/options.php:
|
818 |
msgid "Fast"
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: templates/options.php:
|
822 |
msgid "Standard"
|
823 |
msgstr ""
|
824 |
|
825 |
-
#: templates/options.php:
|
826 |
msgid "Slow"
|
827 |
msgstr ""
|
828 |
|
829 |
-
#: templates/options.php:
|
830 |
msgid "Disabled - manually refresh pages to update status"
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: templates/options.php:
|
834 |
msgid "The default value of \"Fast\" is fine for most sites."
|
835 |
msgstr ""
|
836 |
|
837 |
-
#: templates/options.php:
|
838 |
msgid ""
|
839 |
"More frequent updates may impact Pagespeed reports on poorly performing "
|
840 |
"servers, reduce to rate if you are experiencing issues."
|
841 |
msgstr ""
|
842 |
|
843 |
-
#: templates/options.php:
|
844 |
msgid "Log API Exceptions"
|
845 |
msgstr ""
|
846 |
|
847 |
-
#: templates/options.php:
|
848 |
msgid "API error logs will be stored for up to 7 days."
|
849 |
msgstr ""
|
850 |
|
851 |
-
#: templates/options.php:
|
852 |
msgid "View Logs"
|
853 |
msgstr ""
|
854 |
|
855 |
-
#: templates/options.php:
|
856 |
msgid "Delete Data"
|
857 |
msgstr ""
|
858 |
|
859 |
-
#: templates/options.php:
|
860 |
msgid "Do Nothing"
|
861 |
msgstr ""
|
862 |
|
863 |
-
#: templates/options.php:
|
864 |
msgid "Delete Reports Only"
|
865 |
msgstr ""
|
866 |
|
867 |
-
#: templates/options.php:
|
868 |
msgid "Delete EVERYTHING"
|
869 |
msgstr ""
|
870 |
|
871 |
-
#: templates/options.php:
|
872 |
msgid "Warning"
|
873 |
msgstr ""
|
874 |
|
875 |
-
#: templates/options.php:
|
876 |
msgid "This option can not be reversed."
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: templates/options.php:
|
880 |
msgid "Save Options"
|
881 |
msgstr ""
|
882 |
|
@@ -933,24 +1027,24 @@ msgid ""
|
|
933 |
"your API Key restrictions, please visit the"
|
934 |
msgstr ""
|
935 |
|
936 |
-
#: templates/parts/messages.php:
|
937 |
msgid ""
|
938 |
"API error logging is disabled. Enable \"Log API Exceptions\" to record new "
|
939 |
"errors."
|
940 |
msgstr ""
|
941 |
|
942 |
-
#: templates/parts/messages.php:
|
943 |
msgid ""
|
944 |
"One or more URLs could not be reached by Google Pagespeed Insights and have "
|
945 |
"automatically been added to the"
|
946 |
msgstr ""
|
947 |
|
948 |
-
#: templates/parts/messages.php:
|
949 |
-
#: templates/parts/navigation.php:
|
950 |
msgid "Ignored URLs"
|
951 |
msgstr ""
|
952 |
|
953 |
-
#: templates/parts/messages.php:
|
954 |
msgid ""
|
955 |
"An error has been encountered while checking one or more URLs. Possible "
|
956 |
"causes: <br /><br />Daily API Limit Exceeded <a href=\"https://code.google."
|
@@ -960,43 +1054,43 @@ msgid ""
|
|
960 |
"is bad. <br /><br />The URL(s) have been added to the"
|
961 |
msgstr ""
|
962 |
|
963 |
-
#: templates/parts/messages.php:
|
964 |
msgid ""
|
965 |
"Google Pagespeed has successfully stopped checking pages due to a user "
|
966 |
"requested abort."
|
967 |
msgstr ""
|
968 |
|
969 |
-
#: templates/parts/messages.php:
|
970 |
msgid "Google Pagespeed has finished checking pagespeed scores."
|
971 |
msgstr ""
|
972 |
|
973 |
-
#: templates/parts/messages.php:
|
974 |
msgid "See new results"
|
975 |
msgstr ""
|
976 |
|
977 |
-
#: templates/parts/messages.php:
|
978 |
msgid "Google Pagespeed is running in the background "
|
979 |
msgstr ""
|
980 |
|
981 |
-
#: templates/parts/messages.php:
|
982 |
msgid "Google Pagespeed is running in the background. Progress... "
|
983 |
msgstr ""
|
984 |
|
985 |
-
#: templates/parts/messages.php:
|
986 |
msgid "URL(s) checked"
|
987 |
msgstr ""
|
988 |
|
989 |
-
#: templates/parts/messages.php:
|
990 |
msgid "Refresh to update progress or see new results."
|
991 |
msgstr ""
|
992 |
|
993 |
-
#: templates/parts/messages.php:
|
994 |
msgid ""
|
995 |
"Google Pagespeed Options cannot be changed while Pagespeed is running. "
|
996 |
"Please wait until it has finished to make any changes."
|
997 |
msgstr ""
|
998 |
|
999 |
-
#: templates/parts/messages.php:
|
1000 |
msgid ""
|
1001 |
"The last pagespeed report scan failed to finish successfully. We have "
|
1002 |
"detected that your server may not allow the maximum execution time to be "
|
@@ -1005,11 +1099,11 @@ msgid ""
|
|
1005 |
"Run Time in the Advanced Configuration section on the"
|
1006 |
msgstr ""
|
1007 |
|
1008 |
-
#: templates/parts/messages.php:
|
1009 |
msgid "Options Page"
|
1010 |
msgstr ""
|
1011 |
|
1012 |
-
#: templates/parts/messages.php:
|
1013 |
msgid ""
|
1014 |
"The last pagespeed report scan failed to finish successfully. If you "
|
1015 |
"continue to experience problems with pagespeed report scans failing to "
|
@@ -1033,62 +1127,85 @@ msgstr ""
|
|
1033 |
msgid "Report Details"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
-
#: templates/parts/navigation.php:
|
1037 |
-
msgid "
|
1038 |
msgstr ""
|
1039 |
|
1040 |
#: templates/parts/navigation.php:24
|
|
|
|
|
|
|
|
|
1041 |
msgid "Logs"
|
1042 |
msgstr ""
|
1043 |
|
1044 |
-
#: templates/
|
1045 |
-
msgid "
|
1046 |
msgstr ""
|
1047 |
|
1048 |
-
#: templates/summary.php:
|
|
|
1049 |
msgid "Size of Resources (in kB)"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
-
#: templates/summary.php:
|
|
|
1053 |
msgid "Lowest"
|
1054 |
msgstr ""
|
1055 |
|
1056 |
-
#: templates/summary.php:
|
|
|
1057 |
msgid "Highest"
|
1058 |
msgstr ""
|
1059 |
|
1060 |
-
#: templates/summary.php:
|
|
|
1061 |
msgid "Largest Areas for Improvement"
|
1062 |
msgstr ""
|
1063 |
|
1064 |
-
#: templates/summary.php:
|
1065 |
msgid "Pages Impacted"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
-
#: templates/summary.php:
|
|
|
1069 |
msgid "Average Impact"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
-
#: templates/summary.php:
|
|
|
1073 |
msgid "Highest Scoring Pages"
|
1074 |
msgstr ""
|
1075 |
|
1076 |
-
#: templates/summary.php:
|
|
|
1077 |
msgid "Lowest Scoring Pages"
|
1078 |
msgstr ""
|
1079 |
|
1080 |
-
#: templates/summary.php:
|
1081 |
msgid "There may not be any results for the \""
|
1082 |
msgstr ""
|
1083 |
|
1084 |
-
#: templates/summary.php:
|
1085 |
msgid "There may not be any"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
-
#: templates/summary.php:
|
1089 |
msgid "reports completed yet."
|
1090 |
msgstr ""
|
1091 |
|
1092 |
-
#: templates/summary.php:
|
1093 |
msgid "Try switching the report mode."
|
1094 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#, fuzzy
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Google Pagespeed Insights v2.0\n"
|
5 |
+
"POT-Creation-Date: 2017-08-27 19:42-0400\n"
|
6 |
"PO-Revision-Date: 2017-07-07 23:56-0400\n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: \n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 2.0.3\n"
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
"X-Poedit-KeywordsList: ;__;_e\n"
|
20 |
"X-Poedit-SearchPathExcluded-2: translations/documentation\n"
|
21 |
"X-Poedit-SearchPathExcluded-3: translations/translations\n"
|
22 |
|
23 |
+
#: classes/class-GPI-Actions.php:120
|
24 |
msgid ""
|
25 |
"Successfully initiated Google Pagespeed Insights to recheck all reports. "
|
26 |
"Full plugin functionality will be restored after all pages have been "
|
27 |
"rechecked."
|
28 |
msgstr ""
|
29 |
|
30 |
+
#: classes/class-GPI-Actions.php:141
|
31 |
msgid ""
|
32 |
"Starting Reporting. Google Pagespeed will work in the background to load and "
|
33 |
"report on each URL. The amount of time needed to complete all reports will "
|
36 |
"this page if desired."
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: classes/class-GPI-Actions.php:148
|
40 |
msgid ""
|
41 |
"Scan abort request received. Please allow a moment for the in-progress page "
|
42 |
"report to complete before the abort request can take effect."
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: classes/class-GPI-Actions.php:229
|
46 |
msgid "Settings Saved."
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: classes/class-GPI-Actions.php:273
|
50 |
msgid "The API is busy checking other pages, please try again later."
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: classes/class-GPI-Actions.php:276
|
54 |
msgid "Recheck Complete."
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: classes/class-GPI-Actions.php:326
|
58 |
msgid ""
|
59 |
"URLs have been scheduled for a recheck. Depending on the number of URLs to "
|
60 |
"check, this may take a while to complete."
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: classes/class-GPI-Actions.php:353
|
64 |
msgid "URLs have been reactivated."
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: classes/class-GPI-Actions.php:393
|
68 |
msgid "Reports have been ignored."
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: classes/class-GPI-Actions.php:419
|
72 |
msgid "Reports have been deleted."
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: classes/class-GPI-Actions.php:444 classes/class-GPI-Actions.php:772
|
76 |
+
#: classes/class-GPI-Actions.php:798
|
77 |
msgid "URLs have been deleted."
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: classes/class-GPI-Actions.php:452 classes/class-GPI-Actions.php:490
|
81 |
+
#: classes/class-GPI-Actions.php:524
|
82 |
+
msgid "Invalid Nonce. Please refresh the page and try again."
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: classes/class-GPI-Actions.php:481
|
86 |
+
msgid "Snapshot Saved Successfully"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: classes/class-GPI-Actions.php:501
|
90 |
+
msgid "No snapshot(s) selected."
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: classes/class-GPI-Actions.php:513
|
94 |
+
msgid "Snapshots have been deleted."
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: classes/class-GPI-Actions.php:579 classes/class-GPI-Actions.php:688
|
98 |
+
msgid "URL(s) have been successfully added."
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: classes/class-GPI-Actions.php:591 classes/class-GPI-Actions.php:618
|
102 |
+
msgid "There was a problem uploading the sitemap"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: classes/class-GPI-Actions.php:607
|
106 |
+
msgid "File type must be \"Application/XML\""
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: classes/class-GPI-Actions.php:688
|
110 |
+
msgid "URL(s) already exist and have been skipped."
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: classes/class-GPI-Admin.php:116
|
114 |
+
msgid ""
|
115 |
+
"The plugin \"Google Pagespeed Insights Addon\" has automatically been "
|
116 |
+
"deactivated. As of v3.0 Google Pagespeed Insights now includes all \"addon\" "
|
117 |
+
"functionality for free. The \"Google Pagespeed Insights Addon\" can be "
|
118 |
+
"uninstalled from the plugins page."
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: classes/class-GPI-Admin.php:138 classes/class-GPI-Admin.php:142
|
122 |
msgid "Abort Current Scan"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: classes/class-GPI-Admin.php:147
|
126 |
msgid "Start Reporting"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: classes/class-GPI-Admin.php:149
|
130 |
msgid "Recheck All"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: classes/class-GPI-Admin.php:149
|
134 |
msgid "Ignore last checked date to generate new reports for all pages"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: classes/class-GPI-Admin.php:174
|
138 |
msgid ""
|
139 |
"Google Pagespeed Insights for Wordpress has been activated. It can be "
|
140 |
"accessed via Tools"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: classes/class-GPI-Admin.php:217
|
144 |
msgid "Number of Hosts"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: classes/class-GPI-Admin.php:218
|
148 |
msgid "Total Request Bytes"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: classes/class-GPI-Admin.php:219
|
152 |
msgid "Total Resources"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: classes/class-GPI-Admin.php:220
|
156 |
msgid "JavaScript Resources"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: classes/class-GPI-Admin.php:221
|
160 |
msgid "CSS Resources"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: classes/class-GPI-Admin.php:222
|
164 |
msgid "Score Impact"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: classes/class-GPI-Admin.php:223
|
168 |
msgid ""
|
169 |
"Google Pagespeed Insights for WordPress has detected an outdated format in "
|
170 |
"this report due to an update in version 2.0 of this plugin. Some report "
|
171 |
"features are unavailable. Please recheck results to resolve this problem."
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: classes/class-GPI-Admin.php:244
|
175 |
msgid "Resource Type"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: classes/class-GPI-Admin.php:245
|
179 |
msgid "High"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: classes/class-GPI-Admin.php:246 templates/summary.php:82
|
183 |
+
#: templates/view-snapshot.php:78 templates/view-snapshot.php:124
|
184 |
msgid "Average"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: classes/class-GPI-Admin.php:247
|
188 |
msgid "Low"
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: classes/class-GPI-Admin.php:248
|
192 |
msgid "View Page Report"
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: classes/class-GPI-Admin.php:249
|
196 |
msgid ""
|
197 |
"Google Pagespeed Insights for WordPress has detected an outdated format in "
|
198 |
"one or more reports due to an update in version 2.0 of this plugin. Some "
|
200 |
"options page to resolve this problem."
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: classes/class-GPI-Admin.php:268 classes/class-GPI-List-Table.php:366
|
204 |
+
msgid "Comment"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: classes/class-GPI-Admin.php:378 classes/class-GPI-List-Table.php:259
|
208 |
msgid "All Reports"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: classes/class-GPI-Admin.php:382 classes/class-GPI-List-Table.php:259
|
212 |
msgid "Pages"
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: classes/class-GPI-Admin.php:386 classes/class-GPI-List-Table.php:259
|
216 |
msgid "Posts"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: classes/class-GPI-Admin.php:390 classes/class-GPI-List-Table.php:259
|
220 |
msgid "Categories"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: classes/class-GPI-Admin.php:395 classes/class-GPI-List-Table.php:259
|
224 |
msgid "All Custom Post Types"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: classes/class-GPI-Admin.php:405 templates/options.php:139
|
228 |
msgid "Custom Post Types"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: classes/class-GPI-Admin.php:426 classes/class-GPI-List-Table.php:259
|
232 |
+
msgid "All Custom URLs"
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
+
#: classes/class-GPI-Admin.php:435 templates/add-custom-urls.php:40
|
236 |
+
#: templates/parts/navigation.php:26
|
237 |
+
msgid "Custom URLs"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: classes/class-GPI-Admin.php:647
|
241 |
msgid "Auto-Optimize images with ShortPixel. Sign up for 150 free credits!"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: classes/class-GPI-Admin.php:748
|
|
|
245 |
msgid "N/A"
|
246 |
msgstr ""
|
247 |
|
296 |
msgid "No Ignored URLs found. A URL can be ignored from the <a href=\"?page="
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: classes/class-GPI-List-Table.php:154
|
300 |
+
msgid "No Snapshots found. Snapshots can be created from the"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: classes/class-GPI-List-Table.php:154 templates/parts/navigation.php:17
|
304 |
+
msgid "Report Summary"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: classes/class-GPI-List-Table.php:154 classes/class-GPI-List-Table.php:181
|
308 |
+
msgid "page"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: classes/class-GPI-List-Table.php:158
|
312 |
+
msgid ""
|
313 |
+
"No Custom URLs found. Click \"Add New URLs\" or \"Bulk Upload New URLs\" "
|
314 |
+
"above to add custom URLs."
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: classes/class-GPI-List-Table.php:178 templates/summary.php:116
|
318 |
msgid ""
|
319 |
"No Pagespeed Reports Found. Google Pagespeed may still be checking your "
|
320 |
"pages. If problems persist, see the following possible solutions:"
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: classes/class-GPI-List-Table.php:181 templates/summary.php:125
|
324 |
msgid "Make sure that you have entered your Google API key on the "
|
325 |
msgstr ""
|
326 |
|
327 |
#: classes/class-GPI-List-Table.php:181 templates/parts/messages.php:37
|
328 |
+
#: templates/parts/messages.php:42 templates/parts/messages.php:73
|
329 |
+
#: templates/parts/navigation.php:35
|
330 |
msgid "Options"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: classes/class-GPI-List-Table.php:182 templates/summary.php:126
|
|
|
|
|
|
|
|
|
334 |
msgid ""
|
335 |
"Make sure that you have enabled \"PageSpeed Insights API\" from the Services "
|
336 |
"page of the "
|
337 |
msgstr ""
|
338 |
|
339 |
+
#: classes/class-GPI-List-Table.php:183 templates/summary.php:127
|
340 |
msgid "Make sure that your URLs are publicly accessible"
|
341 |
msgstr ""
|
342 |
|
344 |
msgid "homepage"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: classes/class-GPI-List-Table.php:224 classes/class-GPI-List-Table.php:280
|
348 |
+
#: classes/class-GPI-List-Table.php:302
|
349 |
+
msgid "View URL"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: classes/class-GPI-List-Table.php:228 classes/class-GPI-List-Table.php:245
|
353 |
+
#: classes/class-GPI-List-Table.php:284 classes/class-GPI-List-Table.php:306
|
354 |
+
#: classes/class-GPI-List-Table.php:502 classes/class-GPI-List-Table.php:508
|
355 |
+
msgid "Delete"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: classes/class-GPI-List-Table.php:241 templates/parts/navigation.php:21
|
359 |
+
msgid "View Snapshot"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: classes/class-GPI-List-Table.php:277
|
363 |
+
msgid "Details"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: classes/class-GPI-List-Table.php:283
|
367 |
+
msgid "Ignore"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: classes/class-GPI-List-Table.php:305 classes/class-GPI-List-Table.php:495
|
371 |
msgid "Reactivate"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: classes/class-GPI-List-Table.php:355
|
375 |
msgid "Ignored URL"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: classes/class-GPI-List-Table.php:356 classes/class-GPI-List-Table.php:374
|
379 |
+
#: classes/class-GPI-List-Table.php:400 classes/class-GPI-List-Table.php:408
|
380 |
+
#: classes/class-GPI-List-Table.php:417
|
381 |
msgid "Page Type"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: classes/class-GPI-List-Table.php:363
|
385 |
+
msgid "Snapshot Date"
|
386 |
+
msgstr ""
|
387 |
+
|
388 |
+
#: classes/class-GPI-List-Table.php:364 templates/summary.php:56
|
389 |
+
msgid "Report Description"
|
390 |
+
msgstr ""
|
391 |
+
|
392 |
+
#: classes/class-GPI-List-Table.php:365
|
393 |
+
msgid "Report Type"
|
394 |
+
msgstr ""
|
395 |
+
|
396 |
+
#: classes/class-GPI-List-Table.php:373
|
397 |
+
msgid "Custom URL"
|
398 |
+
msgstr ""
|
399 |
+
|
400 |
+
#: classes/class-GPI-List-Table.php:398 classes/class-GPI-List-Table.php:406
|
401 |
+
#: classes/class-GPI-List-Table.php:414 templates/logs.php:21
|
402 |
msgid "URL"
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: classes/class-GPI-List-Table.php:399 classes/class-GPI-List-Table.php:407
|
406 |
+
#: templates/summary.php:100 templates/summary.php:107
|
407 |
+
#: templates/view-snapshot.php:96 templates/view-snapshot.php:103
|
408 |
+
#: templates/view-snapshot.php:142 templates/view-snapshot.php:149
|
409 |
msgid "Score"
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: classes/class-GPI-List-Table.php:401 classes/class-GPI-List-Table.php:409
|
413 |
#: templates/details.php:34
|
414 |
msgid "Last Checked"
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: classes/class-GPI-List-Table.php:415
|
418 |
msgid "Score (Desktop)"
|
419 |
msgstr ""
|
420 |
|
421 |
+
#: classes/class-GPI-List-Table.php:416
|
422 |
msgid "Score (Mobile)"
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: classes/class-GPI-List-Table.php:418
|
426 |
msgid "Last Checked (Desktop)"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: classes/class-GPI-List-Table.php:419
|
430 |
msgid "Last Checked (Mobile)"
|
431 |
msgstr ""
|
432 |
|
433 |
+
#: classes/class-GPI-List-Table.php:496
|
434 |
msgid "Delete URL"
|
435 |
msgstr ""
|
436 |
|
437 |
+
#: classes/class-GPI-List-Table.php:530
|
438 |
msgid "Ignore Reports"
|
439 |
msgstr ""
|
440 |
|
441 |
+
#: classes/class-GPI-List-Table.php:531
|
442 |
msgid "Delete Reports"
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: classes/class-GPI-List-Table.php:581
|
446 |
msgid "25 Results/Page"
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: classes/class-GPI-List-Table.php:582
|
450 |
msgid "50 Results/Page"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: classes/class-GPI-List-Table.php:583
|
454 |
msgid "100 Results/Page"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: classes/class-GPI-List-Table.php:584
|
458 |
msgid "500 Results/Page"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: classes/class-GPI-List-Table.php:585
|
462 |
msgid "1000 Results/Page"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: classes/class-GPI-List-Table.php:589 templates/summary.php:47
|
466 |
msgid "Filter"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: classes/class-GPI-List-Table.php:593 templates/parts/navigation.php:28
|
470 |
+
msgid "Add New URLs"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: classes/class-GPI-List-Table.php:594 templates/parts/navigation.php:31
|
474 |
+
msgid "Bulk Upload New URLs"
|
|
|
|
|
|
|
|
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: templates/add-custom-urls-bulk.php:21
|
478 |
+
msgid "Bulk Upload Custom URLs"
|
|
|
|
|
|
|
|
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: templates/add-custom-urls-bulk.php:25
|
482 |
+
msgid ""
|
483 |
+
"Add any valid URL, even from sites outside of WordPress. Upload a properly "
|
484 |
+
"formatted XML sitemap below to add pages."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
msgstr ""
|
486 |
|
487 |
+
#: templates/add-custom-urls-bulk.php:26
|
488 |
+
msgid ""
|
489 |
+
"XML must conform to the <a href=\"http://www.sitemaps.org/protocol.html\" "
|
490 |
+
"target=\"_blank\">sitemaps.org standards</a>. There are free services that "
|
491 |
+
"can help you generate a sitemap such as"
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: templates/add-custom-urls-bulk.php:32 templates/add-custom-urls.php:31
|
495 |
+
msgid "Custom URL Label"
|
496 |
msgstr ""
|
497 |
|
498 |
+
#: templates/add-custom-urls-bulk.php:36 templates/add-custom-urls.php:35
|
499 |
+
msgid ""
|
500 |
+
"Choose a custom label for your new URLs, this will be used later when "
|
501 |
+
"sorting your reports."
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: templates/add-custom-urls-bulk.php:36 templates/add-custom-urls.php:35
|
505 |
+
msgid ""
|
506 |
+
"Max 20 Charactors, Alpha-Numeric Only. Spaces will be replaced with "
|
507 |
+
"underscores"
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: templates/add-custom-urls-bulk.php:41
|
511 |
+
msgid "XML Sitemap File"
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: templates/add-custom-urls-bulk.php:52
|
515 |
+
msgid "Submit Sitemap"
|
516 |
msgstr ""
|
517 |
|
518 |
+
#: templates/add-custom-urls.php:21
|
519 |
+
msgid "Add Custom URLs"
|
520 |
msgstr ""
|
521 |
|
522 |
+
#: templates/add-custom-urls.php:25
|
523 |
+
msgid ""
|
524 |
+
"Add any valid URL, even from sites outside of WordPress. Enter up to 10 URLs "
|
525 |
+
"below. If you need to enter a lot of URLs check out the"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: templates/add-custom-urls.php:25
|
529 |
+
msgid "Bulk URL uploader"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: templates/add-custom-urls.php:57
|
533 |
+
msgid "Submit URLs"
|
|
|
|
|
534 |
msgstr ""
|
535 |
|
536 |
#: templates/details.php:15
|
541 |
msgid "Recheck Results"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: templates/details.php:24 templates/summary.php:75
|
545 |
+
#: templates/view-snapshot.php:71 templates/view-snapshot.php:117
|
546 |
msgid "score"
|
547 |
msgstr ""
|
548 |
|
648 |
msgid "Google Response Language:"
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: templates/options.php:67 templates/options.php:115
|
652 |
msgid "Note"
|
653 |
msgstr ""
|
654 |
|
679 |
msgid "Scheduling and URL Configuration"
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: templates/options.php:86
|
683 |
+
msgid ""
|
684 |
+
"Choose wether or not Google Pagespeed Insights should automatically re-check "
|
685 |
+
"page scores, and if so, how often."
|
686 |
msgstr ""
|
687 |
|
688 |
+
#: templates/options.php:89
|
689 |
+
msgid "Automatically re-check Pagespeed Insights scores using a schedule"
|
690 |
+
msgstr ""
|
691 |
+
|
692 |
+
#: templates/options.php:91 templates/options.php:178
|
693 |
+
msgid "Notice"
|
694 |
msgstr ""
|
695 |
|
696 |
#: templates/options.php:91
|
697 |
+
msgid ""
|
698 |
+
"The WP Cron service this plugin uses to check pages is disabled. Hosting "
|
699 |
+
"providers often disable the WP Cron service and run their own manual Cron "
|
700 |
+
"service on an interval of their choosing. Contact your hosting provider if "
|
701 |
+
"scheduled checks fail to run."
|
702 |
+
msgstr ""
|
703 |
+
|
704 |
+
#: templates/options.php:95
|
705 |
+
msgid "Report Expiration / Recheck Interval"
|
706 |
+
msgstr ""
|
707 |
+
|
708 |
+
#: templates/options.php:97
|
709 |
+
msgid "1 Day"
|
710 |
+
msgstr ""
|
711 |
+
|
712 |
+
#: templates/options.php:98
|
713 |
msgid "7 Days"
|
714 |
msgstr ""
|
715 |
|
716 |
+
#: templates/options.php:99
|
717 |
msgid "15 Days"
|
718 |
msgstr ""
|
719 |
|
720 |
+
#: templates/options.php:100
|
721 |
msgid "30 Days"
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: templates/options.php:102
|
725 |
msgid ""
|
726 |
+
"When page reporting is running, pages which are newer than the specified "
|
727 |
+
"Report Expiration will be skipped."
|
728 |
msgstr ""
|
729 |
|
730 |
+
#: templates/options.php:102
|
731 |
+
msgid ""
|
732 |
+
"If \"Automatically re-check Pagespeed Insights scores\" is checked above, "
|
733 |
+
"this option will control its frequency."
|
734 |
+
msgstr ""
|
735 |
+
|
736 |
+
#: templates/options.php:108
|
737 |
+
msgid "Next Scheduled Check"
|
738 |
+
msgstr ""
|
739 |
+
|
740 |
+
#: templates/options.php:114
|
741 |
msgid "Configure which types of URLs should be checked when running reports."
|
742 |
msgstr ""
|
743 |
|
744 |
+
#: templates/options.php:115
|
745 |
msgid ""
|
746 |
"Google Pagespeed will load each page to generate a report. The more pages "
|
747 |
"you select, the longer it will take for the scan to complete."
|
748 |
msgstr ""
|
749 |
|
750 |
+
#: templates/options.php:118
|
751 |
msgid "Check Wordpress Pages"
|
752 |
msgstr ""
|
753 |
|
754 |
+
#: templates/options.php:122
|
755 |
msgid "Check Wordpress Posts"
|
756 |
msgstr ""
|
757 |
|
758 |
+
#: templates/options.php:126
|
759 |
msgid "Check Category Indexes"
|
760 |
msgstr ""
|
761 |
|
762 |
+
#: templates/options.php:131
|
763 |
+
msgid "Check Custom URLs"
|
764 |
+
msgstr ""
|
765 |
+
|
766 |
+
#: templates/options.php:162
|
767 |
msgid "Advanced Configuration"
|
768 |
msgstr ""
|
769 |
|
770 |
+
#: templates/options.php:166
|
771 |
msgid ""
|
772 |
"For most users, the following settings can be left at their defaults unless "
|
773 |
"otherwise instructed by support."
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: templates/options.php:168
|
777 |
msgid "Maximum Execution Time"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: templates/options.php:170
|
781 |
msgid "1 Minute"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: templates/options.php:171
|
785 |
msgid "5 Minutes"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: templates/options.php:172
|
789 |
msgid "10 Minutes"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: templates/options.php:173
|
793 |
msgid "15 Minutes"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: templates/options.php:174
|
797 |
msgid "30 Minutes"
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: templates/options.php:176
|
801 |
msgid "The default value of 5 minutes is fine for most sites."
|
802 |
msgstr ""
|
803 |
|
804 |
+
#: templates/options.php:176
|
805 |
msgid ""
|
806 |
"Increasing this value may help if your page reports do not finish completely."
|
807 |
msgstr ""
|
808 |
|
809 |
+
#: templates/options.php:178
|
|
|
|
|
|
|
|
|
810 |
msgid ""
|
811 |
"We have detected that your server may not allow the maximum execution time "
|
812 |
"to be overridden by this plugin. If you experience problems with pagespeed "
|
814 |
"Maximum Execution Time: "
|
815 |
msgstr ""
|
816 |
|
817 |
+
#: templates/options.php:178
|
818 |
msgid "seconds"
|
819 |
msgstr ""
|
820 |
|
821 |
+
#: templates/options.php:181
|
822 |
msgid "Maximum Script Run Time"
|
823 |
msgstr ""
|
824 |
|
825 |
+
#: templates/options.php:183
|
826 |
msgid "No Limit"
|
827 |
msgstr ""
|
828 |
|
829 |
+
#: templates/options.php:184
|
830 |
msgid "60 Seconds"
|
831 |
msgstr ""
|
832 |
|
833 |
+
#: templates/options.php:185
|
834 |
msgid "90 Seconds"
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: templates/options.php:186
|
838 |
msgid "120 Seconds"
|
839 |
msgstr ""
|
840 |
|
841 |
+
#: templates/options.php:187
|
842 |
msgid "150 Seconds"
|
843 |
msgstr ""
|
844 |
|
845 |
+
#: templates/options.php:188
|
846 |
msgid "180 Seconds"
|
847 |
msgstr ""
|
848 |
|
849 |
+
#: templates/options.php:191
|
850 |
msgid ""
|
851 |
"Some web hosting providers have limits on script runtime that cannot be "
|
852 |
"overridden. If your scans do not finish completely and changing the Maximum "
|
854 |
"specified run time is reached a new scan process will automatically start."
|
855 |
msgstr ""
|
856 |
|
857 |
+
#: templates/options.php:192
|
858 |
msgid ""
|
859 |
"It is best to find the largest value that still allows the script to "
|
860 |
"complete successfully. Test first at 60 seconds, then raise the value to 90 "
|
862 |
"host allows."
|
863 |
msgstr ""
|
864 |
|
865 |
+
#: templates/options.php:195
|
866 |
msgid "Report Throttling Delay Time"
|
867 |
msgstr ""
|
868 |
|
869 |
+
#: templates/options.php:197
|
870 |
msgid "0 Seconds"
|
871 |
msgstr ""
|
872 |
|
873 |
+
#: templates/options.php:198
|
874 |
msgid "1 Seconds"
|
875 |
msgstr ""
|
876 |
|
877 |
+
#: templates/options.php:199
|
878 |
msgid "2 Seconds"
|
879 |
msgstr ""
|
880 |
|
881 |
+
#: templates/options.php:200
|
882 |
msgid "3 Seconds"
|
883 |
msgstr ""
|
884 |
|
885 |
+
#: templates/options.php:201
|
886 |
msgid "4 Seconds"
|
887 |
msgstr ""
|
888 |
|
889 |
+
#: templates/options.php:202
|
890 |
msgid "5 Seconds"
|
891 |
msgstr ""
|
892 |
|
893 |
+
#: templates/options.php:203
|
894 |
msgid "10 Seconds"
|
895 |
msgstr ""
|
896 |
|
897 |
+
#: templates/options.php:206
|
898 |
msgid "The default value of 0 seconds is fine for most sites."
|
899 |
msgstr ""
|
900 |
|
901 |
+
#: templates/options.php:208
|
902 |
msgid ""
|
903 |
"Raising this value will slow down page reporting, but may help provide more "
|
904 |
"accurate reports on poorly performing web servers"
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: templates/options.php:211
|
908 |
msgid "Report Status Indicator Refresh Rate"
|
909 |
msgstr ""
|
910 |
|
911 |
+
#: templates/options.php:213
|
912 |
msgid "Fast"
|
913 |
msgstr ""
|
914 |
|
915 |
+
#: templates/options.php:214
|
916 |
msgid "Standard"
|
917 |
msgstr ""
|
918 |
|
919 |
+
#: templates/options.php:215
|
920 |
msgid "Slow"
|
921 |
msgstr ""
|
922 |
|
923 |
+
#: templates/options.php:216
|
924 |
msgid "Disabled - manually refresh pages to update status"
|
925 |
msgstr ""
|
926 |
|
927 |
+
#: templates/options.php:219
|
928 |
msgid "The default value of \"Fast\" is fine for most sites."
|
929 |
msgstr ""
|
930 |
|
931 |
+
#: templates/options.php:221
|
932 |
msgid ""
|
933 |
"More frequent updates may impact Pagespeed reports on poorly performing "
|
934 |
"servers, reduce to rate if you are experiencing issues."
|
935 |
msgstr ""
|
936 |
|
937 |
+
#: templates/options.php:226
|
938 |
msgid "Log API Exceptions"
|
939 |
msgstr ""
|
940 |
|
941 |
+
#: templates/options.php:228
|
942 |
msgid "API error logs will be stored for up to 7 days."
|
943 |
msgstr ""
|
944 |
|
945 |
+
#: templates/options.php:228
|
946 |
msgid "View Logs"
|
947 |
msgstr ""
|
948 |
|
949 |
+
#: templates/options.php:230
|
950 |
msgid "Delete Data"
|
951 |
msgstr ""
|
952 |
|
953 |
+
#: templates/options.php:232
|
954 |
msgid "Do Nothing"
|
955 |
msgstr ""
|
956 |
|
957 |
+
#: templates/options.php:233
|
958 |
msgid "Delete Reports Only"
|
959 |
msgstr ""
|
960 |
|
961 |
+
#: templates/options.php:234
|
962 |
msgid "Delete EVERYTHING"
|
963 |
msgstr ""
|
964 |
|
965 |
+
#: templates/options.php:236
|
966 |
msgid "Warning"
|
967 |
msgstr ""
|
968 |
|
969 |
+
#: templates/options.php:236
|
970 |
msgid "This option can not be reversed."
|
971 |
msgstr ""
|
972 |
|
973 |
+
#: templates/options.php:245 templates/options.php:247
|
974 |
msgid "Save Options"
|
975 |
msgstr ""
|
976 |
|
1027 |
"your API Key restrictions, please visit the"
|
1028 |
msgstr ""
|
1029 |
|
1030 |
+
#: templates/parts/messages.php:73
|
1031 |
msgid ""
|
1032 |
"API error logging is disabled. Enable \"Log API Exceptions\" to record new "
|
1033 |
"errors."
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: templates/parts/messages.php:78
|
1037 |
msgid ""
|
1038 |
"One or more URLs could not be reached by Google Pagespeed Insights and have "
|
1039 |
"automatically been added to the"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
+
#: templates/parts/messages.php:78 templates/parts/messages.php:83
|
1043 |
+
#: templates/parts/navigation.php:34
|
1044 |
msgid "Ignored URLs"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
+
#: templates/parts/messages.php:83
|
1048 |
msgid ""
|
1049 |
"An error has been encountered while checking one or more URLs. Possible "
|
1050 |
"causes: <br /><br />Daily API Limit Exceeded <a href=\"https://code.google."
|
1054 |
"is bad. <br /><br />The URL(s) have been added to the"
|
1055 |
msgstr ""
|
1056 |
|
1057 |
+
#: templates/parts/messages.php:90
|
1058 |
msgid ""
|
1059 |
"Google Pagespeed has successfully stopped checking pages due to a user "
|
1060 |
"requested abort."
|
1061 |
msgstr ""
|
1062 |
|
1063 |
+
#: templates/parts/messages.php:91
|
1064 |
msgid "Google Pagespeed has finished checking pagespeed scores."
|
1065 |
msgstr ""
|
1066 |
|
1067 |
+
#: templates/parts/messages.php:91
|
1068 |
msgid "See new results"
|
1069 |
msgstr ""
|
1070 |
|
1071 |
+
#: templates/parts/messages.php:92
|
1072 |
msgid "Google Pagespeed is running in the background "
|
1073 |
msgstr ""
|
1074 |
|
1075 |
+
#: templates/parts/messages.php:95
|
1076 |
msgid "Google Pagespeed is running in the background. Progress... "
|
1077 |
msgstr ""
|
1078 |
|
1079 |
+
#: templates/parts/messages.php:95
|
1080 |
msgid "URL(s) checked"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
+
#: templates/parts/messages.php:95
|
1084 |
msgid "Refresh to update progress or see new results."
|
1085 |
msgstr ""
|
1086 |
|
1087 |
+
#: templates/parts/messages.php:101
|
1088 |
msgid ""
|
1089 |
"Google Pagespeed Options cannot be changed while Pagespeed is running. "
|
1090 |
"Please wait until it has finished to make any changes."
|
1091 |
msgstr ""
|
1092 |
|
1093 |
+
#: templates/parts/messages.php:108
|
1094 |
msgid ""
|
1095 |
"The last pagespeed report scan failed to finish successfully. We have "
|
1096 |
"detected that your server may not allow the maximum execution time to be "
|
1099 |
"Run Time in the Advanced Configuration section on the"
|
1100 |
msgstr ""
|
1101 |
|
1102 |
+
#: templates/parts/messages.php:108 templates/parts/messages.php:110
|
1103 |
msgid "Options Page"
|
1104 |
msgstr ""
|
1105 |
|
1106 |
+
#: templates/parts/messages.php:110
|
1107 |
msgid ""
|
1108 |
"The last pagespeed report scan failed to finish successfully. If you "
|
1109 |
"continue to experience problems with pagespeed report scans failing to "
|
1127 |
msgid "Report Details"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
+
#: templates/parts/navigation.php:19
|
1131 |
+
msgid "Snapshots"
|
1132 |
msgstr ""
|
1133 |
|
1134 |
#: templates/parts/navigation.php:24
|
1135 |
+
msgid "Compare Snapshots"
|
1136 |
+
msgstr ""
|
1137 |
+
|
1138 |
+
#: templates/parts/navigation.php:37
|
1139 |
msgid "Logs"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
+
#: templates/summary.php:59
|
1143 |
+
msgid "Save Report Snapshot"
|
1144 |
msgstr ""
|
1145 |
|
1146 |
+
#: templates/summary.php:80 templates/view-snapshot.php:76
|
1147 |
+
#: templates/view-snapshot.php:122
|
1148 |
msgid "Size of Resources (in kB)"
|
1149 |
msgstr ""
|
1150 |
|
1151 |
+
#: templates/summary.php:81 templates/view-snapshot.php:77
|
1152 |
+
#: templates/view-snapshot.php:123
|
1153 |
msgid "Lowest"
|
1154 |
msgstr ""
|
1155 |
|
1156 |
+
#: templates/summary.php:83 templates/view-snapshot.php:79
|
1157 |
+
#: templates/view-snapshot.php:125
|
1158 |
msgid "Highest"
|
1159 |
msgstr ""
|
1160 |
|
1161 |
+
#: templates/summary.php:90 templates/view-snapshot.php:86
|
1162 |
+
#: templates/view-snapshot.php:132
|
1163 |
msgid "Largest Areas for Improvement"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
+
#: templates/summary.php:91
|
1167 |
msgid "Pages Impacted"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
+
#: templates/summary.php:92 templates/view-snapshot.php:88
|
1171 |
+
#: templates/view-snapshot.php:134
|
1172 |
msgid "Average Impact"
|
1173 |
msgstr ""
|
1174 |
|
1175 |
+
#: templates/summary.php:99 templates/view-snapshot.php:95
|
1176 |
+
#: templates/view-snapshot.php:141
|
1177 |
msgid "Highest Scoring Pages"
|
1178 |
msgstr ""
|
1179 |
|
1180 |
+
#: templates/summary.php:106 templates/view-snapshot.php:102
|
1181 |
+
#: templates/view-snapshot.php:148
|
1182 |
msgid "Lowest Scoring Pages"
|
1183 |
msgstr ""
|
1184 |
|
1185 |
+
#: templates/summary.php:120
|
1186 |
msgid "There may not be any results for the \""
|
1187 |
msgstr ""
|
1188 |
|
1189 |
+
#: templates/summary.php:123
|
1190 |
msgid "There may not be any"
|
1191 |
msgstr ""
|
1192 |
|
1193 |
+
#: templates/summary.php:123
|
1194 |
msgid "reports completed yet."
|
1195 |
msgstr ""
|
1196 |
|
1197 |
+
#: templates/summary.php:123
|
1198 |
msgid "Try switching the report mode."
|
1199 |
msgstr ""
|
1200 |
+
|
1201 |
+
#: templates/view-snapshot.php:30
|
1202 |
+
msgid "Apply"
|
1203 |
+
msgstr ""
|
1204 |
+
|
1205 |
+
#: templates/view-snapshot.php:57
|
1206 |
+
msgid "Compare"
|
1207 |
+
msgstr ""
|
1208 |
+
|
1209 |
+
#: templates/view-snapshot.php:87 templates/view-snapshot.php:133
|
1210 |
+
msgid "Pages Effected"
|
1211 |
+
msgstr ""
|