Plugin Directory

Changeset 2171131


Ignore:
Timestamp:
10/10/2019 11:14:22 AM (6 years ago)
Author:
frontkom
Message:

Release version 1.1.8

Location:
cloud-blocks
Files:
1 deleted
4 edited
44 copied

Legend:

Unmodified
Added
Removed
  • cloud-blocks/tags/1.1.8/cloud-blocks.php

    r2098382 r2171131  
    22/*
    33Plugin Name: Cloud Blocks
    4 Version: 1.1.7
     4Version: 1.1.8
    55Description: Your library of Gutenberg blocks in the cloud
    66Author: Frontkom
     
    3030// Plugin version .
    3131if ( ! defined( 'FGC_VERSION' ) ) {
    32     define( 'FGC_VERSION', '1.1.7' );
     32    define( 'FGC_VERSION', '1.1.8' );
    3333}
    3434
  • cloud-blocks/tags/1.1.8/core/Blocks/Blocks.php

    r2065536 r2171131  
    239239
    240240      // Extract block js and css files
    241       foreach ($block_files as $file) {
    242         if ( preg_match('/style.css$/i', $file) ) {
    243           preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $file, $block_style );
     241      if ( isset( $block_files ) && !empty( $block_files ) ) {
     242        foreach ($block_files as $file) {
     243          if ( preg_match('/style.css$/i', $file) ) {
     244            preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $file, $block_style );
     245          }
     246          if ( preg_match('/editor.css$/i', $file) ) {
     247            preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $file, $editor_style );
     248          }
     249          if ( preg_match('/index.js$/i', $file) ) {
     250            preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $file, $block_script );
     251          }
    244252        }
    245         if ( preg_match('/editor.css$/i', $file) ) {
    246           preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $file, $editor_style );
    247         }
    248         if ( preg_match('/index.js$/i', $file) ) {
    249           preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $file, $block_script );
    250         }
    251       }
    252       // Extract block screenshot
    253       foreach ($screenshot as $img) {
    254         if ( preg_match('/thumbnail|screenshot/i', $img) ) {
    255           preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $img, $block_thumbnail );
     253        // Extract block screenshot
     254        foreach ($screenshot as $img) {
     255          if ( preg_match('/thumbnail|screenshot/i', $img) ) {
     256            preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $img, $block_thumbnail );
     257          }
    256258        }
    257259      }
     
    277279          'isLocal'         => true
    278280        );
    279       }
    280 
    281       $local_blocks[] = array(
    282         'name'            => isset( $package_json->gutenbergCloud->name ) ? $package_json->gutenbergCloud->name : $package_json->name,
    283         'packageName'     => isset( $package_json->name ) ? $package_json->name : '',
    284         'jsUrl'           => ( isset( $block_script ) && !empty( $block_script ) ) ? site_url() . '/' . $block_script[0] : site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->js,
    285         'cssUrl'          => ( isset( $block_style ) && !empty( $block_style ) ) ? site_url() . '/' . $block_style[0] : site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->css,
    286         'editorCss'       => ( isset( $editor_style ) && !empty( $editor_style ) ) ? site_url() . '/' . $editor_style[0] : site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->editor,
    287         'infoUrl'         => 'https://www.npmjs.com/package/' . $package_json->name,
    288         'imageUrl'        => ( !isset( $block_thumbnail ) && empty( $block_thumbnail ) ) ? ( ( isset( $package_json->gutenbergCloud ) && !empty( $package_json->gutenbergCloud->thumbnail ) ) ? site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->thumbnail : '' ) : site_url() . '/' . $block_thumbnail[0],
    289         'version'         => isset( $package_json->version ) ? $package_json->version : '',
    290         'blockManifest'   => json_encode($block_manifest)
    291       );
    292 
     281
     282        $local_blocks[] = array(
     283          'name'            => isset( $package_json->gutenbergCloud->name ) ? $package_json->gutenbergCloud->name : $package_json->name,
     284          'packageName'     => isset( $package_json->name ) ? $package_json->name : '',
     285          'jsUrl'           => ( isset( $block_script ) && !empty( $block_script ) ) ? site_url() . '/' . $block_script[0] : site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->js,
     286          'cssUrl'          => ( isset( $block_style ) && !empty( $block_style ) ) ? site_url() . '/' . $block_style[0] : site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->css,
     287          'editorCss'       => ( isset( $editor_style ) && !empty( $editor_style ) ) ? site_url() . '/' . $editor_style[0] : site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->editor,
     288          'infoUrl'         => 'https://www.npmjs.com/package/' . $package_json->name,
     289          'imageUrl'        => ( !isset( $block_thumbnail ) && empty( $block_thumbnail ) ) ? ( ( isset( $package_json->gutenbergCloud ) && !empty( $package_json->gutenbergCloud->thumbnail ) ) ? site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->thumbnail : '' ) : site_url() . '/' . $block_thumbnail[0],
     290          'version'         => isset( $package_json->version ) ? $package_json->version : '',
     291          'blockManifest'   => json_encode($block_manifest)
     292        );
     293      }
    293294
    294295    }
  • cloud-blocks/tags/1.1.8/docs/changelog.md

    r2098382 r2171131  
    11## Changelog
     2
     3#### 1.1.8
     4* **Fix**: Fix an issue with local blocks directory which was losting every files as block
    25
    36#### 1.1.7
  • cloud-blocks/tags/1.1.8/readme.txt

    r2098382 r2171131  
    66Tested up to: 5.2
    77Requires PHP: 5.4
    8 Stable tag: 1.1.7
     8Stable tag: 1.1.8
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7575
    7676== Changelog ==
     77
     78= 1.1.8 =
     79*Fix: Fix an issue with local blocks directory which was losting every files as block
    7780
    7881= 1.1.7 =
  • cloud-blocks/trunk/cloud-blocks.php

    r2098382 r2171131  
    22/*
    33Plugin Name: Cloud Blocks
    4 Version: 1.1.7
     4Version: 1.1.8
    55Description: Your library of Gutenberg blocks in the cloud
    66Author: Frontkom
     
    3030// Plugin version .
    3131if ( ! defined( 'FGC_VERSION' ) ) {
    32     define( 'FGC_VERSION', '1.1.7' );
     32    define( 'FGC_VERSION', '1.1.8' );
    3333}
    3434
  • cloud-blocks/trunk/core/Blocks/Blocks.php

    r2065536 r2171131  
    239239
    240240      // Extract block js and css files
    241       foreach ($block_files as $file) {
    242         if ( preg_match('/style.css$/i', $file) ) {
    243           preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $file, $block_style );
     241      if ( isset( $block_files ) && !empty( $block_files ) ) {
     242        foreach ($block_files as $file) {
     243          if ( preg_match('/style.css$/i', $file) ) {
     244            preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $file, $block_style );
     245          }
     246          if ( preg_match('/editor.css$/i', $file) ) {
     247            preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $file, $editor_style );
     248          }
     249          if ( preg_match('/index.js$/i', $file) ) {
     250            preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $file, $block_script );
     251          }
    244252        }
    245         if ( preg_match('/editor.css$/i', $file) ) {
    246           preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $file, $editor_style );
    247         }
    248         if ( preg_match('/index.js$/i', $file) ) {
    249           preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $file, $block_script );
    250         }
    251       }
    252       // Extract block screenshot
    253       foreach ($screenshot as $img) {
    254         if ( preg_match('/thumbnail|screenshot/i', $img) ) {
    255           preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $img, $block_thumbnail );
     253        // Extract block screenshot
     254        foreach ($screenshot as $img) {
     255          if ( preg_match('/thumbnail|screenshot/i', $img) ) {
     256            preg_match( '/wp-content\/uploads\/gutenberg-blocks\/[a-zA-Z0-9-_\/.]*/i', $img, $block_thumbnail );
     257          }
    256258        }
    257259      }
     
    277279          'isLocal'         => true
    278280        );
    279       }
    280 
    281       $local_blocks[] = array(
    282         'name'            => isset( $package_json->gutenbergCloud->name ) ? $package_json->gutenbergCloud->name : $package_json->name,
    283         'packageName'     => isset( $package_json->name ) ? $package_json->name : '',
    284         'jsUrl'           => ( isset( $block_script ) && !empty( $block_script ) ) ? site_url() . '/' . $block_script[0] : site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->js,
    285         'cssUrl'          => ( isset( $block_style ) && !empty( $block_style ) ) ? site_url() . '/' . $block_style[0] : site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->css,
    286         'editorCss'       => ( isset( $editor_style ) && !empty( $editor_style ) ) ? site_url() . '/' . $editor_style[0] : site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->editor,
    287         'infoUrl'         => 'https://www.npmjs.com/package/' . $package_json->name,
    288         'imageUrl'        => ( !isset( $block_thumbnail ) && empty( $block_thumbnail ) ) ? ( ( isset( $package_json->gutenbergCloud ) && !empty( $package_json->gutenbergCloud->thumbnail ) ) ? site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->thumbnail : '' ) : site_url() . '/' . $block_thumbnail[0],
    289         'version'         => isset( $package_json->version ) ? $package_json->version : '',
    290         'blockManifest'   => json_encode($block_manifest)
    291       );
    292 
     281
     282        $local_blocks[] = array(
     283          'name'            => isset( $package_json->gutenbergCloud->name ) ? $package_json->gutenbergCloud->name : $package_json->name,
     284          'packageName'     => isset( $package_json->name ) ? $package_json->name : '',
     285          'jsUrl'           => ( isset( $block_script ) && !empty( $block_script ) ) ? site_url() . '/' . $block_script[0] : site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->js,
     286          'cssUrl'          => ( isset( $block_style ) && !empty( $block_style ) ) ? site_url() . '/' . $block_style[0] : site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->css,
     287          'editorCss'       => ( isset( $editor_style ) && !empty( $editor_style ) ) ? site_url() . '/' . $editor_style[0] : site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->editor,
     288          'infoUrl'         => 'https://www.npmjs.com/package/' . $package_json->name,
     289          'imageUrl'        => ( !isset( $block_thumbnail ) && empty( $block_thumbnail ) ) ? ( ( isset( $package_json->gutenbergCloud ) && !empty( $package_json->gutenbergCloud->thumbnail ) ) ? site_url() . '/wp-content/uploads/gutenberg-blocks/' . $block_name[0] . '/' . $package_json->gutenbergCloud->thumbnail : '' ) : site_url() . '/' . $block_thumbnail[0],
     290          'version'         => isset( $package_json->version ) ? $package_json->version : '',
     291          'blockManifest'   => json_encode($block_manifest)
     292        );
     293      }
    293294
    294295    }
  • cloud-blocks/trunk/docs/changelog.md

    r2098382 r2171131  
    11## Changelog
     2
     3#### 1.1.8
     4* **Fix**: Fix an issue with local blocks directory which was losting every files as block
    25
    36#### 1.1.7
  • cloud-blocks/trunk/readme.txt

    r2098382 r2171131  
    66Tested up to: 5.2
    77Requires PHP: 5.4
    8 Stable tag: 1.1.7
     8Stable tag: 1.1.8
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    7575
    7676== Changelog ==
     77
     78= 1.1.8 =
     79*Fix: Fix an issue with local blocks directory which was losting every files as block
    7780
    7881= 1.1.7 =
Note: See TracChangeset for help on using the changeset viewer.