'cpt', 'title' => __( 'Custom post types and Taxonomies', 'polylang' ), 'description' => __( 'Activate languages and translations management for the custom post types and the taxonomies.', 'polylang' ), ) ); $public_post_types = get_post_types( array( 'public' => true, '_builtin' => false ) ); /** This filter is documented in include/model.php */ $this->post_types = array_unique( apply_filters( 'pll_get_post_types', $public_post_types, true ) ); $programmatically_active_post_types = array_unique( apply_filters( 'pll_get_post_types', array(), false ) ); /** This filter is documented in include/model.php */ $this->disabled_post_types = array_intersect( $programmatically_active_post_types, $this->post_types ); $public_taxonomies = get_taxonomies( array( 'public' => true, '_builtin' => false ) ); $public_taxonomies = array_diff( $public_taxonomies, get_taxonomies( array( '_pll' => true ) ) ); /** This filter is documented in include/model.php */ $this->taxonomies = array_unique( apply_filters( 'pll_get_taxonomies', $public_taxonomies, true ) ); $programmatically_active_taxonomies = array_unique( apply_filters( 'pll_get_taxonomies', array(), false ) ); /** This filter is documented in include/model.php */ $this->disabled_taxonomies = array_intersect( $programmatically_active_taxonomies, $this->taxonomies ); } /** * Tells if the module is active * * @since 1.8 * * @return bool */ public function is_active() { return ! empty( $this->post_types ) || ! empty( $this->taxonomies ); } /** * Displays the settings form * * @since 1.8 */ protected function form() { if ( ! empty( $this->post_types ) ) {?>

taxonomies ) ) { ?>