PluginProbe
Autoptimize / 3.1.16
Autoptimize v3.1.16
3.1.16 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 All 108 releases
← All changes | classes/autoptimizePartners.php +14 -11 2.7.1 → 3.1.16 View file →
@@ -33,11 +33,14 @@
33 33 }
34 34
35 35 public function add_partner_tabs( $in )
36 36 {
37 - $in = array_merge( $in, array(
38 - 'ao_partners' => __( 'Optimize More!', 'autoptimize' ),
39 - ) );
37 + $in = array_merge(
38 + $in,
39 + array(
40 + 'ao_partners' => esc_html__( 'Optimize More!', 'autoptimize' ),
41 + )
42 + );
40 43
41 44 return $in;
42 45 }
43 46
@@ -43,15 +46,15 @@
43 46
44 47 public function add_admin_menu()
45 48 {
46 49 if ( $this->enabled() ) {
47 - add_submenu_page( null, 'AO partner', 'AO partner', 'manage_options', 'ao_partners', array( $this, 'ao_partners_page' ) );
50 + add_submenu_page( '', 'AO partner', 'AO partner', 'manage_options', 'ao_partners', array( $this, 'ao_partners_page' ) );
48 51 }
49 52 }
50 53
51 54 protected function get_ao_partner_feed_markup()
52 55 {
53 - $no_feed_text = __( 'Have a look at <a href="http://optimizingmatters.com/">optimizingmatters.com</a> for Autoptimize power-ups!', 'autoptimize' );
56 + $no_feed_text = sprintf( esc_html__( 'Have a look at %1$sAutoptimize Pro%2$s to power-up your site!', 'autoptimize' ), '<a href="http://autoptimize.com/pro">', '</a>' );
54 57 $output = '';
55 58 if ( apply_filters( 'autoptimize_settingsscreen_remotehttp', true ) ) {
56 59 $rss = fetch_feed( 'http://feeds.feedburner.com/OptimizingMattersDownloads' );
57 60 $maxitems = 0;
@@ -77,9 +80,9 @@
77 80 $output .= '<div class="itemImage"><a href="' . $item_url . '" target="_blank"><img src="' . $img_url . '"></a></div>';
78 81 }
79 82
80 83 $output .= '<div class="itemDescription">' . wp_kses_post( $item->get_description() ) . '</div>';
81 - $output .= '<div class="itemButtonRow"><div class="itemButton button-secondary"><a href="' . $item_url . '" target="_blank">' . __( 'More info', 'autoptimize' ) . '</a></div></div>';
84 + $output .= '<div class="itemButtonRow"><div class="itemButton button-secondary"><a href="' . $item_url . '" target="_blank">' . esc_html__( 'More info', 'autoptimize' ) . '</a></div></div>';
82 85 $output .= '</li>';
83 86 }
84 87 $output .= '</ul>';
85 88 }
@@ -91,9 +94,9 @@
91 94 }
92 95
93 96 public function ao_partners_page()
94 97 {
95 -?>
98 + ?>
96 99 <style>
97 100 .itemDetail {
98 101 background: #fff;
99 102 width: 250px;
@@ -135,16 +138,16 @@
135 138 text-decoration: none;
136 139 color: #23282d;
137 140 }
138 141 </style>
139 - <script>document.title = "Autoptimize: <?php _e( 'Optimize More!', 'autoptimize' ); ?> " + document.title;</script>
142 + <script>document.title = "Autoptimize: <?php esc_html_e( 'Optimize More!', 'autoptimize' ); ?> " + document.title;</script>
140 143 <div class="wrap">
141 - <h1><?php _e( 'Autoptimize Settings', 'autoptimize' ); ?></h1>
144 + <h1><?php apply_filters( 'autoptimize_filter_settings_is_pro', false ) ? esc_html_e( 'Autoptimize Pro Settings', 'autoptimize' ) : esc_html_e( 'Autoptimize Settings', 'autoptimize' ); ?></h1>
142 145 <?php echo autoptimizeConfig::ao_admin_tabs(); ?>
143 - <?php echo '<h2>' . __( "These Autoptimize power-ups and related services will improve your site's performance even more!", 'autoptimize' ) . '</h2>'; ?>
146 + <?php echo '<h2>' . esc_html__( "These Autoptimize power-ups and related services will improve your site's performance even more!", 'autoptimize' ) . '</h2>'; ?>
144 147 <div>
145 148 <?php echo $this->get_ao_partner_feed_markup(); ?>
146 149 </div>
147 150 </div>
148 -<?php
151 + <?php
149 152 }
150 153 }