Changeset 3198078
- Timestamp:
- 11/27/2024 11:05:18 AM (16 months ago)
- Location:
- showcase-creator
- Files:
-
- 89 added
- 4 edited
-
tags/1.0.6 (added)
-
tags/1.0.6/LICENCE (added)
-
tags/1.0.6/block (added)
-
tags/1.0.6/block/block.php (added)
-
tags/1.0.6/block/build (added)
-
tags/1.0.6/block/build/block.json (added)
-
tags/1.0.6/block/build/index.asset.php (added)
-
tags/1.0.6/block/build/index.css (added)
-
tags/1.0.6/block/build/index.css.map (added)
-
tags/1.0.6/block/build/index.js (added)
-
tags/1.0.6/block/build/index.js.map (added)
-
tags/1.0.6/block/build/render.php (added)
-
tags/1.0.6/block/build/style-index.css (added)
-
tags/1.0.6/block/package-lock.json (added)
-
tags/1.0.6/block/package.json (added)
-
tags/1.0.6/block/src (added)
-
tags/1.0.6/block/src/block.json (added)
-
tags/1.0.6/block/src/edit.js (added)
-
tags/1.0.6/block/src/editor.scss (added)
-
tags/1.0.6/block/src/index.js (added)
-
tags/1.0.6/block/src/render.php (added)
-
tags/1.0.6/block/src/style.scss (added)
-
tags/1.0.6/languages (added)
-
tags/1.0.6/readme.txt (added)
-
tags/1.0.6/requirements.txt (added)
-
tags/1.0.6/showcase-creator.php (added)
-
tags/1.0.6/src (added)
-
tags/1.0.6/src/admin.css (added)
-
tags/1.0.6/src/admin.js (added)
-
tags/1.0.6/src/admin.php (added)
-
tags/1.0.6/src/ajax.php (added)
-
tags/1.0.6/src/auto-listing.php (added)
-
tags/1.0.6/src/class-layout-element-type.php (added)
-
tags/1.0.6/src/class-layout-element.php (added)
-
tags/1.0.6/src/class-layout.php (added)
-
tags/1.0.6/src/class-ordered-list.php (added)
-
tags/1.0.6/src/class.php (added)
-
tags/1.0.6/src/default-layouts.json (added)
-
tags/1.0.6/src/frontend.php (added)
-
tags/1.0.6/src/home.js (added)
-
tags/1.0.6/src/home.php (added)
-
tags/1.0.6/src/layout-builder.css (added)
-
tags/1.0.6/src/layout-builder.js (added)
-
tags/1.0.6/src/layout-element-types.php (added)
-
tags/1.0.6/src/layout-importer.js (added)
-
tags/1.0.6/src/layout-library.css (added)
-
tags/1.0.6/src/layout-library.js (added)
-
tags/1.0.6/src/layout-library.php (added)
-
tags/1.0.6/src/layout.css (added)
-
tags/1.0.6/src/layouts.php (added)
-
tags/1.0.6/src/modules (added)
-
tags/1.0.6/src/modules/content-switch.js (added)
-
tags/1.0.6/src/modules/context-menu.css (added)
-
tags/1.0.6/src/modules/context-menu.js (added)
-
tags/1.0.6/src/modules/dialog.css (added)
-
tags/1.0.6/src/modules/dialog.js (added)
-
tags/1.0.6/src/modules/file-list.css (added)
-
tags/1.0.6/src/modules/file-list.js (added)
-
tags/1.0.6/src/modules/hint.css (added)
-
tags/1.0.6/src/modules/hint.js (added)
-
tags/1.0.6/src/modules/item-list.css (added)
-
tags/1.0.6/src/modules/item-list.js (added)
-
tags/1.0.6/src/modules/lightbox.css (added)
-
tags/1.0.6/src/modules/lightbox.js (added)
-
tags/1.0.6/src/modules/loading.css (added)
-
tags/1.0.6/src/modules/loading.js (added)
-
tags/1.0.6/src/modules/number-input.css (added)
-
tags/1.0.6/src/modules/number-input.js (added)
-
tags/1.0.6/src/modules/select.css (added)
-
tags/1.0.6/src/modules/select.js (added)
-
tags/1.0.6/src/modules/slider.js (added)
-
tags/1.0.6/src/modules/text-input.css (added)
-
tags/1.0.6/src/modules/text-input.js (added)
-
tags/1.0.6/src/modules/toggle.css (added)
-
tags/1.0.6/src/modules/toggle.js (added)
-
tags/1.0.6/src/modules/tokens-input.css (added)
-
tags/1.0.6/src/modules/tokens-input.js (added)
-
tags/1.0.6/src/modules/vid-modules.css (added)
-
tags/1.0.6/src/modules/vid-modules.js (added)
-
tags/1.0.6/src/ordered-lists.js (added)
-
tags/1.0.6/src/ordered-lists.php (added)
-
tags/1.0.6/src/post-meta-box.js (added)
-
tags/1.0.6/src/post-meta-box.php (added)
-
tags/1.0.6/src/rest.php (added)
-
tags/1.0.6/src/settings.js (added)
-
tags/1.0.6/src/settings.php (added)
-
tags/1.0.6/src/template-default.php (added)
-
tags/1.0.6/src/template-preview.php (added)
-
tags/1.0.6/src/upgrade.php (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/showcase-creator.php (modified) (1 diff)
-
trunk/src/class.php (modified) (6 diffs)
-
trunk/src/modules/lightbox.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
showcase-creator/trunk/readme.txt
r3198055 r3198078 5 5 Requires at least: 6.1 6 6 Tested up to: 6.7 7 Stable tag: 1.0. 57 Stable tag: 1.0.6 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 128 128 == Changelog == 129 129 130 = 1.0.6 = 131 * Bug fixed: The Featured Image layout element does not work with a DIV tag. 132 * Bug fixed: Lightbox does not load with post types other than posts. 133 * Bug fixed: Query galleries not working with some themes. 134 130 135 = 1.0.5 = 131 136 * Bug fixed: Galleries are not working properly. -
showcase-creator/trunk/showcase-creator.php
r3198055 r3198078 4 4 * Plugin URI: https://videlinify.com/showcase-creator/ 5 5 * Description: Provides tools to display a showcase of posts (or custom post types) using a custom layout, advanced filtering and customized post order. 6 * Version: 1.0. 56 * Version: 1.0.6 7 7 * Requires PHP: 7.0 8 8 * Author: Videlin Djedjev -
showcase-creator/trunk/src/class.php
r3198055 r3198078 18 18 * @var string $version x.x.x format 19 19 */ 20 public static string $version = '1.0. 5';20 public static string $version = '1.0.6'; 21 21 22 22 /** … … 279 279 add_action( 'wp_enqueue_scripts', function() { 280 280 self::register_asset( '-vid-modules', '/src/modules/vid-modules' ); 281 self::register_asset( '-lightbox', '/src/modules/lightbox' );281 self::register_asset( '-lightbox', '/src/modules/lightbox', [], true ); 282 282 self::register_asset( '-slider', '/src/modules/slider.js' ); 283 283 // Detects if any layout uses lightbox and enqueues the script if so. … … 332 332 * 333 333 * @since 1.0.0 334 * @since 1.0.6 Added new parameter: $args 334 335 * 335 336 * @param string $name String name. Start it with '-' to use the plugin prefix. 336 337 * @param string $rel Path relative to plugin directory. 337 338 * @param string[] $deps Script dependanices. 338 */ 339 private static function register_asset( string $name, string $rel, $deps = [] ) { 339 * @param array|bool $args Array of loading strategies or bool for setting in_footer. Default: false 340 */ 341 private static function register_asset( string $name, string $rel, $deps = [], $args = false ) { 340 342 $deps = array_map( 341 343 function( $e ) { … … 351 353 SHOWCASE_CREATOR_URL . $rel . ( $js_only ? '' : '.js' ), 352 354 $deps, 353 self::$version 355 self::$version, 356 $args 354 357 ); 355 358 } … … 436 439 add_action( 'wp_enqueue_scripts', $func, 20 ); 437 440 } 438 439 /**440 * Hooks into lightbox enqueue441 */442 do_action( 'showcase_creator_enqueue_lightbox' );443 444 /*add_action( 'wp_print_footer_scripts', function() {445 $galleries = [];446 foreach ( $this->galleries as $name=>$gallery ) {447 if ( ! isset( $this->localized_galleries[ $name ] ) ) {448 $galleries[ $name ] = $gallery;449 }450 }451 if ( $galleries ) {452 printf(453 '<script type="text/javascript">( () => { window.showcaseCreator.gallery = {454 ...window.showcaseCreator.gallery,455 ...%s456 } } )();</script>',457 wp_json_encode( $galleries )458 );459 }460 } );*/461 441 } 462 442 } … … 473 453 if ( ! isset( $this->galleries[ $name ] ) ) { 474 454 $this->galleries[ $name ] = $gallery; 455 wp_add_inline_script( 456 self::$prefix . '-lightbox', 457 "( () => { 458 window.showcaseCreator = window.showcaseCreator || {}; 459 window.showcaseCreator.gallery = window.showcaseCreator.gallery || {}; 460 window.showcaseCreator.gallery['$name'] = " . 461 wp_json_encode( $gallery ) . "; 462 } )();" 463 ); 475 464 } 476 465 } -
showcase-creator/trunk/src/modules/lightbox.js
r3198050 r3198078 329 329 } 330 330 331 static async gallery( name, args = {}) {331 static gallery( name, current ) { 332 332 let imgs; 333 333 const gallery = ( … … 341 341 return; 342 342 } 343 const lightbox = new this( args, imgs );343 const lightbox = new this( { current: current }, imgs ); 344 344 lightbox.open(); 345 345 }
Note: See TracChangeset
for help on using the changeset viewer.