PluginProbe
ElasticPress / 5.3.5
ElasticPress v5.3.5
5.3.5 5.3.4 3.6.5 3.6.6 4.0.0 4.0.1 4.1.0 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 5.0.0 5.0.1 5.0.2 All 108 releases
← All changes | includes/classes/Feature/RelatedPosts/Widget.php +7 -4 4.2.05.3.5 View file →
@@ -7,10 +7,9 @@
7 7 */
8 8
9 9 namespace ElasticPress\Feature\RelatedPosts;
10 10
11 -use \WP_Widget as WP_Widget;
12 -use ElasticPress\Features as Features;
11 +use ElasticPress\Features;
13 12
14 13 if ( ! defined( 'ABSPATH' ) ) {
15 14 exit; // Exit if accessed directly.
16 15 }
@@ -17,9 +16,9 @@
17 16
18 17 /**
19 18 * Related posts widget class
20 19 */
21 -class Widget extends WP_Widget {
20 +class Widget extends \WP_Widget {
22 21
23 22 /**
24 23 * Initialize the widget
25 24 *
@@ -25,9 +24,13 @@
25 24 *
26 25 * @since 6.4
27 26 */
28 27 public function __construct() {
29 - $options = array( 'description' => esc_html__( 'Show related posts using ElasticPress. This widget will only appear on single post, page, and custom type pages.', 'elasticpress' ) );
28 + $options = array(
29 + 'description' => esc_html__( 'Show related posts using ElasticPress. This widget will only appear on single post, page, and custom type pages.', 'elasticpress' ),
30 + 'show_instance_in_rest' => true,
31 + );
32 +
30 33 parent::__construct( 'ep-related-posts', esc_html__( 'ElasticPress - Related Posts', 'elasticpress' ), $options );
31 34 }
32 35
33 36 /**