PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
← All changes | compatibility/class-wpo-custom-permalink-compatibility.php +6 -6 3.4.0 → 4.7.0 View file →
@@ -9,11 +9,9 @@
9 9 /**
10 10 * Constructor.
11 11 */
12 12 private function __construct() {
13 - if (!class_exists('Custom_Permalinks')) return;
14 -
15 - add_filter('custom_permalink_before_saving', array($this, 'custom_permalink_before_saving'), 10, 1);
13 + add_filter('custom_permalink_before_saving', array($this, 'custom_permalink_before_saving'));
16 14 add_filter('pre_update_option_custom_permalink_table', array($this, 'pre_update_option_custom_permalink_table'), 10, 2);
17 15 add_action('update_option_permalink_structure', array($this, 'update_option_permalink_structure'), 10, 2);
18 16 }
19 17
@@ -18,13 +16,15 @@
18 16 }
19 17
20 18 /**
21 19 * Returns singleton instance.
20 + *
21 + * @return self
22 22 */
23 23 public static function instance() {
24 24 static $instance = null;
25 - if (null == $instance) {
26 - $instance = new static;
25 + if (null === $instance) {
26 + $instance = new self();
27 27 }
28 28
29 29 return $instance;
30 30 }
@@ -120,9 +120,9 @@
120 120 *
121 121 * @return void
122 122 */
123 123 private function update_posts_custom_permalinks() {
124 - $post_types = get_post_types(array('public' => true), 'names');
124 + $post_types = get_post_types(array('public' => true));
125 125 $args = array(
126 126 'post_type' => $post_types,
127 127 'posts_per_page' => -1,
128 128 );