{"id":229526,"date":"2022-11-03T12:52:00","date_gmt":"2022-11-03T09:52:00","guid":{"rendered":"https:\/\/wordpress.mediadoma.com\/?p=229526"},"modified":"2022-11-09T08:24:34","modified_gmt":"2022-11-09T05:24:34","slug":"nopea-prototyyppi-prototype-to-code-osa-1","status":"publish","type":"post","link":"https:\/\/wordpress.mediadoma.com\/fi\/nopea-prototyyppi-prototype-to-code-osa-1\/","title":{"rendered":"Nopea prototyyppi: Prototype to Code, osa 1"},"content":{"rendered":"\n<p>Mit\u00e4 tulee nopeisiin prototyyppeihin ja WordPressiin, olemme t\u00e4h\u00e4n menness\u00e4 tehneet kaksi asiaa:<\/p>\n<ol>\n<li><a href=\"https:\/\/wordpress.mediadoma.com\/fi\/nopea-prototyyppien-luominen-wordpressillae-konseptista-laajennukseen\/\" title=\"suunniteltu laajennus\" >suunniteltu laajennus<\/a> ,<\/li>\n<li><a href=\"https:\/\/wordpress.mediadoma.com\/fi\/nopea-prototyyppien-luominen-wordpressillae-konseptianalyysi\/\" title=\"piirsi kaavion siit\u00e4, kuinka koodi voidaan j\u00e4rjest\u00e4\u00e4\" >piirsi kaavion siit\u00e4, kuinka koodi voidaan j\u00e4rjest\u00e4\u00e4<\/a><\/li>\n<\/ol>\n<p>T\u00e4ss\u00e4 vaiheessa olemme tehneet tarpeeksi ty\u00f6t\u00e4 oikeuttaaksemme koodimme uudelleenmuodostamisen. Toisin sanoen aiomme alkaa muuntaa prototyyppi\u00e4 koodiksi. Mutta t\u00e4m\u00e4 on jotain, joka on teht\u00e4v\u00e4 kahdessa vaiheessa.<\/p>\n<p>Ensinn\u00e4kin aiomme yksinkertaisesti esitell\u00e4 luokat, jotka edustavat edellisen viestin kaavioita ja jotka kiteytt\u00e4v\u00e4t kunkin projektin vastuun.<\/p>\n<p>Sen j\u00e4lkeen tarkastellaan koodin j\u00e4rjest\u00e4mist\u00e4 nimiavaruuksiin ja paketeihin. Ennen kuin voimme tehd\u00e4 sen, meid\u00e4n on kuitenkin varmistettava, ett\u00e4 koodi on oliosuuntautunut ja toimii edelleen. N\u00e4in siis t\u00e4ss\u00e4 postauksessa tapahtuu.<\/p>\n<h2>Prototyyppi koodiin<\/h2>\n<p>Jos olet lukenut aiempia viestej\u00e4, huomaa, ett\u00e4 aion seurata edellisess\u00e4 viestiss\u00e4 hahmottelemaani organisaatiota. Sinun ei tietenk\u00e4\u00e4n tarvitse noudattaa t\u00e4t\u00e4 erityist\u00e4 mallia.<\/p>\n<h3>Sana l\u00e4hteen hallinnasta<\/h3>\n<p>Jos k\u00e4yt\u00e4t l\u00e4hdeohjausta, suosittelen t\u00e4ss\u00e4 tapauksessa luomaan <a href=\"https:\/\/git-scm.com\/book\/en\/v1\/Git-Branching\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">p\u00e4\u00e4haaran<\/a> haaran (jos k\u00e4yt\u00e4t Giti\u00e4), jotta voit tehd\u00e4 ty\u00f6si ilman koodin vakaan version ankaruutta.<\/p>\n<p>T\u00e4m\u00e4 on hieman sarjan soveltamisalan ulkopuolella, joten jos et k\u00e4yt\u00e4 l\u00e4hteen hallintaa, \u00e4l\u00e4 huoli. Jos olet, valitsen t\u00e4m\u00e4n sivuliikkeen nimen <strong>kehitt\u00e4v\u00e4n .<\/strong> Yhdist\u00e4n sen takaisin <strong>masteriin\u00a0<\/strong>, kun olen varma, ett\u00e4 se toimii.<\/p>\n<h3>Koodin kirjoittaminen<\/h3>\n<p>Eilen luonnostellun ty\u00f6n mukaisesti aion luoda kaksi luokkaa:<\/p>\n<ol>\n<li>metabox-luokka,<\/li>\n<li>metalaatikon n\u00e4ytt\u00f6luokka.<\/li>\n<\/ol>\n<p>Koodia k\u00e4ytet\u00e4\u00e4n jonkin verran uudelleen siit\u00e4, mit\u00e4 olemme jo n\u00e4hneet, kuten n\u00e4et seuraavassa koodissa.<\/p>\n<h4>Koodi<\/h4>\n<p>Ensinn\u00e4kin <a href=\"https:\/\/gist.github.com\/tommcfarlin\/1876be773467946ec2972ae32e0c97a3#file-00-class-meta-box-php\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">metalaatikkomme<\/a> :<\/p>\n<pre><code>&lt;?php\n\/**\n * Registers the Meta Box with WordPress.\n *\n * @author Tom McFarlin\n * @since  0.2.0\n *\/\n\n\/**\n * Registers the Meta Box with WordPress. Defines the ID, title, display function,\n * and the post type on which it will live.\n *\n * @author Tom McFarlin\n * @since  0.2.0\n *\/\nclass Meta_Box {\n\n    \/**\n     * A reference to the class that will display the contents in the meta box.\n     *\n     * @access private\n     * @var    Meta_Box_Display\n     *\/\n    private $meta_box_display;\n\n    \/**\n     * Instantiates the class by setting its property equal to a reference to its display.\n     *\/\n    public function __construct() {\n        $this-&gt;meta_box_display = new Meta_Box_Display();\n    }\n\n    \/**\n     * The function responsible for hooking into the WordPress API.\n     *\/\n    public function init() {\n\n        add_meta_box(\n            'three-recent-posts',\n            'Three Recent Posts',\n            array( $this-&gt;meta_box_display, 'display' ),\n            'post',\n            'side'\n        );\n    }\n}\n<\/code><\/pre>\n<p>Ja seuraavaksi <a href=\"https:\/\/gist.github.com\/tommcfarlin\/1876be773467946ec2972ae32e0c97a3#file-01-class-meta-box-display-php\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">meid\u00e4n n\u00e4ytt\u00f6mme<\/a> :<\/p>\n<pre><code>&lt;?php\n\/**\n * Defines the display for the meta box.\n *\n * @author Tom McFarlin\n * @since  0.2.0\n *\/\n\n\/**\n * Defines the display for the meta box that will render the content in the\n * context of its meta box.\n *\n * @author Tom McFarlin\n * @since  0.2.0\n *\/\nclass Meta_Box_Display {\n\n    \/**\n     * A reference to the class that will display the contents in the meta box.\n     *\n     * @access private\n     * @var    Post_Messenger\n     *\/\n    private $messenger;\n\n    \/**\n     * Instantiates the object by setting a property equal to that of the class\n     * responsible for rendering the messages from the post query.\n     *\/\n    public function __construct() {\n        $this-&gt;messenger = new Post_Messenger( $this );\n    }\n\n    \/**\n     * If there are posts to display, renders them in the metabox. Otherwise, displays\n     * a note that there are no posts to display.\n     *\/\n    public function display( $message) {\n        $this-&gt;messenger-&gt;get_message();\n    }\n}\n<\/code><\/pre>\n<p>Ett\u00e4 metaruutukoodissa, metalaatikkokoodissa me eksplisiittisesti instantoimme n\u00e4yt\u00f6n, jotta voimme tarvittaessa kutsua sit\u00e4 n\u00e4ytt\u00f6menetelm\u00e4ksi.<\/p>\n<p>Toinen vaihtoehto olisi instantoida n\u00e4m\u00e4 kaksi objektia erikseen ja sitten ruiskuttaa n\u00e4ytt\u00f6 metalaatikkoon konstruktoriinjektiolla tai jollain vastaavalla. T\u00e4m\u00e4 on teht\u00e4v\u00e4 kolmannen osapuolen luokassa.<\/p>\n<p>T\u00e4m\u00e4n edut tulevat siit\u00e4, ett\u00e4 kaksi luokkaa irrotetaan hieman enemm\u00e4n. Ehk\u00e4 k\u00e4ymme l\u00e4pi, kuinka t\u00e4m\u00e4 tehd\u00e4\u00e4n seuraavassa postauksessa.<\/p>\n<p>Sen j\u00e4lkeen meid\u00e4n on edett\u00e4v\u00e4 ja m\u00e4\u00e4ritelt\u00e4v\u00e4 luokka, joka on vastuussa viestien n\u00e4ytt\u00e4misest\u00e4 Meta Box Display -kontekstissa. T\u00e4t\u00e4 kutsumme <a href=\"https:\/\/gist.github.com\/tommcfarlin\/1876be773467946ec2972ae32e0c97a3#file-02-class-post-messenger-php\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">Post Messengeriksi<\/a> :<\/p>\n<pre><code>&lt;?php\n\/**\n * Display content for the meta box when requested.\n *\n * @author Tom McFarlin\n * @since  0.2.0\n *\/\n\n\/**\n * Retrieves information from the class responsible for querying the database and\n * renders it in the context of our meta box when called via the Meta Box Display.\n *\n * @author Tom McFarlin\n * @since  0.2.0\n *\/\nclass Post_Messenger {\n\n    \/**\n     * A reference to the query resonsible for retrieving post information from\n     * the database.\n     *\n     * @access private\n     * @var    WP_Query\n     *\/\n    private $query;\n\n    \/**\n     * A reference to the message that's displayed in the view of the\n     * meta box.\n     *\n     * @access private\n     *\/\n    private $message;\n\n    \/**\n     * Instantiates the class by setting a reference to the query.\n     *\/\n    public function __construct() {\n        $this-&gt;query = new Post_Query();\n    }\n\n    \/**\n     * Retrieves the content to be displayed in the meta box.\n     *\/\n    public function get_message() {\n\n        $this-&gt;get_description();\n\n        if ($this-&gt;query-&gt;has_posts()) {\n            $this-&gt;get_post_message();\n        } else {\n            $this-&gt;get_no_posts_message();\n        }\n    }\n\n    \/**\n     * Displays the description of the content of the meta box.\n     *\n     * @access private\n     *\/\n    private function get_post_message() {\n        include_once 'post-list.php';\n    }\n\n    \/**\n     * Displays the description of the content of the meta box.\n     *\n     * @access private\n     *\/\n    private function get_description() {\n        include_once 'message-description.php';\n    }\n\n    \/**\n     * Displays a message of there are no recent posts.\n     *\n     * @access private\n     *\/\n    private function get_no_posts_message() {\n        include_once 'no-post-list.php';\n    }\n}\n<\/code><\/pre>\n<p>Huomaa t\u00e4ss\u00e4, ett\u00e4 Post Messenger viittaa my\u00f6s <a href=\"https:\/\/gist.github.com\/tommcfarlin\/1876be773467946ec2972ae32e0c97a3#file-03-post-query-php\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">viestikyselyyn<\/a>. T\u00e4m\u00e4 on luokka, jossa tiedonsiirto tietokantaan tapahtuu. Olen my\u00f6s lis\u00e4nnyt muutaman aputoiminnon yksinkertaistaakseni n\u00e4kym\u00e4koodia, kuten hetken kuluttua n\u00e4emme.<\/p>\n<pre><code>&lt;?php\n\/**\n * Queries the database for three most recent posts.\n *\n * @author Tom McFarlin\n * @since  0.2.0\n *\/\n\n\/**\n * Queries the database for three most recent posts. Returns the query to the\n * caller so that it can be interrogates for posts or not.\n *\n * @author Tom McFarlin\n * @since  0.2.0\n *\/\nclass Post_Query {\n\n    \/**\n     * A reference to the WP_Query this class wraps.\n     *\n     * @access private\n     * @var    WP_Query\n     *\/\n    private $query;\n\n    \/**\n     * Instantiates the class by preparing instance data and executing the\n     * query so the display can render the contents.\n     *\/\n    public function __construct() {\n\n        $this-&gt;query = null;\n        $this-&gt;get_posts();\n    }\n\n    \/**\n     * Executes the query for returning the post recent posts ordered by date.\n     *\n     * @access private\n     *\/\n    private function get_posts() {\n\n        $args = array(\n            'post_type'   =&gt; 'post',\n            'post_status' =&gt; 'publish',\n            'orderby'     =&gt; 'date',\n            'order'       =&gt; 'desc',\n        );\n        $this-&gt;query = new WP_Query( $args );\n\n        return $this-&gt;query;\n    }\n\n    \/**\n     * A helper function to determine if the query has any posts.\n     *\/\n    public function has_posts() {\n        return! $this-&gt;query-&gt;have_posts();\n    }\n\n    \/**\n     * A helper function for retrieving the next post in the list of\n     * posts\n     *\/\n    public function the_post() {\n        return $this-&gt;query-&gt;the_post();\n    }\n}\n<\/code><\/pre>\n<p>Ja siin\u00e4 se ydinluokille. Tietysti meid\u00e4n on viel\u00e4 puhuttava n\u00e4kemyksist\u00e4.<\/p>\n<h4>Katselukerrat<\/h4>\n<p>N\u00e4kym\u00e4t vastaavat HTML:n hahmontamisesta metalaatikon yhteydess\u00e4. En pid\u00e4 HTML:n kirjoittamisesta PHP:n yhteydess\u00e4 (enk\u00e4 my\u00f6sk\u00e4\u00e4n pid\u00e4 PHP:n sekoittamisesta HTML:n yhteydess\u00e4, mutta t\u00e4m\u00e4 on v\u00e4ist\u00e4m\u00e4t\u00f6nt\u00e4 t\u00e4ss\u00e4 projektissa).<\/p>\n<p>On olemassa hienoja malliprojekteja, jotka tekev\u00e4t t\u00e4m\u00e4n helpommaksi, mutta poikkean. Joka tapauksessa huomaat, ett\u00e4 <strong>post-list.php-<\/strong> tiedostossa on viittauksia Post Query -luokan aputoimintoihin. T\u00e4m\u00e4 varmistaa, etten paljasta liikaa ominaisuuksia ja riko Demeterin lakia.<\/p>\n<p>Katsotaanpa ensin tuota tiedostoa, koska <a href=\"https:\/\/gist.github.com\/tommcfarlin\/1876be773467946ec2972ae32e0c97a3#file-04-post-list-php\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">se on monimutkaisin<\/a> :<\/p>\n<pre><code>&lt;ol&gt;\n    &lt;?php while ($this-&gt;query-&gt;has_posts()) {  ?&gt;\n        &lt;?php $this-&gt;query-&gt;the_post(); ?&gt;\n        &lt;li&gt;\n            &lt;a href=\"&lt;?php get_the_permalink(); ?&gt;\" target=\"_blank\"&gt;\n                &lt;?php echo get_the_title(); ?&gt;\n            &lt;\/a&gt;\n        &lt;\/li&gt;\n    &lt;?php } ?&gt;\n&lt;\/ol&gt;<\/code><\/pre>\n<p>Se n\u00e4ytt\u00e4\u00e4 tavalliselta WordPress-koodilta, mutta muista, ett\u00e4 koska t\u00e4t\u00e4 tiedostoa kutsutaan <strong>Post Messengeriss\u00e4<\/strong>, se viittaa kyselyyn kyselyn\u00e4, jonka t\u00e4m\u00e4 luokka k\u00e4\u00e4rii.<\/p>\n<p>Kaksi viimeist\u00e4 tiedostoa ovat melko suoraviivaisia. Yksi niist\u00e4 tarjoaa <a href=\"https:\/\/gist.github.com\/tommcfarlin\/1876be773467946ec2972ae32e0c97a3#file-06-message-description-php\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">kuvauksen<\/a> :<\/p>\n<pre><code>&lt;p&gt;\n    &lt;span class=\"description\"&gt;\n        Displays up to the three most recent posts.\n    &lt;\/span&gt;&lt;!-- .description --&gt;\n&lt;\/p&gt;<\/code><\/pre>\n<p>Toinen antaa viestin, kun <a href=\"https:\/\/gist.github.com\/tommcfarlin\/1876be773467946ec2972ae32e0c97a3#file-07-no-post-list-php\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">viestej\u00e4 ei ole<\/a> :<\/p>\n<pre><code>&lt;p&gt;There are no recent posts.&lt;\/p&gt;<\/code><\/pre>\n<p>Muuten perustoiminnot on tehty.<\/p>\n<h3>Pluginin k\u00e4ynnistys<\/h3>\n<p>Viimeinen asia, joka meid\u00e4n on teht\u00e4v\u00e4, on k\u00e4ynnist\u00e4\u00e4 laajennus. T\u00e4t\u00e4 varten muutamme p\u00e4\u00e4laajennustiedoston koodia siten, ett\u00e4 se n\u00e4ytt\u00e4\u00e4 <a href=\"https:\/\/gist.github.com\/tommcfarlin\/1876be773467946ec2972ae32e0c97a3#file-08-three-recent-posts-php\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">t\u00e4lt\u00e4<\/a> :<\/p>\n<pre><code>&lt;?php\n\/**\n * Three Recent Posts\n *\n * @package     TRP\n * @author      Tom McFarlin\n * @copyright   2017 Tom McFarlin\n * @license     MIT\n *\n * @wordpress-plugin\n * Plugin Name: Three Recent Posts\n * Plugin URI:  https:\/\/tommcfarlin.com\/three-recent-posts\/\n * Description: Displays the three mot recent posts in your post editor screen.\n * Version:     0.2.0\n * Author:      Tom McFarlin\n * Author URI:  https:\/\/tommcfarlin.com\n * Text Domain: three-recent-posts\n * License:     GPL\n * License URI: http:\/\/www.gnu.org\/licenses\/gpl-3.0.txt\n *\/\n\ninclude 'class-meta-box.php';\ninclude 'class-meta-box-display.php';\ninclude 'class-post-messenger.php';\ninclude 'class-post-query.php';\n\nadd_action( 'add_meta_boxes', 'trp_start' );\n\/**\n * Starts the plugin.\n *\/\nfunction trp_start() {\n\n    $meta_box = new Meta_Box();\n    $meta_box-&gt;init();\n}\n<\/code><\/pre>\n<p>Se kytkeytyy WordPressiin, instantoi laajennuksen ja k\u00e4ynnist\u00e4\u00e4 sen sitten. Kun k\u00e4yt\u00e4t sit\u00e4 WordPress-asennuksessasi, sen pit\u00e4isi n\u00e4ytt\u00e4\u00e4 t\u00e4sm\u00e4lleen samalta kuin ensimm\u00e4isen version aikana.<\/p>\n<p>Ainoa ero on, ett\u00e4 meill\u00e4 on nyt asiat j\u00e4rjestetty luokittain yksitt\u00e4isten toimintojen sijaan.<\/p>\n<h2>Huomautuksia<\/h2>\n<p>Ensinn\u00e4kin t\u00e4ss\u00e4 on mahdollisuuksia uudelleenj\u00e4rjestelyyn, joka v\u00e4hent\u00e4isi irrottamista entisest\u00e4\u00e4n (kuten erilaiset <a href=\"https:\/\/en.wikipedia.org\/wiki\/Dependency_injection\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">riippuvuusruiskeet<\/a> jne.), mutta t\u00e4m\u00e4n sarjan tarkoitus ei ole kattaa sit\u00e4.<\/p>\n<p>Sen sijaan on ajatus n\u00e4hd\u00e4 monien proseduuritoimintojen kirjoittamia laajennuksia ja sitten jakaa ne k\u00e4sitteellisempiin luokkiin, jotka kiteytt\u00e4v\u00e4t heid\u00e4n vastuunsa.<\/p>\n<p>Toiseksi, jos tarkastelet projektin t\u00e4m\u00e4n version arkistossa olevaa l\u00e4hdekoodia, huomaat, ett\u00e4 esittelin my\u00f6s composer.jsonin. T\u00e4m\u00e4 on siksi, ett\u00e4 voin hy\u00f6dynt\u00e4\u00e4 <a href=\"https:\/\/tommcfarlin.com\/php-codesniffer-with-wordpress\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">PHP CodeSnifferi\u00e4<\/a> ja <a href=\"https:\/\/tommcfarlin.com\/following-the-wordpress-coding-standards\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">WordPress-<\/a> koodausstandardeja kirjoittaessani koodia.<\/p>\n<p>Sarjan viimeisess\u00e4 osassa k\u00e4ymme l\u00e4pi <a href=\"https:\/\/wordpress.mediadoma.com\/fi\/nimitilat-ja-automaattinen-lataus-wordpressissae\/\" title=\"nimiv\u00e4lit\">nimiv\u00e4lit<\/a> ja j\u00e4rjest\u00e4mme tiedostot uudelleen. Jos aika sallii, sis\u00e4llyt\u00e4mme automaattisen latausohjelman, jotta meid\u00e4n ei tarvitse lis\u00e4t\u00e4 tiedostoja manuaalisesti laajennustiedostomme yl\u00e4osaan.<\/p>\n<p>Lopuksi olen yhdist\u00e4nyt t\u00e4m\u00e4n koodin <a href=\"https:\/\/github.com\/tommcfarlin\/three-recent-posts\/tree\/0.2.1\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">master-koodiin ja merkinnyt sen 0.2.1:ksi<\/a> (koska minun piti tehd\u00e4 pieni hotfix-korjaus), koska se on viel\u00e4 keskener\u00e4inen.<\/p>\n<h2>Sarjan postaukset<\/h2>\n<ol>\n<li><a href=\"https:\/\/wordpress.mediadoma.com\/fi\/nopea-prototyyppien-luominen-wordpressillae-konseptista-laajennukseen\/\" title=\"Nopea prototyyppien luominen WordPressill\u00e4: konseptista laajennukseen\">Nopea prototyyppien luominen WordPressill\u00e4: konseptista laajennukseen<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.mediadoma.com\/fi\/nopea-prototyyppien-luominen-wordpressillae-konseptianalyysi\/\" title=\"Nopea prototyyppien luominen WordPressill\u00e4: konseptianalyysi\">Nopea prototyyppien luominen WordPressill\u00e4: konseptianalyysi<\/a><\/li>\n<li><a href=\"https:\/\/tommcfarlin.com\/prototype-to-code-1\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">Nopea prototyyppi: Prototype to Code, osa 1<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.mediadoma.com\/fi\/rapid-prototyping-prototype-to-code-osa-2\/\" title=\"Rapid Prototyping: Prototype to Code, osa 2\">Rapid Prototyping: Prototype to Code, osa 2<\/a><\/li>\n<li><a href=\"https:\/\/wordpress.mediadoma.com\/fi\/rapid-prototyping-esittelyssae-automaattinen-lataus\/\" title=\"Rapid Prototyping: Esittelyss\u00e4 automaattinen lataus\">Rapid Prototyping: Esittelyss\u00e4 automaattinen lataus<\/a><\/li>\n<\/ol>\n<p><div id=\"PostUnique_PostSource\" style=\"padding-top: 50px\">:  <a target=\"_blank\" rel=\"noopener nofollow\" href=\"\/\/tommcfarlin.com\" class=\"external external_icon\">tommcfarlin.com<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>T\u00e4st\u00e4 aloitamme prototyyppimme muuntamisen koodiksi. Sen pit\u00e4isi osoittaa, miksi projektin ennakointi on hy\u00f6dyllist\u00e4.<\/p>\n","protected":false},"author":1,"featured_media":223902,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_wp_rev_ctl_limit":""},"categories":[719,917,843],"tags":[1166],"class_list":["post-229526","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kehittaejae","category-muut","category-opetusohjelmia","tag-affiai-fi"],"_links":{"self":[{"href":"https:\/\/wordpress.mediadoma.com\/fi\/wp-json\/wp\/v2\/posts\/229526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.mediadoma.com\/fi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.mediadoma.com\/fi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/fi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/fi\/wp-json\/wp\/v2\/comments?post=229526"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.mediadoma.com\/fi\/wp-json\/wp\/v2\/posts\/229526\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/fi\/wp-json\/wp\/v2\/media\/223902"}],"wp:attachment":[{"href":"https:\/\/wordpress.mediadoma.com\/fi\/wp-json\/wp\/v2\/media?parent=229526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/fi\/wp-json\/wp\/v2\/categories?post=229526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/fi\/wp-json\/wp\/v2\/tags?post=229526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}