FEATURE Allowing uppercased tiltle in articles
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8c5ce525da
commit
0ca0817076
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user