Skip to content

Commit

Permalink
Merge release in develop.
Browse files Browse the repository at this point in the history
  • Loading branch information
alecszaharia committed Oct 21, 2024
2 parents 390e6f1 + 8f3da40 commit f8aaec8
Show file tree
Hide file tree
Showing 101 changed files with 25,712 additions and 24,852 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: themefuse<br>
Requires at least: 4.5<br>
Tested up to: 6.6.2<br>
Requires PHP: 7.2.24<br>
Stable tag: 2.5.8<br>
Stable tag: 2.5.9<br>
License: GPLv3<br>
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -136,6 +136,12 @@ $bodyHtml = apply_filters( 'brizy_content', $html->get_body(), Brizy_Editor_Proj

## Changelog

### 2.5.9 - 2024-10-21
* Fixed: CSS styles in Hamburger Menu
* Fixed: File upload extension issues
* Fixed: Image links pointing incorrectly
* Improved: Page, Popup and Global Blocks dependencies

### 2.5.8 - 2024-09-19
* Fixed: Anchor link with dynamic ID placeholder
* Fixed: Missing Icon for help video
Expand Down
14 changes: 14 additions & 0 deletions admin/blocks/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ public function actionCreateGlobalBlock() {
$position = stripslashes( $this->param( 'position' ) );
$status = stripslashes( $this->param( 'status' ) );
$rulesData = stripslashes( $this->param( 'rules' ) );
$dependencies = stripslashes( $this->param( 'dependencies' ) );

if ( ! in_array( $status, [ 'publish', 'draft' ] ) ) {
$this->error( 400, "Invalid status" );
Expand All @@ -248,6 +249,10 @@ public function actionCreateGlobalBlock() {
$block->set_needs_compile( true );
$block->setHtml( $html );

if(is_array($dependencies) && count($dependencies)>0){
$block->setDependencies($dependencies);
}

if ( $status == 'publish' && $compiledData ) {

$compiled = json_decode( $compiledData, true );
Expand Down Expand Up @@ -314,6 +319,7 @@ public function actionUpdateGlobalBlock() {

$compiledData = stripslashes( $this->param( 'compiled' ) );
$status = stripslashes( $this->param( 'status' ) );
$dependencies = json_decode(stripslashes( $this->param( 'dependencies' ) ));

if ( ! in_array( $status, [ 'publish', 'draft' ] ) ) {
$this->error( 400, "Invalid post type" );
Expand Down Expand Up @@ -374,6 +380,10 @@ public function actionUpdateGlobalBlock() {
$block->setTags( stripslashes( $this->param( 'tags' ) ) );
}

if(is_array($dependencies)){
$block->setDependencies($dependencies);
}

if(!current_user_can('edit_pages')) {
$this->error(403, 'Unauthorized.');
}if ( (int) $this->param( 'is_autosave' ) ) {
Expand Down Expand Up @@ -463,6 +473,10 @@ public function actionUpdateGlobalBlocks() {
$block->setTitle( stripslashes( $this->param( 'title' )[ $i ] ) );
}

if(is_array($this->param( 'dependencies' )[ $i ]) && count($this->param( 'dependencies' )[ $i ])>0){
$block->setDependencies($this->param( 'dependencies' )[ $i ]);
}


if ( isset( $this->param( 'tags' )[ $i ] ) ) {
$block->setTags( stripslashes( $this->param( 'tags' )[ $i ] ) );
Expand Down
Loading

0 comments on commit f8aaec8

Please sign in to comment.