Hi, I attempted to change the Breakpoint Ranges using the Developer Toolkit within Cornerstone. The value changed from an array [ 480, 767, 979, 1200 ]
to a string x_breakpoint_ranges
and then everything started breaking. I tried to change the value back to the original array, but it won’t save. It keeps reverting back to the string.
Here is the error message:
Warning: array_map(): Expected parameter 2 to be an array, string given in /Users/colinsafranek/Local Sites/pinnacle-dev/app/public/wp-content/themes/pro/cornerstone/includes/classes/Services/Breakpoints.php on line *25*
Same message for lines 25, 14, and 15 of Breakpoints.php
I need a way to restore the proper setting value so that I can get back to developing the site… Is the setting stored in the database somewhere?
In Breakpoints.php the default ranges are hardcoded like this:
public function defaultRanges() {
return [ 480, 767, 979, 1200 ];
}
What I have done is changed line 25 from this:
public function breakpointRanges() {
if ( ! isset( $this->ranges ) ) {
$this->ranges = array_map( 'intval', apply_filters( 'cs_breakpoint_ranges', array_slice( $this->defaultRanges(), 0, 2) ) );
}
return $this->ranges;
}
to this:
public function breakpointRanges() {
if ( ! isset( $this->ranges ) ) {
$this->ranges = array_map( 'intval', array(480, 767, 979, 1200) );
}
return $this->ranges;
}
And this has allowed me to access the admin and cornerstone again, but I am still unable to change the breakpoint ranges setting back to the original array. No matter what I put as the value of that setting, it does not save, and reverts to the string x_breakpoint_ranges
.
Sorry, I can’t share login info because this site is being developed locally (using Local WP). So I’ll need a description/instructions on how to reset the cornerstone breakpoint ranges setting manually.
Please help! Thank you very much in advance for saving my ass.