{"id":1023,"date":"2020-08-14T15:52:40","date_gmt":"2020-08-14T19:52:40","guid":{"rendered":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/?p=1023"},"modified":"2020-08-14T16:04:53","modified_gmt":"2020-08-14T20:04:53","slug":"wp-version-5-5","status":"publish","type":"post","link":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/2020\/wp-version-5-5\/","title":{"rendered":"WP version 5.5"},"content":{"rendered":"\n<p>This update has a few changes that make me happy!<\/p>\n\n\n\n<p><strong>What:<\/strong> First and foremost: a simple way to filter archive titles. Yay! Hooray! Tired of<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Category: Books<\/h2>\n\n\n\n<p>or<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Archive: Products<\/h2>\n\n\n\n<p>You can change that <em>Category:<\/em> or <em>Archive:<\/em>, or any other archive title prefix, to anything you want or remove it altogether.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p><strong>How:<\/strong> <\/p>\n\n\n\n<p>If you want to remove the prefix altogether:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter( 'get_the_archive_title_prefix', '__return_empty_string' );<\/code><\/pre>\n\n\n\n<p>That&#8217;s enough, that&#8217;s all you have to add to functions.php in your theme, or in a plugin, or for example in the Code Snippets plugin.<\/p>\n\n\n\n<p>If you would prefer to replace the prefix with a custom one, instead of using <code>__return_empty_string<\/code>, pass the filter a function. For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function your_archive_title_prefix( $prefix ){\n    $prefix = __( 'All my favorite ', 'your-text-domain' );\n}\nadd_filter( 'get_the_archive_title_prefix', 'your_archive_title_prefix' );<\/code><\/pre>\n\n\n\n<p><strong>Where:<\/strong> WP 5.5 Field Guide, specifically this post: <a rel=\"noreferrer noopener\" href=\"https:\/\/make.wordpress.org\/core\/2020\/07\/30\/filtering-archive-pages-headings-in-wordpress-5-5\/\" target=\"_blank\">Filtering Archive Page Headings in WordPress 5.5<\/a><\/p>\n\n\n\n<p><strong>Thoughts:<\/strong> This is not the only change I&#8217;m happy with, but the one I&#8217;ve been longing for the longest.<\/p>\n\n\n\n<p>Another one I&#8217;m happy with is the improvements to WordPress image editing. I always warned people against using this because it made display of an image unreliable, or maybe it&#8217;s better to say too reliable: it would only display in the way you&#8217;d edited it in WordPress. Which might work in one context but not in every context. <\/p>\n\n\n\n<p>Now you can edit directly in the block editor, with more intuitive tools, and it will create a new version of your image, so you can still use the old one elsewhere. What I&#8217;m not yet sure of: how well the changes you make to an image will work across devices. We&#8217;ll find out by and by.<\/p>\n\n\n\n<p>Read more about <a rel=\"noreferrer noopener\" href=\"https:\/\/make.wordpress.org\/core\/2020\/07\/20\/editing-images-in-the-block-editor\/\" target=\"_blank\">Editing Images in the Block Editor<\/a>.<\/p>\n\n\n\n<p>I think it&#8217;s wonderful news that you can now <a rel=\"noreferrer noopener\" href=\"https:\/\/make.wordpress.org\/core\/2020\/07\/17\/passing-arguments-to-template-files-in-wordpress-5-5\/\" target=\"_blank\">pass arguments to template files<\/a> and that <a href=\"https:\/\/make.wordpress.org\/core\/2020\/07\/14\/lazy-loading-images-in-5-5\/\" target=\"_blank\" rel=\"noreferrer noopener\">lazy  loading images is part of WordPress<\/a>.<\/p>\n\n\n\n<p>Wonderful new release, very happy with it. Read the rest of the changes in the <a rel=\"noreferrer noopener\" href=\"https:\/\/make.wordpress.org\/core\/2020\/07\/30\/wordpress-5-5-field-guide\/\" target=\"_blank\">WordPress 5.5 Field Guide<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<div class=\"_3bJ2H CHExY\">Image credit: WordPress Logo with tacky boke effect by me<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This update has a few changes that make me happy! What: First and foremost: a simple way to filter archive titles. Yay! Hooray! Tired of Category: Books or Archive: Products You can change that Category: or Archive:, or any other archive title prefix, to anything you want or remove it altogether.<\/p>\n","protected":false},"author":2,"featured_media":1025,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[182,184,149,186,185,41],"class_list":["post-1023","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-new-things","tag-5-5","tag-archive-title","tag-image-editing","tag-lazy-loading","tag-passing-arguments-to-templates","tag-wordpress","infinite-scroll-item"],"_links":{"self":[{"href":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/wp-json\/wp\/v2\/posts\/1023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/wp-json\/wp\/v2\/comments?post=1023"}],"version-history":[{"count":3,"href":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/wp-json\/wp\/v2\/posts\/1023\/revisions"}],"predecessor-version":[{"id":1029,"href":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/wp-json\/wp\/v2\/posts\/1023\/revisions\/1029"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/wp-json\/wp\/v2\/media\/1025"}],"wp:attachment":[{"href":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/wp-json\/wp\/v2\/media?parent=1023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/wp-json\/wp\/v2\/categories?post=1023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blindemanwebsites.com\/today-i-learned\/wp-json\/wp\/v2\/tags?post=1023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}