Skip to content

Commit

Permalink
Disable warning in admin UI for excluded option pages
Browse files Browse the repository at this point in the history
  • Loading branch information
turpoint committed Jun 11, 2024
1 parent 0b74f5c commit 38340fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion classes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ protected function init() {
/**
* Displays context-sensitive help to the user
*/
public function submitbox_before_major_actions() {
public function submitbox_before_major_actions($page) {
// If Polylang isn't active for this page, don't display the message
if ( ! Helpers::is_option_page( $page['post_id'] ) ) {
return;
}

$current_lang = pll_current_language( 'name' );
if ( false !== $current_lang ) {
/* translators: %s: current language name */
Expand Down

0 comments on commit 38340fd

Please sign in to comment.