PluginProbe
Polylang / 3.1.4
Polylang v3.1.4
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 | settings/settings-cpt.php +39 -3 2.73.1.4 View file →
@@ -1,5 +1,8 @@
1 1 <?php
2 +/**
3 + * @package Polylang
4 + */
2 5
3 6 /**
4 7 * Settings class for custom post types and taxonomies language and translation management
5 8 *
@@ -5,11 +8,44 @@
5 8 *
6 9 * @since 1.8
7 10 */
8 11 class PLL_Settings_CPT extends PLL_Settings_Module {
9 - private $post_types, $disabled_post_types, $taxonomies, $disabled_taxonomies;
12 + /**
13 + * Stores the display order priority.
14 + *
15 + * @var int
16 + */
17 + public $priority = 40;
10 18
11 19 /**
20 + * The list of post types to show in the form.
21 + *
22 + * @var string[]
23 + */
24 + private $post_types;
25 +
26 + /**
27 + * The list of post types to disable in the form.
28 + *
29 + * @var string[]
30 + */
31 + private $disabled_post_types;
32 +
33 + /**
34 + * The list of taxonomies to show in the form.
35 + *
36 + * @var string[]
37 + */
38 + private $taxonomies;
39 +
40 + /**
41 + * The list of taxonomies to disable in the form.
42 + *
43 + * @var string[]
44 + */
45 + private $disabled_taxonomies;
46 +
47 + /**
12 48 * Constructor
13 49 *
14 50 * @since 1.8
15 51 *
@@ -28,10 +64,10 @@
28 64 $public_post_types = get_post_types( array( 'public' => true, '_builtin' => false ) );
29 65 /** This filter is documented in include/model.php */
30 66 $this->post_types = array_unique( apply_filters( 'pll_get_post_types', $public_post_types, true ) );
31 67
68 + /** This filter is documented in include/model.php */
32 69 $programmatically_active_post_types = array_unique( apply_filters( 'pll_get_post_types', array(), false ) );
33 - /** This filter is documented in include/model.php */
34 70 $this->disabled_post_types = array_intersect( $programmatically_active_post_types, $this->post_types );
35 71
36 72 $public_taxonomies = get_taxonomies( array( 'public' => true, '_builtin' => false ) );
37 73 $public_taxonomies = array_diff( $public_taxonomies, get_taxonomies( array( '_pll' => true ) ) );
@@ -37,10 +73,10 @@
37 73 $public_taxonomies = array_diff( $public_taxonomies, get_taxonomies( array( '_pll' => true ) ) );
38 74 /** This filter is documented in include/model.php */
39 75 $this->taxonomies = array_unique( apply_filters( 'pll_get_taxonomies', $public_taxonomies, true ) );
40 76
77 + /** This filter is documented in include/model.php */
41 78 $programmatically_active_taxonomies = array_unique( apply_filters( 'pll_get_taxonomies', array(), false ) );
42 - /** This filter is documented in include/model.php */
43 79 $this->disabled_taxonomies = array_intersect( $programmatically_active_taxonomies, $this->taxonomies );
44 80 }
45 81
46 82 /**