renaming Blocl Label to Post Link

This commit is contained in:
Antoine M 2024-07-04 10:14:16 +02:00
parent 7522ebb9ea
commit b5df066827
5 changed files with 6 additions and 4 deletions

View File

@ -3,7 +3,7 @@
"apiVersion": 2,
"name": "homegrade-content-blocks/post-card",
"version": "0.1.0",
"title": "Post Card",
"title": "Post Link",
"category": "homegrade-blocks",
"description": "Pour afficher le lien vers un post (conseil, fiche-info, …) dans une carte",
"supports": {

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '8770e094166a8fa4365e');
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => '831260fc67b39b194bb9');

View File

@ -388,7 +388,7 @@ module.exports = window["wp"]["i18n"];
\************************/
/***/ ((module) => {
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/post-card","version":"0.1.0","title":"Post Card","category":"homegrade-blocks","description":"Pour afficher le lien vers un post (conseil, fiche-info, …) dans une carte","supports":{"anchor":true,"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"relatedPostId":{"type":"number"},"postType":{"type":"string","default":"conseils"}}}');
module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/post-card","version":"0.1.0","title":"Post Link","category":"homegrade-blocks","description":"Pour afficher le lien vers un post (conseil, fiche-info, …) dans une carte","supports":{"anchor":true,"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"relatedPostId":{"type":"number"},"postType":{"type":"string","default":"conseils"}}}');
/***/ })

View File

@ -1,4 +1,6 @@
<?php
$relatedPostId = $attributes['relatedPostId'] ?? null;
$postType = get_post_type_object(get_post_type($relatedPostId));

View File

@ -3,7 +3,7 @@
"apiVersion": 2,
"name": "homegrade-content-blocks/post-card",
"version": "0.1.0",
"title": "Post Card",
"title": "Post Link",
"category": "homegrade-blocks",
"description": "Pour afficher le lien vers un post (conseil, fiche-info, …) dans une carte",
"supports": {