Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
esamattis committed Apr 16, 2020
1 parent 44bf9ac commit f276d0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ function __action_graphql_init()
// ACF Pro and "ACF Options For Polylang" plugins are required for
// options pages
// https://wordpress.org/plugins/acf-options-for-polylang/
if (defined('BEA_ACF_OPTIONS_FOR_POLYLANG_VERSION') && function_exists('acf_add_options_page')) {
if (
defined('BEA_ACF_OPTIONS_FOR_POLYLANG_VERSION') &&
function_exists('acf_add_options_page')
) {
OptionsPages::init();
}

Expand Down
7 changes: 4 additions & 3 deletions src/OptionsPages.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@
*/
class OptionsPages
{

/**
* Mapping of used options page root queries to their selected languages
*/
static $root_query_locale_mapping = [];


/**
* Language of the currently resolving options page field
*/
Expand Down Expand Up @@ -93,7 +91,10 @@ static function __action_graphql_before_resolve_field(
/**
* Record what languages are used by the options page root queries
*/
if (isset($args['language']) && self::is_options_page_root_query($info)) {
if (
isset($args['language']) &&
self::is_options_page_root_query($info)
) {
$model = \PLL()->model;
$lang = $model->get_language($args['language'])->locale ?? null;

Expand Down

0 comments on commit f276d0b

Please sign in to comment.