FEATURE Allowing uppercased tiltle in articles
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Antoine M 2025-10-30 11:10:51 +01:00
parent 8c5ce525da
commit 0ca0817076
4 changed files with 19 additions and 18 deletions

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-rich-text'), 'version' => 'bb1996ad8ebf6f6ac5a4');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-rich-text'), 'version' => '2e5a48f579e7d22e1117');

View File

@ -298,15 +298,16 @@ const UppercasedSmallTitleFormatButton = props => {
}));
}
// Vérifier si on est dans un article (post type 'post')
const postType = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => {
return select("core/editor")?.getCurrentPostType();
}, []);
// // Vérifier si on est dans un article (post type 'post')
// const postType = useSelect((select) => {
// return select("core/editor")?.getCurrentPostType();
// }, []);
// // Ne pas afficher le bouton si ce n'est pas un article
// if (postType !== "page") {
// return null;
// }
// Ne pas afficher le bouton si ce n'est pas un article
if (postType !== "page") {
return null;
}
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.BlockControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToolbarGroup, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToolbarButton, {

File diff suppressed because one or more lines are too long

View File

@ -22,15 +22,15 @@ const UppercasedSmallTitleFormatButton = (props) => {
);
}
// Vérifier si on est dans un article (post type 'post')
const postType = useSelect((select) => {
return select("core/editor")?.getCurrentPostType();
}, []);
// // Vérifier si on est dans un article (post type 'post')
// const postType = useSelect((select) => {
// return select("core/editor")?.getCurrentPostType();
// }, []);
// Ne pas afficher le bouton si ce n'est pas un article
if (postType !== "page") {
return null;
}
// // Ne pas afficher le bouton si ce n'est pas un article
// if (postType !== "page") {
// return null;
// }
return (
<BlockControls>