{"id":228486,"date":"2022-10-16T15:52:00","date_gmt":"2022-10-16T12:52:00","guid":{"rendered":"https:\/\/wordpress.mediadoma.com\/?p=228486"},"modified":"2022-11-09T02:40:44","modified_gmt":"2022-11-08T23:40:44","slug":"vikoristannja-parametriv-dlja-zberigannja-danih-u-redaktori-blokiv-wordpress-gutenberg","status":"publish","type":"post","link":"https:\/\/wordpress.mediadoma.com\/uk\/vikoristannja-parametriv-dlja-zberigannja-danih-u-redaktori-blokiv-wordpress-gutenberg\/","title":{"rendered":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u0434\u043b\u044f \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u043d\u043d\u044f \u0434\u0430\u043d\u0438\u0445 \u0443 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0456 \u0431\u043b\u043e\u043a\u0456\u0432 WordPress (Gutenberg)"},"content":{"rendered":"\n<p>\u0420\u0430\u043d\u0456\u0448\u0435 \u043c\u0438 \u0434\u043e\u0441\u043b\u0456\u0434\u0436\u0443\u0432\u0430\u043b\u0438 \u043c\u043e\u0436\u043b\u0438\u0432\u0456\u0441\u0442\u044c \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u043d\u043d\u044f \u0434\u0430\u043d\u0438\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0431\u043b\u043e\u043a\u0456\u0432 WordPress (Gutenberg) \u0432 <a href=\"https:\/\/wholesomecode.ltd\/guides\/creating-plugin-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u0445 \u0431\u043b\u043e\u043a\u0443<\/a> \u0442\u0430 <a href=\"https:\/\/wholesomecode.ltd\/guides\/post-meta-fields-store-attributes-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u043c\u0435\u0442\u0430 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457<\/a>, \u0430\u043b\u0435 \u0447\u0438 \u0437\u043d\u0430\u0454\u0442\u0435 \u0432\u0438, \u0449\u043e \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u0442\u0430 \u043e\u0442\u0440\u0438\u043c\u0443\u0432\u0430\u0442\u0438 \u0434\u0430\u043d\u0456 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0456 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 WordPress, \u0456\u043c\u043f\u043e\u0440\u0442\u0443\u044e\u0447\u0438 <code>api<\/code>\u0437 <code>@wordpress\/api<\/code>.<\/p>\n<p>\u0423 \u0446\u044c\u043e\u043c\u0443 \u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a\u0443 \u043c\u0438 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e \u0442\u0435, \u0449\u043e \u0432\u0438 \u0431 \u043a\u043b\u0430\u0441\u0438\u0447\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 PHP \u044f\u043a <code>update_option<\/code>\u0456 <code>get_option<\/code>.<\/p>\n<p>\u0429\u043e\u0431 \u0440\u0435\u0430\u043b\u0456\u0437\u0443\u0432\u0430\u0442\u0438 \u0446\u0435, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0441\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u0442\u0438\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u0430\u0433\u0430\u043c\u0438 \u0436\u0438\u0442\u0442\u0454\u0432\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0443 React, \u0442\u043e\u043c\u0443 \u043c\u0438 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 React \u0448\u043b\u044f\u0445\u043e\u043c \u0456\u043c\u043f\u043e\u0440\u0442\u0443 <code>Component<\/code>\u0437 <code>@wordpress\/element<\/code>.<\/p>\n<h2>\u043f\u0435\u0440\u0435\u0434\u0443\u043c\u043e\u0432\u0438<\/h2>\n<ul>\n<li>\u041e\u0437\u043d\u0430\u0439\u043e\u043c\u0442\u0435\u0441\u044f \u0437\u0456 <a href=\"https:\/\/wholesomecode.ltd\/guides\/creating-plugin-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f\u043c \u043f\u043b\u0430\u0433\u0456\u043d\u0456\u0432 \u0434\u043b\u044f WordPress Gutenberg<\/a><\/li>\n<li>\u0417\u043d\u0430\u0439\u043e\u043c\u0456 <a href=\"https:\/\/wholesomecode.ltd\/guides\/php-render-block-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0434\u0438\u043d\u0430\u043c\u0456\u0447\u043d\u0456 \u0431\u043b\u043e\u043a\u0438 \u0442\u0430 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0456<\/a><\/li>\n<li>\u0417\u0440\u043e\u0437\u0443\u043c\u0456\u0439\u0442\u0435, \u044f\u043a \u043c\u043e\u0436\u043d\u0430 <a href=\"https:\/\/wholesomecode.ltd\/guides\/custom-meta-boxes-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0441\u0442\u0432\u043e\u0440\u044e\u0432\u0430\u0442\u0438 \u043c\u0435\u0442\u0430\u0431\u043e\u043a\u0441\u0438 \u0432 Gutenberg<\/a><\/li>\n<\/ul>\n<p>\u0426\u044f \u043e\u0441\u0442\u0430\u043d\u043d\u044f \u0432\u0438\u043c\u043e\u0433\u0430 \u0454 \u043a\u043e\u0440\u0438\u0441\u043d\u043e\u044e \u0434\u043b\u044f \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430, \u044f\u043a\u0438\u0439 \u043c\u0438 \u0437\u0431\u0438\u0440\u0430\u0454\u043c\u043e\u0441\u044f \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0432 \u0446\u044c\u043e\u043c\u0443 \u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a\u0443, \u043e\u0434\u043d\u0430\u043a \u0443 \u0440\u0435\u0430\u043b\u044c\u043d\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0430\u0445 \u0432\u0438, \u0439\u043c\u043e\u0432\u0456\u0440\u043d\u043e, \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u0454\u0442\u0435 \u0446\u0435\u0439 \u043c\u0435\u0442\u043e\u0434 \u043d\u0430 \u0431\u0456\u0447\u043d\u0456\u0439 \u043f\u0430\u043d\u0435\u043b\u0456 \u0430\u0431\u043e \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432.<\/p>\n<h2>\u0417\u0430\u0440\u0435\u0454\u0441\u0442\u0440\u0443\u0439\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438 \u0432 PHP<\/h2>\n<p>\u041f\u0435\u0440\u0448 \u043d\u0456\u0436 \u043c\u0438 \u0437\u043c\u043e\u0436\u0435\u043c\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u043e\u043f\u0446\u0456\u044e \u0432 JavaScript, \u043c\u0438 \u043f\u043e\u0432\u0438\u043d\u043d\u0456 \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0430\u0442\u0438\u0441\u044f, \u0449\u043e \u043c\u0438 \u0437\u0430\u0440\u0435\u0454\u0441\u0442\u0440\u0443\u0432\u0430\u043b\u0438 \u0457\u0457 \u0432 PHP \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e <code>register_setting<\/code>, \u0456 \u0449\u043e \u0434\u043b\u044f <code>show_in_rest<\/code>\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0443 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f true.<\/p>\n<p>\u0414\u043e\u0442\u0440\u0438\u043c\u0443\u044e\u0447\u0438\u0441\u044c <a href=\"https:\/\/wholesomecode.ltd\/guides\/php-render-block-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a\u0430 Dynamic Block<\/a>, \u0432\u0456\u0434\u043a\u0440\u0438\u0439\u0442\u0435 \u043a\u043e\u0440\u0435\u043d\u0435\u0432\u0438\u0439 \u0444\u0430\u0439\u043b PHP \u043f\u043b\u0430\u0433\u0456\u043d\u0430 (\u0432 \u0434\u0430\u043d\u043e\u043c\u0443 \u0432\u0438\u043f\u0430\u0434\u043a\u0443 <code>wholesome-plugin.php<\/code>) \u0456 \u0434\u043e\u0434\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0438\u0439 \u043a\u043e\u0434 \u0443 \u043d\u0438\u0436\u043d\u044e \u0447\u0430\u0441\u0442\u0438\u043d\u0443 \u0446\u044c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0443 \u043f\u0456\u0441\u043b\u044f \u0432\u0441\u0456\u0445 \u0456\u043d\u0448\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0456\u0439:<\/p>\n<pre><code>function wholesomecode_wholesome_plugin_register_settings() {\n    register_setting(\n        'wholesomecode_wholesome_plugin_settings',\n        'wholesomecode_wholesome_plugin_example_text',\n        [\n            'default'       =&gt; '',\n            'show_in_rest'  =&gt; true,\n            'type'          =&gt; 'string',\n        ]\n    );\n}\nadd_action( 'init', 'wholesomecode_wholesome_plugin_register_settings' );\n<\/code><\/pre>\n<p>\u0426\u0435\u0439 \u043a\u043e\u0434 \u0440\u0435\u0454\u0441\u0442\u0440\u0443\u0454 \u043c\u0435\u0442\u0430-\u043f\u043e\u043b\u0435, \u0449\u043e \u0432\u0438\u043a\u043b\u0438\u043a\u0430\u0454\u0442\u044c\u0441\u044f <code>wholesomecode_wholesome_plugin_block_text<\/code>\u0434\u043b\u044f <code>wholesomecode_wholesome_plugin_settings<\/code>\u0433\u0440\u0443\u043f\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432. \u0426\u0435 \u0442\u0430\u043a\u043e\u0436 \u0433\u0430\u0440\u0430\u043d\u0442\u0443\u0454, \u0449\u043e REST API \u043c\u043e\u0436\u0435 \u043e\u0442\u0440\u0438\u043c\u0430\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0446\u044c\u043e\u0433\u043e \u043c\u0435\u0442\u0430-\u043f\u043e\u043b\u044f \u0437\u0456 <code>show_in_rest<\/code>\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f\u043c, \u044f\u043a\u0435 \u043c\u0430\u0454 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f true.<\/p>\n<h2>\u0421\u0442\u0432\u043e\u0440\u0456\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/h2>\n<p>\u0412\u0456\u0434\u043a\u0440\u0438\u0439\u0442\u0435 <code>\/src\/edit.js<\/code>\u0444\u0430\u0439\u043b, \u043c\u0438 \u0437\u0431\u0438\u0440\u0430\u0454\u043c\u043e\u0441\u044f \u0434\u0435\u0449\u043e \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0446\u044c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0443, \u0449\u043e\u0431 \u043c\u0438 \u043c\u043e\u0433\u043b\u0438 \u0432\u0438\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0448 <code>Component<\/code>.<\/p>\n<p>\u0412\u0438\u0440\u0456\u0436\u0442\u0435 \u0442\u0430 \u0432\u0441\u0442\u0430\u0432\u0442\u0435 \u0432\u0435\u0441\u044c \u0446\u0435\u0439 \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0443 \u0443 <code>\/src\/edit.js<\/code>\u0444\u0430\u0439\u043b, \u043c\u0438 \u0440\u043e\u0437\u043f\u043e\u0432\u0456\u043c\u043e, \u0449\u043e \u0432\u0456\u043d \u0440\u043e\u0431\u0438\u0442\u044c \u0437\u0430 \u043c\u0438\u0442\u044c:<\/p>\n<pre><code>import { __ } from '@wordpress\/i18n';\nimport { useBlockProps } from '@wordpress\/block-editor';\nimport {\n    Panel,\n    PanelBody,\n    TextControl,\n} from '@wordpress\/components';\nimport { Component } from '@wordpress\/element';\n\nimport '.\/editor.scss';\n\nclass OptionsExample extends Component {\n    constructor() {\n        super( ...arguments );\n        this.state = { exampleText: '' };\n    }\n\n    render() {\n        const { exampleText } = this.state;\n        return (&lt;Panel&gt;\n                &lt;PanelBody\n                    title={ __( 'Example Meta Box', 'wholesome-plugin') }\n                    icon=\"admin-plugins\"\n                &gt;\n                    &lt;TextControl\n                        help={ __( 'This is an example text field.', 'wholesome-plugin') }\n                        label={ __( 'Example Text', 'wholesome-plugin') }\n                        onChange={ (exampleText) =&gt; this.setState( { exampleText }) }\n                        value={ exampleText }\n                    \/&gt;\n                &lt;\/PanelBody&gt;\n            &lt;\/Panel&gt;) }\n}\n\nexport default function Edit( props) {\n    return (&lt;div { ...useBlockProps() }&gt;\n            &lt;OptionsExample { ...props }\/&gt;\n        &lt;\/div&gt;\n    );\n}\n<\/code><\/pre>\n<p>\u0412\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043f\u0456\u0437\u043d\u0430\u0442\u0438, \u0449\u043e \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u043b\u044c\u043d\u0438\u0446\u044c\u043a\u0438\u0439 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u044f\u043a\u0438\u0439 \u043c\u0438 \u0441\u0442\u0432\u043e\u0440\u0438\u043b\u0438, \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0438\u0439 \u0441\u0430\u043c\u0438\u0439, \u044f\u043a \u0443 \u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a\u0443 <a href=\"https:\/\/wholesomecode.ltd\/guides\/custom-meta-boxes-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">Gutenberg Meta Box<\/a>, \u0434\u0435 \u043c\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u043b\u0438 \u043c\u0435\u0442\u0430-\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0438 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457. \u0412\u0438 \u0442\u0430\u043a\u043e\u0436 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043c\u0456\u0442\u0438\u0442\u0438, \u0449\u043e \u043c\u0438 \u043f\u043e\u043a\u0438 \u0449\u043e \u043d\u0435 \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u043c\u043e \u0442\u0430 \u043d\u0435 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0454\u043c\u043e \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044e \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432, \u0430 \u0437\u0430\u043c\u0456\u0441\u0442\u044c \u0446\u044c\u043e\u0433\u043e \u043c\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u043c\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 <code>state<\/code>.<\/p>\n<h3>\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0441\u0442\u0430\u043d\u0443<\/h3>\n<p>\u041f\u0440\u0438\u0447\u0438\u043d\u0430, \u043f\u043e \u044f\u043a\u0456\u0439 \u043c\u0438 \u0441\u0442\u0432\u043e\u0440\u0438\u043b\u0438 \u0441\u043f\u0435\u0446\u0456\u0430\u043b\u044c\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0430 \u043f\u043e\u0442\u0456\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438 \u0439\u043e\u0433\u043e \u0432 \u043d\u0430\u0448\u0443 <code>Edit<\/code>\u0444\u0443\u043d\u043a\u0446\u0456\u044e, \u043f\u043e\u043b\u044f\u0433\u0430\u0454 \u0432 \u0442\u043e\u043c\u0443, \u0449\u043e\u0431 \u043c\u0438 \u043c\u043e\u0433\u043b\u0438 \u0441\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u0442\u0438\u0441\u044f \u043f\u0435\u0440\u0435\u0432\u0430\u0433\u0430\u043c\u0438 \u0441\u0442\u0430\u043d\u0443. \u041c\u0438 \u0437\u0440\u043e\u0431\u0438\u043b\u0438 \u0446\u0435 \u0442\u043e\u043c\u0443, \u0449\u043e:<\/p>\n<ul>\n<li>\u041c\u0438 \u0441\u0442\u0432\u043e\u0440\u0438\u043c\u043e \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u0434\u043b\u044f \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u0437 API, \u0456 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0437\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u0457\u0457 \u0432 \u0441\u0442\u0430\u043d\u0456, \u0449\u043e\u0431 \u043d\u0430\u0448\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u043c\u043e\u0433\u043b\u0438 \u0457\u0457 \u0447\u0438\u0442\u0430\u0442\u0438<\/li>\n<li>\u041c\u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u043c\u043e, \u0449\u043e\u0431 API \u043e\u043d\u043e\u0432\u043b\u044e\u0432\u0430\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438, \u0449\u043e\u0439\u043d\u043e \u0437\u043c\u0456\u043d\u044e\u0454\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0441\u0442 \u0443 \u043d\u0430\u0448\u043e\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u0456, \u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0456\u044f \u0434\u043b\u044f \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f \u0441\u0442\u0430\u043d\u0443 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0447\u0435\u0440\u0435\u0437 API \u043f\u0456\u0441\u043b\u044f \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457<\/li>\n<\/ul>\n<p>\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0441\u0442\u0430\u043d\u0443 \u0434\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435. \u0423 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0456 \u043c\u0438 \u0456\u043d\u0456\u0446\u0456\u0430\u043b\u0456\u0437\u0443\u0454\u043c\u043e \u0441\u0442\u0430\u043d \u0442\u0430\u043a:<\/p>\n<pre><code>this.state = { exampleText: '' };\n<\/code><\/pre>\n<p>\u0406 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0456 \u043c\u0438 \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u043c\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u043d\u044c\u043e\u0433\u043e \u0442\u0430\u043a \u0441\u0430\u043c\u043e, \u044f\u043a \u043c\u0438 \u043e\u0442\u0440\u0438\u043c\u0443\u0432\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0456\u0432 \u0443 \u043f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044c\u043e\u043c\u0443 \u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a\u0443:<\/p>\n<pre><code>const { exampleText } = this.state;\n<\/code><\/pre>\n<p>\u0420\u0456\u0437\u043d\u0438\u0446\u044f \u043f\u043e\u043b\u044f\u0433\u0430\u0454 \u0432 \u0442\u043e\u043c\u0443, \u0449\u043e \u0432 \u043d\u0430\u0448\u043e\u043c\u0443 <code>onChange<\/code>\u043c\u0435\u0442\u043e\u0434\u0456 \u0437\u0430\u043c\u0456\u0441\u0442\u044c \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f <code>setAttributes<\/code>\u043c\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u043c\u043e <code>this.setState<\/code>.<\/p>\n<h3>\u041e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u0437 API<\/h3>\n<p>\u0423 \u0432\u0435\u0440\u0445\u043d\u0456\u0439 \u0447\u0430\u0441\u0442\u0438\u043d\u0456 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0456\u043c\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 <code>api<\/code>\u0437 <code>@wordpress\/api<\/code>:<\/p>\n<pre><code>import api from '@wordpress\/api';\n<\/code><\/pre>\n<p>\u0414\u043e\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u0443 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u0456\u0441\u0442\u044c, \u0434\u0435 \u0456\u043d\u0456\u0446\u0456\u0430\u043b\u0456\u0437\u0443\u0454\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u043d <code>isAPILoaded<\/code>. \u0426\u0435 \u043d\u0430\u043c \u0437\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f, \u0449\u043e\u0431 \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0430\u0442\u0438\u0441\u044f, \u0449\u043e \u043c\u0438 \u043d\u0435 \u043d\u0430\u043c\u0430\u0433\u0430\u0454\u043c\u043e\u0441\u044f \u043e\u0442\u0440\u0438\u043c\u0430\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e API \u0430\u0431\u043e \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043e \u0442\u043e\u0433\u043e, \u044f\u043a API \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u044c\u0441\u044f.<\/p>\n<pre><code>this.state = {\n  exampleText: '',\n  isAPILoaded: false,\n};\n<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440 \u0434\u043e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043e\u0433\u043e \u043d\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u043e\u0434\u0430\u0439\u0442\u0435 \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0443 \u043f\u0456\u0434 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043f\u0456\u0434 \u043d\u0430\u0437\u0432\u043e\u044e <code>componentDidMount<\/code>. \u0426\u0435 \u043c\u0435\u0442\u043e\u0434 \u0436\u0438\u0442\u0442\u0454\u0432\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0443 React, \u044f\u043a\u0438\u0439 \u0432\u0438\u043a\u043b\u0438\u043a\u0430\u0454\u0442\u044c\u0441\u044f \u043f\u0456\u0441\u043b\u044f \u0434\u043e\u0434\u0430\u0432\u0430\u043d\u043d\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0434\u043e DOM.<\/p>\n<p>\u0423 \u0446\u0435\u0439 \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0443 \u0434\u043e\u0434\u0430\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0435:<\/p>\n<pre><code>componentDidMount() {\n  api.loadPromise.then(() =&gt; {\n    this.settings = new api.models.Settings();\n\n    const { isAPILoaded } = this.state;\n\n    if (isAPILoaded === false) {\n      this.settings.fetch().then( (response) =&gt; {\n        this.setState( {\n          exampleText: response[ 'wholesomecode_wholesome_plugin_example_text' ],\n          isAPILoaded: true,\n        } );\n      } );\n    }\n  } );\n}\n<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u043c\u0438 \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u043c\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u044f\u043a\u0438\u0439 \u043c\u0438 \u0437\u0430\u0440\u0435\u0454\u0441\u0442\u0440\u0443\u0432\u0430\u043b\u0438 \u0440\u0430\u043d\u0456\u0448\u0435 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e <code>register_setting<\/code>\u0444\u0443\u043d\u043a\u0446\u0456\u0457.<\/p>\n<p>\u0426\u0435\u0439 \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0443 \u0440\u043e\u0431\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0435:<\/p>\n<ul>\n<li>\u041e\u0442\u0440\u0438\u043c\u0443\u0454 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u0437 WordPress Guttenberg Settings API.<\/li>\n<li>\u041e\u0442\u0440\u0438\u043c\u0443\u0454 <code>isAPILoaded<\/code>\u0432\u0456\u0434 \u0441\u0430\u0442<\/li>\n<li>\u042f\u043a\u0449\u043e API \u043d\u0435 \u0431\u0443\u043b\u043e \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043e, \u0432\u0456\u043d \u043e\u0442\u0440\u0438\u043c\u0443\u0454 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u0437 API \u0432 a<code>response<\/code><\/li>\n<li>\u041f\u043e\u0442\u0456\u043c \u043c\u0438 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0454\u043c\u043e \u0441\u0442\u0430\u043d, \u0449\u043e\u0431 \u043e\u043d\u043e\u0432\u0438\u0442\u0438 \u0441\u0442\u0430\u043d \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u043e\u043f\u0446\u0456\u0457, \u0434\u043e \u044f\u043a\u043e\u0457 \u043c\u0438 \u0445\u043e\u0447\u0435\u043c\u043e \u043e\u0442\u0440\u0438\u043c\u0430\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f, \u0456 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0454\u043c\u043e <code>isAPILoaded<\/code>\u0441\u0442\u0430\u043d \u043d\u0430 true<\/li>\n<\/ul>\n<h3>\u0417\u0443\u043f\u0438\u043d\u0456\u0442\u044c \u0432\u0456\u0437\u0443\u0430\u043b\u0456\u0437\u0430\u0446\u0456\u044e \u0431\u043b\u043e\u043a\u0443 \u0431\u0435\u0437 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u044c<\/h3>\n<p>\u041c\u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u043c\u043e, \u0449\u043e\u0431 \u043d\u0430\u0448 \u0431\u043b\u043e\u043a \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0432\u0441\u044f \u0434\u043e \u0442\u043e\u0433\u043e, \u044f\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438 \u0431\u0443\u0434\u0443\u0442\u044c \u0437\u0430\u043f\u043e\u0432\u043d\u0435\u043d\u0456. \u0429\u043e\u0431 \u043f\u043e\u0434\u0431\u0430\u0442\u0438 \u043f\u0440\u043e \u0446\u0435, \u043c\u0438 \u043c\u043e\u0436\u0435\u043c\u043e \u0456\u043c\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 PlaceHolder \u0456 Spinner \u0437 <code>$wordpress\/components<\/code>:<\/p>\n<pre><code>import {\n    Panel,\n    PanelBody,\n    Placeholder,\n    Spinner,\n    TextControl,\n} from '@wordpress\/components';\n<\/code><\/pre>\n<p>\u041f\u043e\u0442\u0456\u043c \u0443 \u043c\u0435\u0442\u043e\u0434\u0456 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0430\u0439\u0442\u0435\u0441\u044f, \u0449\u043e \u0432\u0438 \u043e\u0442\u0440\u0438\u043c\u0430\u043b\u0438 <code>isAPILoaded<\/code>\u0432\u0456\u0434 \u0441\u0442\u0430\u043d\u0443, \u0456 \u0432\u0438\u0432\u0435\u0434\u0456\u0442\u044c <code>Placeholder<\/code>\u0456, <code>Spinner<\/code>\u044f\u043a\u0449\u043e \u0432\u0456\u043d \u043d\u0435 \u043c\u0430\u0454:<\/p>\n<pre><code>const {\n  exampleText,\n  isAPILoaded,\n} = this.state;\n\nif (! isAPILoaded) {\n  return (&lt;Placeholder&gt;\n      &lt;Spinner \/&gt;\n    &lt;\/Placeholder&gt;\n  );\n}\n<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u0447\u0438\u043d\u043e\u043c, \u044f\u043a\u0449\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438 \u043d\u0435 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043e, \u043c\u0438 \u043e\u0442\u0440\u0438\u043c\u0430\u0454\u043c\u043e \u0433\u0430\u0440\u043d\u0438\u0439 \u0437\u0430\u043f\u043e\u0432\u043d\u044e\u0432\u0430\u0447, \u0434\u043e\u043a\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0435 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0438\u0442\u044c\u0441\u044f:<\/p>\n<p>\u0417\u0430\u043f\u043e\u0432\u043d\u044e\u0432\u0430\u0447 \u0456 Spinner<\/p>\n<h3>\u041f\u0456\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044f \u0434\u043e Gutenberg on Save<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440, \u043a\u043e\u043b\u0438 \u043c\u0438 \u0447\u0438\u0442\u0430\u0454\u043c\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438 \u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u0456 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u0435\u043d \u0441\u043f\u043e\u0441\u0456\u0431 \u0437\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u0446\u0456 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438, \u043a\u043e\u043b\u0438 \u043c\u0438 \u0457\u0445 \u0437\u043c\u0456\u043d\u044e\u0454\u043c\u043e. \u0414\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u043c\u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c\u043e \u0434\u043e <code>subscribe<\/code>\u0441\u0445\u043e\u0432\u0438\u0449\u0430 \u0434\u0430\u043d\u0438\u0445 WordPress Gutenberg, \u044f\u043a\u0435 \u0432\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438\u043c\u0435, \u043a\u043e\u043b\u0438 \u0449\u043e\u0441\u044c \u0437\u043c\u0456\u043d\u0438\u043b\u043e\u0441\u044f.<\/p>\n<p>\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0447\u0438 \u0446\u0435, \u043c\u0438 \u0441\u0442\u0432\u043e\u0440\u0438\u043c\u043e \u0441\u043b\u0443\u0445\u0430\u0447, \u043a\u043e\u043b\u0438 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u044f \u0431\u0443\u0434\u0435 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u0430, \u0456 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043c\u043e \u043d\u0430\u0448\u0456 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f, \u043a\u043e\u043b\u0438 \u0446\u0435 \u0441\u0442\u0430\u043d\u0435\u0442\u044c\u0441\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0456\u043c\u043f\u043e\u0440\u0442\u0443\u0439\u0442\u0435 <code>subscribe<\/code>\u0442\u0430 <code>select<\/code>\u0437 <code>@wordpress\/data<\/code>.<\/p>\n<pre><code>import { select, subscribe } from '@wordpress\/data';\n<\/code><\/pre>\n<p>\u041f\u043e\u0442\u0456\u043c \u0443 \u0432\u0435\u0440\u0445\u043d\u0456\u0439 \u0447\u0430\u0441\u0442\u0438\u043d\u0456 <code>componentDidMount<\/code>\u0431\u043b\u043e\u043a\u0443 \u043a\u043e\u0434\u0443 \u043d\u0430\u043f\u0438\u0448\u0456\u0442\u044c \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0435:<\/p>\n<pre><code>subscribe(() =&gt; {\n  const { exampleText } = this.state;\n\n  const isSavingPost = select('core\/editor').isSavingPost();\n  const isAutosavingPost = select('core\/editor').isAutosavingPost();\n\n  if (isAutosavingPost) {\n    return;\n  }\n\n  if (! isSavingPost) {\n    return;\n  }\n\n  const settings = new api.models.Settings( {\n    [ 'wholesomecode_wholesome_plugin_example_text' ]: exampleText,\n  } );\n  settings.save();\n});\n<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u0440\u043e\u0431\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0435:<\/p>\n<ul>\n<li>\u041f\u0435\u0440\u0435\u0432\u0456\u0440\u044f\u0454, \u0447\u0438 \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u0454\u0442\u044c\u0441\u044f \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u044f<\/li>\n<li>\u041f\u0435\u0440\u0435\u0432\u0456\u0440\u0442\u0435, \u0447\u0438 \u0446\u0435 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e<\/li>\n<li>\u042f\u043a\u0449\u043e \u0434\u043e\u043f\u0438\u0441 \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u0454\u0442\u044c\u0441\u044f, \u0430\u043b\u0435 \u0446\u0435 \u043d\u0435 \u0430\u0432\u0442\u043e\u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f, \u043d\u0430\u0434\u0456\u0448\u043b\u0456\u0442\u044c \u043d\u043e\u0432\u0456 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u0432 API \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u044c<\/li>\n<li>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f API \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u044c.<\/li>\n<\/ul>\n<h3>\u041d\u0435\u0432\u0435\u043b\u0438\u043a\u0438\u0439 \u0445\u0430\u043a<\/h3>\n<p>\u041c\u0438 \u043c\u043e\u0433\u043b\u0438 \u0431 \u0437\u0430\u043b\u0438\u0448\u0438\u0442\u0438 \u043d\u0430\u0448 \u043a\u043e\u0434 \u0442\u0430\u043a\u0438\u043c, \u0430\u043b\u0435 \u043e\u0441\u043a\u0456\u043b\u044c\u043a\u0438 \u043c\u0438 \u0440\u043e\u0437\u043c\u0456\u0449\u0443\u0454\u043c\u043e \u043d\u0430\u0448\u0456 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u0432 \u0431\u043b\u043e\u0446\u0456, \u0430 \u043d\u0435 \u043d\u0430 \u0431\u0456\u0447\u043d\u0456\u0439 \u043f\u0430\u043d\u0435\u043b\u0456 \u0447\u0438 \u0456\u043d\u0448\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0456 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430, \u044f\u043a\u0449\u043e \u043c\u0438 \u0437\u043c\u0456\u043d\u044e\u0454\u043c\u043e \u043e\u0434\u0438\u043d \u0456\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u0456 \u043d\u0456\u0447\u043e\u0433\u043e \u0456\u043d\u0448\u043e\u0433\u043e \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0456, \u043a\u043d\u043e\u043f\u043a\u0430 \u00ab\u0437\u0431\u0435\u0440\u0435\u0433\u0442\u0438\u00bb \u043d\u0435 \u043f\u0440\u0430\u0446\u044e\u0432\u0430\u0442\u0438\u043c\u0435 \u0441\u0442\u0430\u0442\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u0438\u043c.<\/p>\n<p>\u0426\u0435 \u0442\u043e\u043c\u0443, \u0449\u043e \u043c\u0438 \u043d\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u043c\u043e <code>setAttributes<\/code>\u0456 \u043d\u0435 \u0437\u043c\u0456\u043d\u044e\u0454\u043c\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u043d\u0438\u0439 \u043a\u043e\u0434 \u0431\u043b\u043e\u043a\u0443.<\/p>\n<p>\u041c\u0438 \u043c\u043e\u0436\u0435\u043c\u043e \u043e\u0431\u0456\u0439\u0442\u0438 \u0446\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0456\u0434\u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0432\u0448\u0438 \u0456\u043d\u0448\u0443 \u0447\u0430\u0441\u0442\u0438\u043d\u0443 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457, \u0430\u0431\u043e \u0434\u043e\u0434\u0430\u0432\u0448\u0438 \u043d\u0435\u0432\u0435\u043b\u0438\u043a\u0438\u0439 \u0445\u0430\u043a \u0443 <code>TextControl<\/code>\u043a\u043e\u0434:<\/p>\n<pre><code>onChange={ (exampleText) =&gt; { this.setState( { exampleText } ); setAttributes( { exampleText }) } }\n<\/code><\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0432\u0430\u0439\u0442\u0435 \u0440\u043e\u0437\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0446\u0435\u0439 \u0440\u044f\u0434\u043e\u043a \u043a\u043e\u0434\u0443 \u043d\u0430 \u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u043c\u0435\u0442\u043e\u0434\u0443 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0443, \u0449\u043e\u0431 \u0432\u0438\u0442\u044f\u0433\u0442\u0438 <code>setAttributes<\/code>\u0439\u043e\u0433\u043e \u0437 <code>props<\/code>(\u043e\u0441\u043a\u0456\u043b\u044c\u043a\u0438 \u043c\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u043c\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043c\u0438 \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u043c\u043e \u0434\u0435\u0449\u043e \u0456\u043d\u0448\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0456\u0432 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e <code>this<\/code>.<\/p>\n<pre><code>const { setAttributes } = this.props;\n<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440, \u043a\u043e\u043b\u0438 \u043c\u0438 \u0437\u043c\u0456\u043d\u044e\u0454\u043c\u043e \u043d\u0430\u0448 \u0430\u0442\u0440\u0438\u0431\u0443\u0442, \u0437\u043c\u0456\u043d\u044e\u0454\u0442\u044c\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u00ab\u0444\u0430\u043b\u044c\u0448\u0438\u0432\u0438\u0439\u00bb, \u0447\u0435\u0440\u0435\u0437 \u0449\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0434\u0443\u043c\u0430\u0454, \u0449\u043e \u0442\u0435\u043f\u0435\u0440 \u043c\u0438 \u043c\u043e\u0436\u0435\u043c\u043e \u0437\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u044e.<\/p>\n<p>\u0412\u0456\u043d \u0442\u0440\u043e\u0445\u0438 \u0445\u0430\u043a\u0435\u0440\u0441\u044c\u043a\u0438\u0439, \u0430\u043b\u0435 \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0432\u0438\u043f\u0430\u0434\u043a\u0443 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0432\u0456\u043d \u0440\u043e\u0431\u0438\u0442\u044c \u0442\u0435, \u0449\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e.<\/p>\n<h3>\u0412\u0435\u0441\u044c <code>Edit<\/code>\u043a\u043e\u0434<\/h3>\n<p>\u041e\u0441\u044c \u0443\u0432\u0435\u0441\u044c \u043a\u043e\u0434, \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u0434\u043b\u044f <code>Edit<\/code>\u043c\u0435\u0442\u043e\u0434\u0443:<\/p>\n<p>i ` import {} \u0437 &#8216; <a href=\"https:\/\/hashnode.com\/@wordpress\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">@wordpress<\/a> \/i18n&#8217;; \u0456\u043c\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 API \u0437 &#8216; <a href=\"https:\/\/hashnode.com\/@wordpress\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">@wordpress<\/a> \/api&#8217;; \u0456\u043c\u043f\u043e\u0440\u0442 { useBlockProps } \u0437 &#8216; <a href=\"https:\/\/hashnode.com\/@wordpress\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">@wordpress<\/a> \/block-editor&#8217;; import { Panel, PanelBody, Placeholder, Spinner, TextControl, } from &#8216; <a href=\"https:\/\/hashnode.com\/@wordpress\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">@wordpress<\/a> \/components&#8217;; import { select, subscribe } from &#8216; <a href=\"https:\/\/hashnode.com\/@wordpress\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">@wordpress<\/a> \/data&#8217;; \u0456\u043c\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 { \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 } \u0437 &#8216; <a href=\"https:\/\/hashnode.com\/@wordpress\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">@wordpress<\/a> \/element&#8217;;<\/p>\n<p>\u0456\u043c\u043f\u043e\u0440\u0442 &#8216;.\/editor.scss&#8217;;<\/p>\n<p>class OptionsExample extends Component { constructor() { super( \u2026arguments );<\/p>\n<pre><code>    this.state = {\n        exampleText: '',\n        isAPILoaded: false,\n    };\n}\n\ncomponentDidMount() {\n\n    subscribe( () =&gt; {\n        const { exampleText } = this.state;\n\n        const isSavingPost = select('core\/editor').isSavingPost();\n        const isAutosavingPost = select('core\/editor').isAutosavingPost();\n\n        if (isAutosavingPost) {\n            return;\n        }\n\n        if (! isSavingPost) {\n            return;\n        }\n\n        const settings = new api.models.Settings( {\n            [ 'wholesomecode_wholesome_plugin_example_text' ]: exampleText,\n        } );\n        settings.save();\n    });\n\n    api.loadPromise.then( () =&gt; {\n        this.settings = new api.models.Settings();\n\n        const { isAPILoaded } = this.state;\n\n        if (isAPILoaded === false) {\n            this.settings.fetch().then( (response) =&gt; {\n                this.setState( {\n                    exampleText: response[ 'wholesomecode_wholesome_plugin_example_text' ],\n                    isAPILoaded: true,\n                } );\n            } );\n        }\n    } );\n}\n\nrender() {\n    const {\n        exampleText,\n        isAPILoaded,\n    } = this.state;\n\n    const { setAttributes } = this.props;\n\n    if (! isAPILoaded) {\n        return (&lt;Placeholder&gt;\n                &lt;Spinner \/&gt;\n            &lt;\/Placeholder&gt;\n        );\n    }\n\n    return (&lt;Panel&gt;\n            &lt;PanelBody\n                title={ __( 'Example Meta Box', 'wholesomecode') }\n                icon=\"admin-plugins\"\n            &gt;\n                &lt;TextControl\n                    help={ __( 'This is an example text field.', 'wholesome-plugin') }\n                    label={ __( 'Example Text', 'wholesome-plugin') }\n                    onChange={ (exampleText) =&gt; { this.setState( { exampleText } ); setAttributes( { exampleText }) } }\n                    value={ exampleText }\n                \/&gt;\n            &lt;\/PanelBody&gt;\n        &lt;\/Panel&gt;) }\n<\/code><\/pre>\n<p>}<\/p>\n<p>\u0435\u043a\u0441\u043f\u043e\u0440\u0442 \u0444\u0443\u043d\u043a\u0446\u0456\u0457 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c Edit( props) { return (<\/p>\n<p>); }<\/p>\n<pre><code>\n### Remove the Attributes\n\nOption up `src\/index.js` and remove the attributes block that we placed there in the previous guides. We are not storing any attributes, the data will be pushed into and retrieved from the options table.\n\nRender the Output\n\nBecause we have saved our attribute as settings in the WordPress options table, we could output this anywhere in WordPress using `get_option`:\n<\/code><\/pre>\n<p>get_option( &#8216;wholesomecode_wholesome_plugin_block_text&#8217;, &quot;);<\/p>\n<pre><code>\nContinuing from the [Dynamic Block guide](https:\/\/wholesomecode.ltd\/guides\/php-render-block-wordpress-gutenberg\/), let's see how we can access this attribute on the server side in PHP.\n\nWith this in mind, let\u2019s update our `register_block_type` to output the option:\n<\/code><\/pre>\n<p>register_block_type( &#8216;wholesomecode\/wholesome-plugin&#8217;, array( &#8216;editor_script&#8217; =&gt; &#8216;wholesomecode-wholesome-plugin-block-editor&#8217;, &#8216;editor_style&#8217; =&gt; &#8216;wholesomecode-wholesome-plugin-block-editor&#8217;, &#8216;render_callback&#8217; = &gt; function( $attributes, $content) { $example_text = get_option( &#8216;wholesomecode_wholesome_plugin_example_text&#8217;); return &quot;<\/p>\n<p>$example_text<\/p>\n<p>&quot;; }, &#8216;style&#8217; =&gt; &#8216;wholesomecode-wholesome-plugin-block&#8217;,) );<\/p>\n<pre><code>\nNote that we no longer need to register the `attributes` here, because we are only accessing the post meta field via the `get_post_meta` function.\n\n5.  \nUsing the Block\n--------------------\n\nPutting it all together, let\u2019s see the block in action:\n\n![Using the block editor for settings and options](https:\n\nExtra: Add Some More Fields\n-----------------------------\n\nIn the extra steps of the Custom Meta Box guide, we added in some extra fields. Let\u2019s update the `Edit` method to include those same fields (note that I have omitted the hack):\n<\/code><\/pre>\n<p>\u0456\u043c\u043f\u043e\u0440\u0442 {} \u0437 &#8216; <a href=\"https:\/\/hashnode.com\/@wordpress\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">@wordpress<\/a> \/i18n&#8217;; \u0456\u043c\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 API \u0437 &#8216; <a href=\"https:\/\/hashnode.com\/@wordpress\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">@wordpress<\/a> \/api&#8217;; \u0456\u043c\u043f\u043e\u0440\u0442 { useBlockProps } \u0437 &#8216; <a href=\"https:\/\/hashnode.com\/@wordpress\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">@wordpress<\/a> \/block-editor&#8217;; \u0456\u043c\u043f\u043e\u0440\u0442 { Panel, PanelBody, PanelRow, Placeholder, SelectControl, Spinner, TextControl, ToggleControl, } \u0437 &#8216; <a href=\"https:\/\/hashnode.com\/@wordpress\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">@wordpress<\/a> \/components&#8217;; import { select, subscribe } from &#8216; <a href=\"https:\/\/hashnode.com\/@wordpress\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">@wordpress<\/a> \/data&#8217;; \u0456\u043c\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 { \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 } \u0437 &#8216; <a href=\"https:\/\/hashnode.com\/@wordpress\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">@wordpress<\/a> \/element&#8217;;<\/p>\n<p>\u0456\u043c\u043f\u043e\u0440\u0442 &#8216;.\/editor.scss&#8217;;<\/p>\n<p>class OptionsExample extends Component { constructor() { super( \u2026arguments );<\/p>\n<pre><code>    this.state = {\n        exampleSelect: '',\n        exampleText: '',\n        exampleText2: '',\n        exampleText3: '',\n        exampleToggle: false,\n        isAPILoaded: false,\n    };\n}\n\ncomponentDidMount() {\n\n    subscribe( () =&gt; {\n        const {\n            exampleSelect,\n            exampleText,\n            exampleText2,\n            exampleText3,\n            exampleToggle,\n        } = this.state;\n\n        const isSavingPost = select('core\/editor').isSavingPost();\n        const isAutosavingPost = select('core\/editor').isAutosavingPost();\n\n        if (isAutosavingPost) {\n            return;\n        }\n\n        if (! isSavingPost) {\n            return;\n        }\n\n        const settings = new api.models.Settings( {\n            [ 'wholesomecode_wholesome_plugin_example_select' ]: exampleSelect,\n            [ 'wholesomecode_wholesome_plugin_example_text' ]: exampleText,\n            [ 'wholesomecode_wholesome_plugin_example_text_2' ]: exampleText2,\n            [ 'wholesomecode_wholesome_plugin_example_text_3' ]: exampleText3,\n            [ 'wholesomecode_wholesome_plugin_example_toggle' ]: exampleToggle,\n        } );\n        settings.save();\n    });\n\n    api.loadPromise.then( () =&gt; {\n        this.settings = new api.models.Settings();\n\n        const { isAPILoaded } = this.state;\n\n        if (isAPILoaded === false) {\n            this.settings.fetch().then( (response) =&gt; {\n                this.setState( {\n                    exampleSelect: response[ 'wholesomecode_wholesome_plugin_example_select' ],\n                    exampleText: response[ 'wholesomecode_wholesome_plugin_example_text' ],\n                    exampleText2: response[ 'wholesomecode_wholesome_plugin_example_text_2' ],\n                    exampleText3: response[ 'wholesomecode_wholesome_plugin_example_text_3' ],\n                    exampleToggle: Boolean( response[ 'wholesomecode_wholesome_plugin_example_toggle' ] ),\n                    isAPILoaded: true,\n                } );\n            } );\n        }\n    } );\n}\n\nrender() {\n    const {\n        exampleSelect,\n        exampleText,\n        exampleText2,\n        exampleText3,\n        exampleToggle,\n        isAPILoaded,\n    } = this.state;\n\n    if (! isAPILoaded) {\n        return (&lt;Placeholder&gt;\n                &lt;Spinner \/&gt;\n            &lt;\/Placeholder&gt;\n        );\n    }\n\n    return (&lt;Panel&gt;\n            &lt;PanelBody\n                title={ __( 'Example Meta Box', 'wholesome-plugin') }\n                icon=\"admin-plugins\"\n            &gt;\n                &lt;SelectControl\n                    help={ __( 'An example dropdown field.', 'wholesome-plugin') }\n                    label={ __( 'Example Select', 'wholesome-plugin') }\n                    onChange={ (exampleSelect) =&gt; this.setState( { exampleSelect }) }\n                    options={ [\n                        {\n                            label: __( 'Please Select...', 'wholesome-plugin' ),\n                            value: '',\n                        },\n                        {\n                            label: __( 'Option 1', 'wholesome-plugin' ),\n                            value: 'option-1',\n                        },\n                        {\n                            label: __( 'Option 2', 'wholesome-plugin' ),\n                            value: 'option-2',\n                        },\n                    ] }\n                    value={ exampleSelect }\n                \/&gt;\n                &lt;TextControl\n                    help={ __( 'This is an example text field.', 'wholesome-plugin') }\n                    label={ __( 'Example Text', 'wholesome-plugin') }\n                    onChange={ (exampleText) =&gt; this.setState( { exampleText }) }\n                    value={ exampleText }\n                \/&gt;\n                &lt;PanelRow&gt;\n                    &lt;TextControl\n                        help={ __( 'Use PanelRow to place controls inline.', 'wholesome-plugin') }\n                        label={ __( 'Example Text 2', 'wholesome-plugin') }\n                        onChange={ (exampleText2) =&gt; this.setState( { exampleText2 }) }\n                        value={ exampleText2 }\n                    \/&gt;\n                    &lt;TextControl\n                        help={ __( 'This control is inline.', 'wholesome-plugin') }\n                        label={ __( 'Example Text 3', 'wholesome-plugin') }\n                        onChange={ (exampleText3) =&gt; this.setState( { exampleText3 }) }\n                        value={ exampleText3 }\n                    \/&gt;\n                &lt;\/PanelRow&gt;\n                &lt;ToggleControl\n                    checked={ exampleToggle }\n                    help={ __( 'An example toggle.', 'wholesome-plugin') }\n                    label={ __( 'Example Toggle', 'wholesome-plugin') }\n                    onChange={ (exampleToggle) =&gt; this.setState( { exampleToggle }) }\n                \/&gt;\n            &lt;\/PanelBody&gt;\n        &lt;\/Panel&gt;) }\n<\/code><\/pre>\n<p>}<\/p>\n<p>\u0435\u043a\u0441\u043f\u043e\u0440\u0442 \u0444\u0443\u043d\u043a\u0446\u0456\u0457 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c Edit( props) { return (<\/p>\n<p>); } `<\/p>\n<p>\u041e\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/wordpress.mediadoma.com\/wp-content\/uploads\/2022\/01\/post-169009-61e7fab7b579e.png\" alt=\"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0456\u0432 \u0434\u043b\u044f \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u043d\u043d\u044f \u0434\u0430\u043d\u0438\u0445 \u0443 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0456 \u0431\u043b\u043e\u043a\u0456\u0432 WordPress (Gutenberg)\" \/>\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u0456 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438<\/p>\n<ul>\n<li>\u041f\u043e\u0434\u0438\u0432\u0456\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f <a href=\"https:\/\/wholesomecode.ltd\/guides\/template-innerblocks-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0432\u043a\u043b\u0430\u0434\u0435\u043d\u0438\u0445 \u0434\u043e\u0447\u0456\u0440\u043d\u0456\u0445 \u0431\u043b\u043e\u043a\u0456\u0432 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e <code>InnerBlocks<\/code>\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/a><\/li>\n<li>\u041f\u043e\u0434\u0438\u0432\u0456\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/wholesomecode.ltd\/guides\/post-meta-fields-store-attributes-wordpress-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u043f\u043e\u0441\u0442 \u043c\u0435\u0442\u0430-\u043f\u043e\u043b\u0456\u0432 \u0443 \u0431\u043b\u043e\u043a\u0430\u0445 \u0413\u0443\u0442\u0435\u043d\u0431\u0435\u0440\u0433\u0430<\/a><\/li>\n<li>\u041f\u043e\u0434\u0438\u0432\u0456\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/wholesomecode.ltd\/guides\/create-custom-meta-boxes-using-the-wordpress-block-editor-gutenberg\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u043b\u044c\u043d\u0438\u0446\u044c\u043a\u0438\u0445 \u043c\u0435\u0442\u0430\u0431\u043e\u043a\u0441\u0456\u0432 \u0443 Gutenberg<\/a><\/li>\n<\/ul>\n<p><div id=\"PostUnique_PostSource\" style=\"padding-top: 50px\">\u0414\u0436\u0435\u0440\u0435\u043b\u043e \u0437\u0430\u043f\u0438\u0441\u0443:  <a target=\"_blank\" rel=\"noopener nofollow\" href=\"\/\/wholesomecode.ltd\" class=\"external external_icon\">wholesomecode.ltd<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0420\u0430\u043d\u0456\u0448\u0435 \u043c\u0438 \u0434\u043e\u0441\u043b\u0456\u0434\u0436\u0443\u0432\u0430\u043b\u0438 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043d\u044f \u0434\u0430\u043d\u0438\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0431\u043b\u043e\u043a\u0456\u0432 WordPress (Gutenberg) \u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u0445 \u0431\u043b\u043e\u043a\u0443 \u0442\u0430 \u0432 \u043c\u0435\u0442\u0430-\u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u044f\u0445, \u0430\u043b\u0435 \u0447\u0438 \u0437\u043d\u0430\u0454\u0442\u0435 \u0432\u0438, \u0449\u043e \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u0442\u0430 \u043e\u0442\u0440\u0438\u043c\u0443\u0432\u0430\u0442\u0438 \u0457\u0445 \u0443 WordPress&#8230;<\/p>\n","protected":false},"author":1,"featured_media":223685,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_wp_rev_ctl_limit":""},"categories":[943,808,869,902,849,725],"tags":[1174],"class_list":["post-228486","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gutenberg-10","category-php-10","category-wordpress-10","category-kod-3","category-pidruchnyky","category-rozrobnyk","tag-affiai-uk"],"_links":{"self":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/228486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/comments?post=228486"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/228486\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media\/223685"}],"wp:attachment":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media?parent=228486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/categories?post=228486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/tags?post=228486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}