{"id":139698,"date":"2016-07-13T11:00:16","date_gmt":"2016-07-13T11:00:16","guid":{"rendered":"https:\/\/getflywheel.com\/?p=17984"},"modified":"2023-10-20T13:04:09","modified_gmt":"2023-10-20T18:04:09","slug":"how-to-build-your-very-own-wordpress-plugin","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/","title":{"rendered":"How To Build Your Very Own WordPress Plugin"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">It may seem like a huge undertaking to create a WordPress plugin. In some cases this is true\u2014some plugins can be incredibly complex. But depending on the functionality you\u2019re looking to add, many are actually fairly simple to build. Creating a plugin can be done quickly with some basic understanding of how it all works.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where Do Plugins Go?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>WordPress folder structure<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before development begins, it\u2019s good to know where plugins belong. Let\u2019s take a look into the WordPress folder structure at the basic app directories. Inside the <code>wp-content<\/code> folder, you\u2019ll see a plugins directory. This is where all of your individual plugins will live.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Plugins in this folder can be single files or in subdirectories. Smaller plugins typically only require a single .php file. Complex plugins may have multiple file types (HTML, CSS, and JavaScript are all possibilities). Creating a subdirectory is helpful to house the various files along with the .php functions of the plugin.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2016\/07\/how-to-build-wordpress-plugin-plugin-file-path.png\" alt=\"how-to-build-wordpress-plugin-plugin-file-path\" class=\"wp-image-17995\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Actions and Filters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before the plugin building begins, it\u2019s good to know some basics to get you started. When you start coding your own plugins, a good place to start is learning how actions and filters work. Knowing the basics will be helpful and as you have more questions about it, the <a rel=\"noopener noreferrer\" href=\"https:\/\/codex.wordpress.org\/Plugin_Resources\" target=\"_blank\">WordPress Codex<\/a> is a great resource.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Before Plugin Development<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Meta information is incredibly important and it\u2019s also the information that tells WordPress details about the plugin. Plugins have options to be installed, deleted, activated, and inactivated. Technically, all you need is the plugin name for WordPress to establish your file as a plugin. However, it is good practice to provide the other information as it will be helpful to you and your users.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&amp;lt;?php\n\n\/**\n\n* Plugin Name: Example Plugin\n\n* Plugin URI: http:\/\/mysite.com\/\n\n* Description: A brief description about your plugin.\n\n* Version: 1.0 (or whatever current version your plugin is on)\n\n* Author: Plugin Author's Name\n\n* Author URI: Author's website\n\n* License: A \"Slug\" license name e.g. GPL12\n\n*\/<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">A Very Simple Plugin<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Starting small is a good way to ease into plugin building. Let\u2019s create a very simple example. Actions and filters make things happen, so let\u2019s add a line of text after all of the posts to test things out.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s always good to work in a development environment, and this is especially important as you experiment with plugins.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, create a new file and make sure it is in the correct place. Copy and paste this code into your main plugin file and save it. This gets pasted after the meta information.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'the_content', 'test_example_text' );\n\nfunction test_example_text ( $content ) {\nreturn $content .= '&amp;lt;p&amp;gt;This is my first plugin!&amp;lt;\/p&amp;gt;';\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is an example of a hook hard at work. By hooking&nbsp;into <code>the_content<\/code> action, this works when WordPress renders the post content. WordPress calls the <code>test_example_text<\/code> function that is defined below the <code>add_action call<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Seeing the plugin in action<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019ve probably done this before, but when logged into the WordPress admin, you will see the plugin option on the left. Our plugin shows up, and it now it needs to be activated. Once it is activated, it appears at the end of the post.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2016\/07\/how-to-build-wordpress-plugin-plugin-listing.png\" alt=\"how-to-build-wordpress-plugin-plugin-listing\" class=\"wp-image-17996\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2016\/07\/how-to-build-wordpress-plugin-first-plugin.png\" alt=\"how-to-build-wordpress-plugin-first-plugin\" class=\"wp-image-17994\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">A More Complex Plugin<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">So this example demonstrates the basics of how plugins work, but what if you want to do something a little more useful? Custom post types are used quite frequently in custom site design, so let\u2019s start with that. There are existing plugins that you can use, but creating one from scratch is a good way to ease into plugin development.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What is custom post type in WordPress?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Pages and posts are the most popular content types in WordPress, but what if you want something more specific? Pages and Posts may be too general in some circumstances, which is why a custom post type becomes handy. A good example is a custom post type of portfolio. The idea is to create a regular post with a different post type value attached to it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can call your custom post types whatever you want. For example, if you run a food site, you could create a handy recipe post type. This post type can have different custom fields with its own custom category structure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Creating custom post types<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The first thing you need to do is actually create the custom post type. Using the same file structure from above, let\u2019s add our folder and .php file. Assuming the meta information has been created, we will be adding our functionality after the meta block.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We are going to create a plugin for a custom post type called \u201cRecipes\u201d to demonstrate the basics of creating a more complex plugin.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The basic version<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you take a look at the snippet below, it is pretty simple at the start. We will see a custom post type in the left menu to make sure this works. The <code>register_post_type()<\/code> is used in a function, which hooks into the <code>init<\/code> action. There are two arguments which are the custom post type and an arguments array.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function recipe_custom_post_type() {\nregister_post_type( 'recipe', array( 'public' =&amp;gt; true, 'label' =&amp;gt; 'Recipes' ) );\n}\nadd_action( 'init', 'recipe_custom_post_type' );<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2016\/07\/how-to-build-wordpress-plugin-custom-post-type-01.png\" alt=\"how-to-build-wordpress-plugin-custom-post-type-01\" class=\"wp-image-17993\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The advanced version<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This basic version of the plugin will actually work, however, more functionality is needed to really make it wonderful. For example, labels are still reading \u201cAdd new post.\u201d We want to this to be more recipe-specific; afterall, this is why we aren\u2019t using just a plain post. Customizations can be made using the labels property.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2016\/07\/how-to-build-wordpress-plugin-add-new-post.png\" alt=\"how-to-build-wordpress-plugin-add-new-post\" class=\"wp-image-17991\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let\u2019s scratch what we just did and use this instead:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'init', 'recipe_custom_post_type' );\nadd_filter( 'post_updated_messages', 'recipes_messages' );\n\nfunction recipe_custom_post_type() {\n$labels = array(\n'name' =&amp;gt; 'Recipes',\n'singular_name' =&amp;gt; 'Recipe',\n'menu_name' =&amp;gt; 'Recipe',\n'name_admin_bar' =&amp;gt; 'Recipe',\n'add_new' =&amp;gt; 'Add New',\n'add_new_item' =&amp;gt; 'Add New Recipe',\n'new_item' =&amp;gt; 'New Recipe',\n'edit_item' =&amp;gt; 'Edit Recipe',\n'view_item' =&amp;gt; 'View Recipe',\n'all_items' =&amp;gt; 'All Recipes',\n'search_items' =&amp;gt; 'Search Recipes',\n'parent_item_colon' =&amp;gt; 'Parent Recipes:',\n'not_found' =&amp;gt; 'No recipes found.',\n'not_found_in_trash' =&amp;gt; 'No recipes found in Trash.'\n);\n\n$args = array(\n'public' =&amp;gt; true,\n'labels' =&amp;gt; $labels,\n'rewrite' =&amp;gt; array( 'slug' =&amp;gt; 'recipe' ),\n'has_archive' =&amp;gt; true,\n'menu_position' =&amp;gt; 20,\n'menu_icon' =&amp;gt; 'dashicons-carrot',\n'taxonomies' =&amp;gt; array( 'post_tag', 'category' ),\n'supports' =&amp;gt; array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'custom-fields', 'comments' )\n);\nregister_post_type( 'recipe', $args );\n}\n\nfunction recipes_messages( $messages ) {\n$post = get_post();\n\n$messages&#091;'recipe'] = array(\n0 =&amp;gt; '',\n1 =&amp;gt; 'Recipe updated.',\n2 =&amp;gt; 'Custom field updated.',\n3 =&amp;gt; 'Custom field deleted.',\n4 =&amp;gt; 'Recipe updated.',\n5 =&amp;gt; isset( $_GET&#091;'revision'] ) ? sprintf( 'Recipe restored to revision from %s',wp_post_revision_title( (int) $_GET&#091;'revision'], false ) ) : false,\n6 =&amp;gt; 'Recipe published.',\n7 =&amp;gt; 'Recipe saved.',\n8 =&amp;gt; 'Recipe submitted.',\n9 =&amp;gt; sprintf(\n'Recipe scheduled for: &amp;lt;strong&amp;gt;%1$s&amp;lt;\/strong&amp;gt;.',\ndate_i18n( 'M j, Y @ G:i', strtotime( $post-&amp;gt;post_date ) )\n),\n10 =&amp;gt; 'Recipe draft updated.'\n);\n\nreturn $messages;\n}\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2016\/07\/how-to-build-wordpress-plugin-add-new-recipe.png\" alt=\"how-to-build-wordpress-plugin-add-new-recipe\" class=\"wp-image-17992\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">See how the text at the top now reads \u201cAdd New Recipe\u201d? We made that happen by customizing the \u201cadd new item\u201d with the desired text.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2016\/07\/how-to-build-wordpress-plugin-ui-elements.png\" alt=\"how-to-build-wordpress-plugin-ui-elements\" class=\"wp-image-18000\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2016\/07\/how-to-build-wordpress-plugin-reciep-posts.png\" alt=\"how-to-build-wordpress-plugin-reciep-posts\" class=\"wp-image-17997\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">There\u2019s a lot going on here and things get pretty detailed when working with arguments. One that is visually obvious is the <code>supports<\/code> property. Here we have declared that a title, editor, author, thumbnail, excerpt, custom fields, and comments be included. These are shown in the admin user interface and on some parts of the front end as well. The taxonomies property allows you to assign custom taxonomies to the custom post type.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2016\/07\/how-to-build-wordpress-plugin-ui-new.png\" alt=\"how-to-build-wordpress-plugin-ui-new\" class=\"wp-image-18001\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Post type interaction messages<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whenever you save, delete, search, etc., you receive a default message. In our <code>recipes_messages<\/code> function, there is a listing of these messages. Defining the array for the custom post type with the appropriate messages will ensure things read the way you like for the custom post type. Things look very recipe-specific with the wording, so this goes along well with the custom post type.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2016\/07\/how-to-build-wordpress-plugin-recipe-text.png\" alt=\"how-to-build-wordpress-plugin-recipe-text\" class=\"wp-image-17998\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once you\u2019ve completed your plugin, you can publish it in the WordPress Plugin Directory so others can download it, too. If this is the case, including a <code>readme.txt<\/code> is helpful for those who are searching for a plugin like yours. Basically, this file will include your name and what the plugin does, but you could also include details about each revision and specifics about the updates.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As you can see, plugins can be very simple or complex. Creating a plugin is not as tricky as it may first seem and is a good habit to get into when developing WordPress sites. They allow for easy organization and the ability to reuse on multiple sites, making your WordPress development more efficient.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can spend more time building plugins and designing outstanding sites when you choose WP Engine for your <a href=\"https:\/\/wpengine.com\/wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress hosting<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re looking to get involved in the WordPress development try developing your own plugin. <\/p>\n","protected":false},"author":1,"featured_media":140796,"template":"","resource-topic":[1396,901],"resource-role":[1397,896],"resource-type":[916],"class_list":["post-139698","resource","type-resource","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Build Your Very Own WordPress Plugin<\/title>\n<meta name=\"description\" content=\"Creating a WordPress plugin may seem like a huge undertaking, but it&#039;s probably easier than you think. This simple guide will help get you started!\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Build Your Very Own WordPress Plugin\" \/>\n<meta property=\"og:description\" content=\"Creating a WordPress plugin may seem like a huge undertaking, but it&#039;s probably easier than you think. This simple guide will help get you started!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-20T18:04:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2016\/07\/WordPress-plugins_1200x627.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"627\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2016\/07\/WordPress-plugins_1200x627.png\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/\",\"name\":\"How To Build Your Very Own WordPress Plugin\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2016-07-13T11:00:16+00:00\",\"dateModified\":\"2023-10-20T18:04:09+00:00\",\"description\":\"Creating a WordPress plugin may seem like a huge undertaking, but it's probably easier than you think. This simple guide will help get you started!\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/case-studies\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/wpengine.com\/case-studies\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How To Build Your Very Own WordPress Plugin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\",\"url\":\"https:\/\/wpengine.com\/case-studies\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/f5301455463371a10d1fc290e9ad0085\",\"name\":\"WP Engine\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"caption\":\"WP Engine\"},\"sameAs\":[\"https:\/\/wpengine.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Build Your Very Own WordPress Plugin","description":"Creating a WordPress plugin may seem like a huge undertaking, but it's probably easier than you think. This simple guide will help get you started!","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"How To Build Your Very Own WordPress Plugin","og_description":"Creating a WordPress plugin may seem like a huge undertaking, but it's probably easier than you think. This simple guide will help get you started!","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2023-10-20T18:04:09+00:00","og_image":[{"width":1200,"height":627,"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2016\/07\/WordPress-plugins_1200x627.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2016\/07\/WordPress-plugins_1200x627.png","twitter_site":"@wpengine","twitter_misc":{"Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/","name":"How To Build Your Very Own WordPress Plugin","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2016-07-13T11:00:16+00:00","dateModified":"2023-10-20T18:04:09+00:00","description":"Creating a WordPress plugin may seem like a huge undertaking, but it's probably easier than you think. This simple guide will help get you started!","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-build-your-very-own-wordpress-plugin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/case-studies\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/wpengine.com\/case-studies\/resources\/"},{"@type":"ListItem","position":3,"name":"How To Build Your Very Own WordPress Plugin"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/case-studies\/#website","url":"https:\/\/wpengine.com\/case-studies\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/f5301455463371a10d1fc290e9ad0085","name":"WP Engine","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","caption":"WP Engine"},"sameAs":["https:\/\/wpengine.com"]}]}},"acf":[],"grid_image_url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2016\/07\/WordPress-plugins_343x245.png","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Designer, Developer","topic":"<strong>Topics:<\/strong> Design, WordPress","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/139698","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource"}],"about":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/types\/resource"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/users\/1"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media\/140796"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=139698"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=139698"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=139698"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=139698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}