Skip to content

Commit 2e73dc8

Browse files
optimized global typography settings to remove one function call if not needed
1 parent 833c14a commit 2e73dc8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/global-settings.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ function __construct() {
6969
*
7070
* @since 2.17.1
7171
*/
72-
// Don't do anything if we don't have any global typography.
73-
$typography = get_option( 'stackable_global_typography' );
74-
if ( ! empty( $typography ) && is_array( $typography ) ) {
72+
// Only do this if we have global typography.
73+
if ( $this->has_global_typography() ) {
7574
$this->force_typography = get_option( 'stackable_global_force_typography' );
7675
add_action( 'after_setup_theme', array( $this, 'typography_parse_global_styles' ) );
7776
}

0 commit comments

Comments
 (0)