Calling the gallery shortcode

This commit is contained in:
vdv committed 2025-03-27 20:39:46 +01:00
1 parent d71bf9ae9f
commit 9ba1b49cd2
24 files changed
+20706

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
<?php
// This file is generated. Do not modify it manually.
return array(
'wp-printable-gallery' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 3,
'name' => 'wpprg/wp-printable-gallery',
'version' => '0.1.0',
'title' => 'Printable Gallery',
'category' => 'media',
'icon' => 'smiley',
'description' => 'Filtered photo galleries',
'example' => array(
),
'supports' => array(
'html' => false
),
'textdomain' => 'wp-printable-gallery',
'editorScript' => 'file:./index.js',
'editorStyle' => 'file:./index.css',
'style' => 'file:./style-index.css',
'render' => 'file:./render.php',
'viewScript' => 'file:./view.js'
)
);
+20
View File
@@ -0,0 +1,20 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "wpprg/wp-printable-gallery",
"version": "0.1.0",
"title": "Printable Gallery",
"category": "media",
"icon": "smiley",
"description": "Filtered photo galleries",
"example": {},
"supports": {
"html": false
},
"textdomain": "wp-printable-gallery",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"render": "file:./render.php",
"viewScript": "file:./view.js"
}
+1
View File
@@ -0,0 +1 @@
.wp-block-wpprg-wp-printable-gallery{border:1px dotted red}
@@ -0,0 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '3105363a29b8b0d69390');
+1
View File
@@ -0,0 +1 @@
.wp-block-wpprg-wp-printable-gallery{border:1px dotted red}
+1
View File
@@ -0,0 +1 @@
(()=>{"use strict";var r,e={385:()=>{const r=window.wp.blocks,e=window.wp.i18n,l=window.wp.blockEditor,o=window.ReactJSXRuntime,i=JSON.parse('{"UU":"wpprg/wp-printable-gallery"}');(0,r.registerBlockType)(i.UU,{edit:function(){return(0,o.jsx)("p",{...(0,l.useBlockProps)(),children:(0,e.__)("Printable Gallery – hello from the editor!","wp-printable-gallery")})}})}},l={};function o(r){var i=l[r];if(void 0!==i)return i.exports;var n=l[r]={exports:{}};return e[r](n,n.exports,o),n.exports}o.m=e,r=[],o.O=(e,l,i,n)=>{if(!l){var t=1/0;for(w=0;w<r.length;w++){for(var[l,i,n]=r[w],a=!0,p=0;p<l.length;p++)(!1&n||t>=n)&&Object.keys(o.O).every((r=>o.O[r](l[p])))?l.splice(p--,1):(a=!1,n<t&&(t=n));if(a){r.splice(w--,1);var s=i();void 0!==s&&(e=s)}}return e}n=n||0;for(var w=r.length;w>0&&r[w-1][2]>n;w--)r[w]=r[w-1];r[w]=[l,i,n]},o.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={640:0,768:0};o.O.j=e=>0===r[e];var e=(e,l)=>{var i,n,[t,a,p]=l,s=0;if(t.some((e=>0!==r[e]))){for(i in a)o.o(a,i)&&(o.m[i]=a[i]);if(p)var w=p(o)}for(e&&e(l);s<t.length;s++)n=t[s],o.o(r,n)&&r[n]&&r[n][0](),r[n]=0;return o.O(w)},l=globalThis.webpackChunkwp_printable_gallery=globalThis.webpackChunkwp_printable_gallery||[];l.forEach(e.bind(null,0)),l.push=e.bind(null,l.push.bind(l))})();var i=o.O(void 0,[768],(()=>o(385)));i=o.O(i)})();
+18
View File
@@ -0,0 +1,18 @@
<?php
/**
*
* vim: set ai sw=4 smarttab expandtab: tabstop=8 softtabstop=0
*
* @see https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md#render
*/
?>
<div <?php echo get_block_wrapper_attributes(); ?>>
<?php
$gallery_attributes = [
'columns' => 2,
'size' => 'medium',
'link' => 'file',
];
echo gallery_shortcode($gallery_attributes);
?>
</div>
@@ -0,0 +1 @@
@@ -0,0 +1 @@
@@ -0,0 +1 @@
<?php return array('dependencies' => array(), 'version' => '1f781ad52c70ba347a9c');
+1
View File
@@ -0,0 +1 @@
console.log("Hello World! (from wpprg-wp-printable-gallery block)");