{"id":5343,"date":"2018-07-29T12:19:09","date_gmt":"2018-07-29T10:19:09","guid":{"rendered":"https:\/\/florianbrinkmann.com\/en\/?p=5343"},"modified":"2020-02-09T10:59:27","modified_gmt":"2020-02-09T09:59:27","slug":"wordpress-weekly-recap-registering-metadata-in-4-9-8","status":"publish","type":"post","link":"https:\/\/florianbrinkmann.com\/en\/wordpress-weekly-recap-registering-metadata-in-4-9-8-5343\/","title":{"rendered":"WordPress weekly recap #30: Registering metadata in 4.9.8 and more"},"content":{"rendered":"\n<p>WordPress 4.9.8 introduces a way to register metadata for specific object subtypes, instead of only for whole object types like all post types.<\/p>\n\n\n\n<p>As I needed to skip the last two recaps, I will include posts from that two weeks, which I think are important enough, with the posts from the current week 30 into this post.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Core<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Registering metadata in 4.9.8<\/h3>\n\n\n\n<p>WordPress 4.9.8 adds the ability to register metadata for a specific object subtype, like a specific post type, instead only for a specific object type.<\/p>\n\n\n\n<p>To achieve that, the <code class=\"lang-php\">register_meta()<\/code> function now supports a <code class=\"lang-php\">object_subtype<\/code> argument in the args array. Additionally, there are two new functions <code class=\"lang-php\">register_post_meta()<\/code> and <code class=\"lang-php\">register_term_meta()<\/code> that take the post type or taxonomy as the first parameter, followed by the meta key and additional arguments as an array. Internally, they are wrappers for <code class=\"lang-php\">register_meta()<\/code> and are the recommended way to register meta for post types and terms.<\/p>\n\n\n\n<p>More information on that can be found in the post \u00bb<a href=\"https:\/\/make.wordpress.org\/core\/2018\/07\/27\/registering-metadata-in-4-9-8\/\">Registering Metadata in 4.9.8<\/a>\u00ab by Felix Arntz.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Misc<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/core\/2018\/07\/17\/servehappy-roadmap-update-and-priorities\/\">Servehappy: Roadmap Update and Priorities<\/a>\u00ab<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/core\/2018\/07\/17\/wordpress-4-9-8-beta-1\/\">WordPress 4.9.8 Beta 1<\/a>\u00ab. The new version will include the Try Gutenberg callout. The final release is planned for July 31.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/core\/2018\/07\/19\/wordpress-4-9-8-beta-2\/\">WordPress 4.9.8 Beta 2<\/a>\u00ab.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/core\/2018\/07\/20\/whats-new-in-gutenberg-20th-july\/\">What\u2019s new in Gutenberg? (20th July)<\/a>\u00ab. The release adds new blocks for showing archives and the latest comments.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/core\/2018\/07\/24\/wordpress-4-9-8-release-candidate-1\/\">WordPress 4.9.8 Release Candidate 1<\/a>\u00ab.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/core\/2018\/07\/26\/wordpress-4-9-8-release-candidate-2\/\">WordPress 4.9.8 Release Candidate 2<\/a>\u00ab.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Design<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Misc<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/design\/2018\/07\/27\/design-meeting-notes-for-july-25-2018\/\">Design meeting notes for July 25, 2018<\/a>\u00ab.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Mobile<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Misc<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/mobile\/2018\/07\/09\/next-steps-for-gutenberg-mobile\/\">Next Steps for Gutenberg Mobile<\/a>\u00ab.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Polyglots<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Misc<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/polyglots\/2018\/07\/10\/glotdict-1-4-the-new-hope\/\">GlotDict 1.4 \u2013 The new hope<\/a>\u00ab.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Support<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Misc<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/support\/2018\/07\/july-26th-support-team-meeting-summary\/\">July 26th Support Team Meeting Summary<\/a>\u00ab.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Docs<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Misc<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/docs\/2018\/07\/23\/summary-of-helphub-meeting-23-july-2018\/\">Summary of HelpHub Meeting 23 July 2018<\/a>\u00ab.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Community<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Misc<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/community\/2018\/07\/10\/stripe-is-now-available-to-all-wordcamps\/\">Stripe is now available to all WordCamps<\/a>\u00ab.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/community\/2018\/07\/16\/stripe-will-become-preferred-payment-gateway-for-wordcamps\/\">Stripe will become preferred payment gateway for WordCamps<\/a>\u00ab.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/community\/2018\/07\/23\/wordpress-meetup-organizer-newsletter-may-2018\/\">WordPress Meetup Organizer Newsletter: July 2018<\/a>\u00ab.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/community\/2018\/07\/24\/new-contributor-day-fields-for-wordcamps\/\">New Contributor Day Fields for WordCamps<\/a>\u00ab.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/community\/2018\/07\/25\/recap-of-the-diversity-outreach-speaker-training-meeting-on-july-25-2018\/\">Recap of the Diversity Outreach Speaker Training meeting on July 25, 2018<\/a>\u00ab.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/community\/2018\/07\/25\/info-for-new-members-to-the-diversity-outreach-speaker-training-team\/\">Info For New Members To The Diversity Outreach Speaker Training Team<\/a>\u00ab.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/community\/2018\/07\/26\/wordcamp-incubator-2018-update-thread-july-edition\/\">WordCamp Incubator 2018 Update Thread: July edition<\/a>\u00ab.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/community\/2018\/07\/27\/the-sponsor-wranglers-cheatsheet\/\">The Sponsor Wrangler\u2019s Cheatsheet<\/a>\u00ab.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Marketing<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Misc<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/marketing\/2018\/07\/26\/marketing-team-notes-july-25-2018\/\">Marketing Team Notes \u2013 July 25, 2018<\/a>\u00ab.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/marketing\/2018\/07\/29\/network-rail-a-wordpress-case-study\/\">Network Rail: A WordPress Case Study<\/a>\u00ab.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/marketing\/2018\/07\/29\/a-drupal-to-wordpress-migration-and-a-new-digital-culture-of-creation\/\">A Drupal to WordPress Migration and a New Digital Culture of Creation<\/a>\u00ab.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">WP-CLI<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Misc<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/cli\/2018\/07\/14\/contributing-to-wp-cli\/\">Contributing to WP-CLI<\/a>\u00ab. There are many different ways to contribute to the WP-CLI \u2013 not only via code.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/cli\/2018\/07\/19\/details-on-the-upcoming-major-release\/\">Details on the upcoming major release<\/a>\u00ab. WP-CLI 2.0.0 is planned for July 31.<\/li><li>\u00bb<a href=\"https:\/\/make.wordpress.org\/cli\/2018\/07\/21\/wp-cli-hack-day-results\/\">WP-CLI Hack Day Results<\/a>\u00ab.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">From the WordPress.org blog<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>\u00bb<a href=\"https:\/\/wordpress.org\/news\/2018\/07\/quarterly-updates-q2-2018\/\">Quarterly Updates | Q2 2018<\/a>\u00ab.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>WordPress 4.9.8 introduces a way to register metadata for specific object subtypes, instead of only for whole object types like all post types. As I needed to skip the last two recaps, I will include posts from that two weeks, which I think are important enough, with the posts from the current week 30 into [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3219,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wpf_show_in_dewp_planet_feed":false,"flobn_post_versions":"","webmentions_disabled_pings":false,"webmentions_disabled":false,"lazy_load_responsive_images_disabled":false,"footnotes":""},"categories":[37],"tags":[116],"class_list":["post-5343","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-wordpress-weekly-recap"],"wp-worthy-pixel":{"ignored":false,"public":"00b29a4a10764d5ab8fee9b96f330981","server":"vg07.met.vgwort.de","url":"https:\/\/vg07.met.vgwort.de\/na\/00b29a4a10764d5ab8fee9b96f330981"},"wp-worthy-type":"normal","_links":{"self":[{"href":"https:\/\/florianbrinkmann.com\/en\/wp-json\/wp\/v2\/posts\/5343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/florianbrinkmann.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/florianbrinkmann.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/florianbrinkmann.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/florianbrinkmann.com\/en\/wp-json\/wp\/v2\/comments?post=5343"}],"version-history":[{"count":4,"href":"https:\/\/florianbrinkmann.com\/en\/wp-json\/wp\/v2\/posts\/5343\/revisions"}],"predecessor-version":[{"id":5766,"href":"https:\/\/florianbrinkmann.com\/en\/wp-json\/wp\/v2\/posts\/5343\/revisions\/5766"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/florianbrinkmann.com\/en\/wp-json\/wp\/v2\/media\/3219"}],"wp:attachment":[{"href":"https:\/\/florianbrinkmann.com\/en\/wp-json\/wp\/v2\/media?parent=5343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/florianbrinkmann.com\/en\/wp-json\/wp\/v2\/categories?post=5343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/florianbrinkmann.com\/en\/wp-json\/wp\/v2\/tags?post=5343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}