{"id":159843,"date":"2016-10-12T13:00:03","date_gmt":"2016-10-12T13:00:03","guid":{"rendered":"https:\/\/premium.wpmudev.org\/blog\/?p=159843"},"modified":"2017-03-29T01:37:31","modified_gmt":"2017-03-29T01:37:31","slug":"advanced-wordpress-development-using-gulp","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/advanced-wordpress-development-using-gulp\/","title":{"rendered":"Advanced WordPress Development: Using Gulp to Streamline Your Workflow"},"content":{"rendered":"<p>No matter what languages you&#8217;ve used in the past to develop websites, you&#8217;ve no doubt had to complete menial, monotonous tasks \u2013 image optimization, JavaScript minification, concatenation, compiling supersets like SCSS and CoffeeScript to their native counterparts, creating the final build&#8230; just to name a few.<\/p>\n<p>Fortunately, build scripts such as <a href=\"http:\/\/gulpjs.com\/\" target=\"_blank\">Gulp<\/a> and <a href=\"http:\/\/gruntjs.com\/\" target=\"_blank\">Grunt<\/a> can take care of these rather boring tasks for you. All they require is a bit of setup and some command line know-how.<\/p>\n<p>This is the fifth post in our six-part series focusing on WordPress for advanced developers. This series follows on from our popular <a href=\"https:\/\/wpmudev.com\/blog\/wordpress-development-intermediate-theme-development-in-detail\/\" target=\"_blank\">WordPress Development for Intermediate Users<\/a>, which introduced you to some meaty coding topics, including theme development in detail, making themes customizer-ready, building plugins, custom post types and taxonomies, queries and loops, custom fields and metadata, and localization.<\/p>\n<p>In this tutorial, we&#8217;ll focus on how you can make the most of Gulp; how you can delegate common tasks to Gulp so you can concentrate on more important tasks like actually coding.<\/p>\n<p><em>Note: It\u2019s important that you have a working knowledge of PHP as this is the foundational language of WordPress for this series, which covers advanced topics aimed at developers. I\u2019ll be referring to code snippets throughout this series.<\/em><\/p>\n<p><!--more--><\/p>\n<h3>Installing Gulp<\/h3>\n<p>Gulp can be installed easily with npm, which is short for Node Package Manager. Node itself is a hugely popular and wonderfully useful JavaScript runtime environment, which includes npm.To get started first install Node using the handy installer on the<\/p>\n<p>To get started, first install Node using the handy installer on the <a href=\"https:\/\/nodejs.org\/en\/\" target=\"_blank\">main Node site<\/a>.<\/p>\n<p>Next, use the code below to install Gulp. That&#8217;s it!<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"install.sh\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=install.sh\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<h3>A Note About Node and npm Packages<\/h3>\n<p>npm is a tool that can be used to install packages like Gulp. Most packages are meant to be installed locally \u2013\u00a0they will only be available in the folder of the project you add them to.<\/p>\n<p>npm uses a special file named <code>package.json<\/code>, which contains metadata about your project. It&#8217;s name, description, version and \u2013 most importantly \u2013 the packages that it uses.<\/p>\n<p>As a result, Node projects are very agile. You don&#8217;t need to share all the packages used or check them into version control. Just make sure <code>package.json<\/code>\u00a0is available and anyone will be able to use the <code>npm install<\/code> command to get all prerequisites in a few seconds.<\/p>\n<p>Some packages \u2013 like Gulp \u2013 can be installed globally. This is not a requirement, but it is convenient for tools, especially development tools, that we use all the time.<\/p>\n<h4>Installing Packages<\/h4>\n<p>We&#8217;ll be installing a few packages related to Gulp for this tutorial. The syntax to accomplish this is the following:<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"npm-install.sh\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=npm-install.sh\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>You can install one or more packages by separating their names with spaces. <code>--save-dev<\/code> or <code>-D<\/code> indicates that we&#8217;d like to save the packages as development dependencies. They will be placed in the package file for us.<\/p>\n<h3>Starting a New Project<\/h3>\n<p>For our first example, we&#8217;ll create a WordPress theme. You should know how to do that by now: create a new folder in the themes directory, add an <code>index.php<\/code> and a <code>style.css<\/code> file with the appropriate information, etc. We&#8217;ll also add a <code>package.json<\/code> file to store our dependencies.<\/p>\n<p>Let&#8217;s set all that up within the terminal:<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"setup.sh\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=setup.sh\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Issue these commands one-by-one. Note the <code>&amp;&amp;<\/code> in the first command. This allows me to issue a second command, which means that the first line will create a directory and immediately switch to it as well.<\/p>\n<p>The <code>npm init<\/code> command is a wizard for the <code>package.json<\/code> file. It will ask you a series of questions and you can press <strong>Enter<\/strong> for each to use the defaults.<\/p>\n<div  class=\"wpdui-pic-regular  \">\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/10\/npm-init.png\" alt=\"Questions following the npm init command\" width=\"670\" height=\"426\" \/><figcaption class=\"wp-caption-text\">Questions following the npm init command<\/figcaption><\/figure>\n<\/div>\n<p>We&#8217;ll need to install Gulp locally as well to make sure we can use it within our project. The following command will take care of it for us:<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"gulp-install.sh\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=gulp-install.sh\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>When you install your first dependency, you&#8217;ll see a new folder named <em>node_modules<\/em>. This will contain hordes of packages (each one you install will have multiple dependencies of its own). You do not need to add this to your repository; all that is needed is the package file.<\/p>\n<div  class=\"wpdui-pic-regular  \">\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/10\/package.png\" alt=\"The package.json file\" width=\"670\" height=\"373\" \/><figcaption class=\"wp-caption-text\">The package.json file<\/figcaption><\/figure>\n<\/div>\n<h3>Gulp Basics<\/h3>\n<p>Gulp is essentially a task runner. You define a condition when a task should run and then define exactly what the task should do. For example: if you run <code>gulp optimize<\/code> in the command line, Gulp should find all images within your project and optimize them.<\/p>\n<p>Since Gulp is a framework and not a magic solution to everything, you need to tell it what the conditions are and what to do when they are met. You use the <code>gulpfile.js<\/code> file, which contains all the information Gulp needs to perform its tasks.<\/p>\n<p>Let&#8217;s create a gulpfile now with minimal information:<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"gulpfile.js\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=gulpfile.js\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>The first line imports Gulp itself. This is followed by our first task named &#8220;default.&#8221; When you type <code>gulp<\/code> into the command line the default task is run. We&#8217;ll be adding some code in there later to make some magic happen!<\/p>\n<p>To create a task from start to finish we&#8217;ll need to follow a simple checklist:<\/p>\n<ol>\n<li>Find a package that can perform the task,<\/li>\n<li>Install the package,<\/li>\n<li>Add it to the gulpfile, and<\/li>\n<li>Configure the task by setting the conditions and its options.<\/li>\n<\/ol>\n\n<h3>Your First Gulp Task<\/h3>\n<p>Let&#8217;s follow the steps above and make the image optimization happen. But before we do that, let&#8217;s add a <code>screenshot.png<\/code> image to our theme. I used a photo from <a href=\"https:\/\/unsplash.com\/?photo=9idqIGrLuTE\" target=\"_blank\">Unsplash<\/a>, which I cropped to 880&#215;660, the recommended size for this file. It ended up being 1MB.<\/p>\n<p>A quick Google search turned up the <a href=\"https:\/\/www.npmjs.com\/package\/gulp-imagemin\" target=\"_blank\">gulp-imagemin<\/a> package, which minifies PNG, GIF and JPG images. Perfect! Installation and usage instructions are usually available on-site. To install this plugin use the following command:<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"install-image-opt.sh\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=install-image-opt.sh\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>To add it to the gulpfile we&#8217;ll include it right under our initial inclusion of Gulp itself:<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"gulpfile-imageop.js\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=gulpfile-imageop.js\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Finally, we need to define a condition \u2013 when a task is run \u2013 and tell Gulp what to do. Here&#8217;s the code for a new task named &#8220;optimize-images&#8221;:<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"optimize-images.js\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=optimize-images.js\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Using the <code>src()<\/code> function, I told Gulp what files to sort through when searching for images. We&#8217;re looking for all GIF, JPG, JPEG and PNG files in the root directory and all files in the images directory.<\/p>\n<p>We&#8217;re then &#8220;piping&#8221; the contents of all matched files into a function named <code>imagemin()<\/code>\u00a0which we imported at the top of the file; this is the package we installed earlier. This function will modify the stream and pass it on.<\/p>\n<p>We pipe the received stream to the <code>dest()<\/code> function which describes the output location for the files. The given value will overwrite the original files with the optimized version.<\/p>\n<p>If you run the <code>gulp optimize-images<\/code> command in the terminal you should see the following output and find that your image has decreased in size:<\/p>\n<div  class=\"wpdui-pic-regular  \">\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/10\/imagemin.png\" alt=\"Gulp Image Optimization At Work\" width=\"670\" height=\"128\" \/><figcaption class=\"wp-caption-text\">Gulp Image Optimization At Work<\/figcaption><\/figure>\n<\/div>\n<h3>How Gulp Works<\/h3>\n<p>I think the example explains it well, but I want to reiterate and add some additional information. The general process behind a gulp task is the following:<\/p>\n<ol>\n<li>Target some source files<\/li>\n<li>Read their content and pass them on to a function<\/li>\n<li>This passing on, or piping, can happen multiple times within a task. Each function takes the result of the previous, modifies it and passes it along.<\/li>\n<li>Take the resulting stream and output it to the designated location<\/li>\n<\/ol>\n<p>Let&#8217;s look at processing SASS files as another example. Here&#8217;s how the algorithm above could be applied if we wanted to compile all our sass files, automatically add vendor prefixes and minify the result:<\/p>\n<ol>\n<li>Find all .scss files<\/li>\n<li>Pass their content on to the Sass compiler<\/li>\n<li>Pass the resulting content to the auto prefixer<\/li>\n<li>Pass the result to the minifier<\/li>\n<li>Save the result to the same source file<\/li>\n<\/ol>\n<p>Let&#8217;s make that happen in Gulp. We&#8217;ll need three packages:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.npmjs.com\/package\/gulp-sass\" target=\"_blank\">gulp-sass<\/a><\/li>\n<li><a href=\"https:\/\/www.npmjs.com\/package\/gulp-autoprefixer\" target=\"_blank\">gulp-autoprefixer<\/a><\/li>\n<li><a href=\"https:\/\/www.npmjs.com\/package\/gulp-clean-css\" target=\"_blank\">gulp-clean-css<\/a><\/li>\n<\/ul>\n<p>We can install them in one go using the following command:<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"install-3.sh\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=install-3.sh\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Next, let&#8217;s add them to our gulpfile right at the top<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"add-3.js\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=add-3.js\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>We should also add some Sass to our theme. Let&#8217;s create a Sass file in the main directory called <code>style.scss<\/code> with the following content:<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"style.scss\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=style.scss\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>Finally, we need to create the task which will perform all the actions we need. Here&#8217;s the full code with the explanation underneath.<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"css-task.js\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=css-task.js\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>I&#8217;ve taken all the SCSS files in the root directory, piped them to the <code>sass()<\/code> function, followed by the autoprefixer, followed by the cleanCSS function and finally I piped everything to the main directory which will result in <code>style.scss<\/code> being output to <code>style.css<\/code>. The resulting CSS is the following:<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"style.css\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=style.css\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>As you can see, everything has been minified \u2013 the variable has been replaced with its value and vendor prefixes have been added where necessary.<\/p>\n<p>To come up with this code I went to the documentation of each and copy-pasted the pipe part of the example, it really as that simple. The commands may have some options worth looking into but most work fine out-of-the-box.<\/p>\n<h3>Watching Files<\/h3>\n<p>By issuing our commands we&#8217;ve already come a long way. We can get Gulp to do whatever we want as long as we find the correct package and add it to our Gulpfile. However, we can do more.<\/p>\n<p>When developing, especially CSS, we tend to save and modify a lot. We would need to issue the <code>gulp css<\/code> command continuously. Gulp has a great mechanism called watching which allow us to detect changes in files and automatically issue commands. We can build this in on top of everything we&#8217;ve done already.<\/p>\n<p>We essentially need to add a new directive: when a file within the specified set changes, run a task.<\/p>\n<p>Get started by installing <a href=\"https:\/\/www.npmjs.com\/package\/gulp-watch\" target=\"_blank\">gulp-watch<\/a> and adding it to the gulpfile, this should be easy now that you&#8217;ve done it a couple of times.<\/p>\n<p>The new task is pretty simple. All we&#8217;re doing is setting the files to watch, and if one of them is matched, we perform one of our existing tasks:<\/p>\n<div class=\"gist\" data-gist=\"149e592a5bb2fc28839e2f2080e4c333\" data-gist-file=\"watch.js\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/149e592a5bb2fc28839e2f2080e4c333.js?file=watch.js\">Loading gist 149e592a5bb2fc28839e2f2080e4c333<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p>When you run this task with <code>gulp watch-css<\/code> you should see something like the screenshot below in your terminal. Note that it does not exit back to the prompt it just &#8220;hangs&#8221; there. It is waiting for an indicated file to change. When it does it will add some more output. If you&#8217;d like to return to the prompt, press control + C.<\/p>\n<div  class=\"wpdui-pic-regular  \">\n<figure class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-670x670 size-670x670\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2016\/10\/gulp-watch.png\" alt=\"Gulp Watch Output\" width=\"670\" height=\"89\" \/><figcaption class=\"wp-caption-text\">Gulp Watch Output<\/figcaption><\/figure>\n<\/div>\n<h3>Overview<\/h3>\n<p>That&#8217;s all there is to Gulp, a few simple rules to follow when adding a task and you can automate to your heart&#8217;s content. You can concatenate files, error check them, copy\/move\/delete files, and even write your own packages for anything not covered by third party packages.<\/p>\n<p>Tools like Gulp can shave hours of work off your work days, which means they are possibly the most worthwhile additions to your skillset.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>No matter what languages you&#8217;ve used in the past to develop websites, you&#8217;ve no doubt had to complete menial, monotonous tasks \u2013 image optimization, JavaScript minification, concatenation, compiling supersets like SCSS and CoffeeScript to their native counterparts, creating the final build&#8230; just to name a few. Fortunately, build scripts such as Gulp and Grunt can [&hellip;]<\/p>\n","protected":false},"author":344049,"featured_media":159868,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[557],"tags":[9770,10411],"tutorials_categories":[],"class_list":["post-159843","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","tag-development-2","tag-gulp"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/159843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/344049"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=159843"}],"version-history":[{"count":8,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/159843\/revisions"}],"predecessor-version":[{"id":163653,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/159843\/revisions\/163653"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/159868"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=159843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=159843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=159843"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=159843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}