Skip to content

Commit

Permalink
Check if pll_translatable is set
Browse files Browse the repository at this point in the history
  • Loading branch information
ronilaukkarinen committed Nov 19, 2024
1 parent 2b803a2 commit 5e52dd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Demo: Prevent spaces in theme-info link
* Fix newtheme-popos.sh script location detection
* Check if pll_translatable is set

### 9.4.5: 2024-10-25

Expand Down
2 changes: 1 addition & 1 deletion inc/includes/post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ abstract protected function register();
*/
public function register_wp_post_type( $slug, $args ) {
// Register PolyLang translatable only if it's private
if ( $args['pll_translatable'] && false === $args['public'] ) {
if ( isset( $args['pll_translatable'] ) && $args['pll_translatable'] && false === $args['public'] ) {
add_filter( 'pll_get_post_types', function( $cpts ) use ( $slug ) {
$cpts[ $slug ] = $slug;

Expand Down

0 comments on commit 5e52dd9

Please sign in to comment.