Plugin Directory

Changeset 3463653


Ignore:
Timestamp:
02/17/2026 03:57:15 PM (3 weeks ago)
Author:
callahancodes
Message:

Block registration file path updates for prod

Location:
three-importer
Files:
2 edited
5 copied

Legend:

Unmodified
Added
Removed
  • three-importer/tags/1.0.3/readme.txt

    r3463037 r3463653  
    55Requires at least: 5.0
    66Tested up to:      6.9
    7 Stable tag:        1.0.2
     7Stable tag:        1.0.3
    88License:           GPL-2.0-or-later
    99License URI:       https://www.gnu.org/licenses/gpl-2.0.html
  • three-importer/tags/1.0.3/three-importer.php

    r3463037 r3463653  
    33 * Plugin Name:       Three Importer
    44 * Description:       Create custom Three.js scenes via Block, Shortcode, or your own script.
    5  * Version:           1.0.2
     5 * Version:           1.0.3
    66 * Requires at least: 6.7
    77 * Requires PHP:      7.4
     
    2222// register TI block
    2323function ti3d_block_init() {
    24     if ( function_exists( 'wp_register_block_types_from_metadata_collection' ) ) {
    25         wp_register_block_types_from_metadata_collection( __DIR__ . '/blocks-manifest.php' );
    26         return;
    27     }
    28 
    29     $manifest_data = require __DIR__ . '/blocks-manifest.php';
    30     foreach ( array_keys( $manifest_data ) as $block_type ) {
    31         register_block_type( __DIR__ . "/three-importer" );
     24    $manifest_path = __DIR__ . '/blocks-manifest.php';
     25    $block_dir = __DIR__ . '/three-importer';
     26
     27    // use the manifest if it exists
     28    if ( function_exists( 'wp_register_block_types_from_metadata_collection' ) && file_exists( $manifest_path ) ) {
     29        wp_register_block_types_from_metadata_collection( $manifest_path, __DIR__ );
     30    }
     31    // direct registration (fallback if manifest fails or is missing)
     32    elseif ( file_exists( $block_dir . '/block.json' ) ) {
     33        register_block_type( $block_dir );
    3234    }
    3335}
  • three-importer/trunk/readme.txt

    r3463037 r3463653  
    55Requires at least: 5.0
    66Tested up to:      6.9
    7 Stable tag:        1.0.2
     7Stable tag:        1.0.3
    88License:           GPL-2.0-or-later
    99License URI:       https://www.gnu.org/licenses/gpl-2.0.html
  • three-importer/trunk/three-importer.php

    r3463037 r3463653  
    33 * Plugin Name:       Three Importer
    44 * Description:       Create custom Three.js scenes via Block, Shortcode, or your own script.
    5  * Version:           1.0.2
     5 * Version:           1.0.3
    66 * Requires at least: 6.7
    77 * Requires PHP:      7.4
     
    2222// register TI block
    2323function ti3d_block_init() {
    24     if ( function_exists( 'wp_register_block_types_from_metadata_collection' ) ) {
    25         wp_register_block_types_from_metadata_collection( __DIR__ . '/blocks-manifest.php' );
    26         return;
    27     }
    28 
    29     $manifest_data = require __DIR__ . '/blocks-manifest.php';
    30     foreach ( array_keys( $manifest_data ) as $block_type ) {
    31         register_block_type( __DIR__ . "/three-importer" );
     24    $manifest_path = __DIR__ . '/blocks-manifest.php';
     25    $block_dir = __DIR__ . '/three-importer';
     26
     27    // use the manifest if it exists
     28    if ( function_exists( 'wp_register_block_types_from_metadata_collection' ) && file_exists( $manifest_path ) ) {
     29        wp_register_block_types_from_metadata_collection( $manifest_path, __DIR__ );
     30    }
     31    // direct registration (fallback if manifest fails or is missing)
     32    elseif ( file_exists( $block_dir . '/block.json' ) ) {
     33        register_block_type( $block_dir );
    3234    }
    3335}
Note: See TracChangeset for help on using the changeset viewer.