Skip to content

Commit

Permalink
Curl erros
Browse files Browse the repository at this point in the history
  • Loading branch information
rramo012 committed Mar 8, 2018
1 parent aaa1a2e commit 31976f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions assets/js/builder/gridblock/industry.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ export class Industry {
*/
_setDefault() {
const inspirationCategory = this._getInspirationsCategory(),
defaultCategory = BoldgridEditor.block_default_industry || inspirationCategory;
defaultCategory =
BoldgridEditor.block_default_industry || inspirationCategory || this.defaults.selection;

if ( this.$select.find( '[value="' + defaultCategory + '"]' ).length ) {

Expand All @@ -155,7 +156,7 @@ export class Industry {
let category;

if ( BoldgridEditor.inspiration && BoldgridEditor.inspiration.subcategory_key ) {
category = BoldgridEditor.inspiration.subcategory_key;
category = BoldgridEditor.inspiration.subcategory_key.toLowerCase();
}

if ( 'property_management' === category ) {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/editor.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions includes/class-boldgrid-editor-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ public function generate_blocks() {
// If the user has not yet reqyested gridblocks, return from our preset collection.
$params['collection'] = ! $times_requested ? 1 : false;

$api_response = wp_remote_get( self::get_end_point('gridblock_generate'), array(
// Dont put the parameters in the body breaks wp version < 4.6.
$api_response = wp_remote_get( self::get_end_point('gridblock_generate') . '?' . http_build_query( $params ), array(
'timeout' => 10,
'body' => $params,
) );

if ( ! is_wp_error( $api_response ) ) {
Expand Down

0 comments on commit 31976f7

Please sign in to comment.