File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ class Stackable_Dynamic_Breakpoints {
2525
2626 // Holds the value of the saved or default breakpoints
2727 private $ dynamic_breakpoints = false ;
28+ private $ has_custom_breakpoints = false ;
2829
2930 /**
3031 * Add our hooks.
@@ -78,7 +79,7 @@ public function get_dynamic_breakpoints() {
7879 }
7980
8081 $ this ->dynamic_breakpoints = $ breakpoints ;
81- return $ this ->dynamic_breakpoints ;
82+ $ this ->has_custom_breakpoints = ! empty ( $ breakpoints [ ' tablet ' ] ) || ! empty ( $ breakpoints [ ' mobile ' ] ) ;
8283 }
8384
8485 /**
@@ -141,11 +142,10 @@ public function sanitize_array_setting( $input ) {
141142 * @return boolean
142143 */
143144 public function has_custom_breakpoints () {
144- $ breakpoints = $ this ->dynamic_breakpoints ;
145- if ( $ breakpoints == false ) {
146- $ breakpoints = $ this ->get_dynamic_breakpoints ();
145+ if ( $ this ->dynamic_breakpoints === false ) {
146+ $ this ->get_dynamic_breakpoints ();
147147 }
148- return ! empty ( $ breakpoints [ ' tablet ' ] ) || ! empty ( $ breakpoints [ ' mobile ' ] ) ;
148+ return $ this -> has_custom_breakpoints ;
149149 }
150150
151151 /**
You can’t perform that action at this time.
0 commit comments