PluginProbe
Polylang / 2.8
Polylang v2.8
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | admin/admin-block-editor.php +7 -17 3.02.8 View file →
@@ -8,21 +8,11 @@
8 8 *
9 9 * @since 2.5
10 10 */
11 11 class PLL_Admin_Block_Editor {
12 - /**
13 - * @var PLL_Model
14 - */
15 - protected $model;
12 + public $model;
16 13
17 14 /**
18 - * Preferred language to assign to a new post.
19 - *
20 - * @var PLL_Language
21 - */
22 - protected $pref_lang;
23 -
24 - /**
25 15 * Constructor: setups filters and actions
26 16 *
27 17 * @since 2.5
28 18 *
@@ -35,17 +25,17 @@
35 25 add_filter( 'block_editor_preload_paths', array( $this, 'preload_paths' ), 10, 2 );
36 26 }
37 27
38 28 /**
39 - * Filters the preload REST requests by the current language of the post.
40 - * Necessary otherwise subsequent REST requests, all filtered by the language,
41 - * would not hit the preloaded requests.
29 + * Filter the preload REST requests by the current language of the post
30 + * Necessary otherwise subsequent REST requests all filtered by the language
31 + * would not hit the preloaded requests
42 32 *
43 33 * @since 2.5
44 34 *
45 - * @param (string|string[])[] $preload_paths Array of paths to preload.
46 - * @param WP_Post $post The post resource data.
47 - * @return (string|string[])[]
35 + * @param array $preload_paths Array of paths to preload.
36 + * @param object $post The post resource data.
37 + * @return array
48 38 */
49 39 public function preload_paths( $preload_paths, $post ) {
50 40 if ( $this->model->is_translated_post_type( $post->post_type ) ) {
51 41 $lang = $this->model->post->get_language( $post->ID );