{"id":831,"date":"2016-07-07T17:15:05","date_gmt":"2016-07-07T15:15:05","guid":{"rendered":"https:\/\/felix-arntz.me\/?p=831"},"modified":"2025-02-11T08:12:24","modified_gmt":"2025-02-11T16:12:24","slug":"making-plugin-multisite-compatible","status":"publish","type":"post","link":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/","title":{"rendered":"Making your plugin routines multisite-compatible"},"content":{"rendered":"<p>If you&#8217;ve been getting your way around with WordPress, you have probably heard of that thing called <a href=\"https:\/\/codex.wordpress.org\/Create_A_Network\">Multisite<\/a>. Multiple web sites in one WordPress installation, that is. You may also call it a network of sites. If you haven&#8217;t actually used it, that&#8217;s another issue &#8211; maybe you have not (yet) come across a project where Multisite would have been the right fit. (In any case, I would encourage you to try it out on your dev environment then.)<\/p>\n<p>This post is not about Multisite though. It&#8217;s about how you can make your regular plugin that you would like to write or might have written years ago compatible with Multisite. Because even if your plugin does not do anything\u00a0related to Multisite in any way, there are some things to take care of, in particular you need to take care of your plugin&#8217;s activation \/ deactivation \/ uninstallation routines (if you have something like it in your plugin). Otherwise you are locking out some users from using your plugin, and you certainly don&#8217;t want that, I&#8217;m sure. Now that you have read this, please don&#8217;t run away, it&#8217;s not something you need to spend days for &#8211; it might only take a few minutes, and if you don&#8217;t have any of these routines,\u00a0there actually <em>is<\/em> nothing else to do to make the plugin compatible (at least not for the scope of this tutorial). But now, let&#8217;s get started!<!--more--><\/p>\n<h2>Setup your installation\u00a0routine<\/h2>\n<p>First of all, note that &#8220;installation&#8221; here is synonymous with &#8220;activation&#8221;. As you might already know, when you want to install your plugin in WordPress, you use the activation routine for that.<\/p>\n<p>You probably run your plugin&#8217;s installation\/activation process inside a function which you have passed to <code>register_activation_hook()<\/code>. Let&#8217;s imagine your plugin needs a custom database table which needs to be setup when the plugin is activated for the first time. The code for it could look something like this:<\/p>\n<p><script src=\"https:\/\/gist.github.com\/e571f481f90a468e21f01037bf8ffe80.js\"><\/script><\/p>\n<p>This works perfectly fine on a regular site, but you are likely to run into problems on a Multisite. That is because on a Multisite it is possible to network activate a plugin, meaning it will be activated on all sites in the network at once.<\/p>\n<p>So how do you as a plugin developer know when a plugin is being activated for an entire network? Luckily, there is parameter <code>$network_wide<\/code>\u00a0which is automatically passed to your callback function (in the above case to <code>myplugin_install()<\/code>\u00a0as the first (and only) parameter. This variable is a boolean and will be true if the plugin is being activated for the entire Multisite. What you need to do in your plugin now is check whether the parameter is true, and if so, not only run the above installation routine once, but for all sites in your network instead. To prepare the\u00a0installation routine for that, let&#8217;s outsource the relevant parts that will need to be executed for every site into a separate function. In the below example, that function is called <code>myplugin_install_single_site()<\/code>.\u00a0(Note that I left out the <code>myplugin_register_table()<\/code>\u00a0function below.)<\/p>\n<p><script src=\"https:\/\/gist.github.com\/495f1d530e493deb28528f338e90c2fa.js\"><\/script><\/p>\n<p>As you can see, all that has changed is that almost everything from the <code>myplugin_install()<\/code>\u00a0 was moved to the new <code>myplugin_install_single_site()<\/code>\u00a0function. The only exception is the <code>myplugin_register_table()<\/code>\u00a0call because that is something that only needs to happen once. Be aware that from now on, the <code>myplugin_install_single_site()<\/code>\u00a0will no longer be included in the following code snippets as that will not change.<\/p>\n<p>Okay, we&#8217;ll get to the next code snippet straight away. In the following snippet, we make use of the <code>$network_wide<\/code>\u00a0parameter to check whether the plugin is being activated as usual or for the entire Multisite. If it should be installed for the entire network, we will query all sites in the network, iterate through them (using the function <code>switch_to_blog()<\/code>) and call our <code>myplugin_install_single_site()<\/code>\u00a0for each site. If it&#8217;s just a regular activation, we simply call <code>myplugin_install_single_site<\/code>\u00a0once.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/fcbb5dd33c2a3dc416a7d991cc8ac5bd.js\"><\/script><\/p>\n<p>In the SQL query above you might be confused about reading the terms &#8220;Blog&#8221; and &#8220;Site&#8221; there. These are the old naming conventions for Multisite: If I had written this tutorial years ago, I wouldn&#8217;t have told you about &#8220;Networks of Sites&#8221;, but about &#8220;Sites of Blogs&#8221;. Yes, the old naming conventions probably don&#8217;t make any sense to you as well. That&#8217;s why they were changed. However, due to WordPress being committed to backwards-compatibility, the old terminology is still widely used in Core (in particular the database tables use the old conventions). To sum this up, in the SQL query <code>$wpdb-&gt;blogs<\/code>\u00a0is the database table for sites, <code>blog_id<\/code>\u00a0 is the ID of a site, and <code>site_id<\/code>\u00a0is the ID of a network. Furthermore, the functions <code>switch_to_blog()<\/code>\u00a0and <code>restore_current_blog()<\/code>\u00a0are actually related to sites as well. I know, it&#8217;s really confusing, and I wish it would be different.<\/p>\n<p>Another thing you should definitely keep in mind is that you should not remove the <code>WHERE site_id = $wpdb-&gt;siteid<\/code>\u00a0bit. While a regular Multisite is only one network of sites, WordPress allows to have multiple networks (I won&#8217;t address this here, but be aware it can exist). Therefore this check is required &#8211; otherwise the plugin would be installed on all sites in all networks which is not what &#8220;Network Activate&#8221; means.<\/p>\n<p>That&#8217;s basically it for the installation. A minor, but possibly useful hint. In the upcoming WordPress version 4.6 it will be a lot easier to get the site IDs you need in the above code snippet. WordPress will introduce a new function <code>get_sites()<\/code>\u00a0(yay! This time it uses the current naming conventions) which you can use instead. To be backwards-compatible, this should only happen in a conditional statement though (unless you don&#8217;t care for users below the latest version). See the snippet below for an example that uses <code>get_sites()<\/code>\u00a0plus another new function called <code>get_current_network_id()<\/code>, but remains backwards-compatible.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/10f4e95ee264ccf4bb03d3307204ad34.js\"><\/script><\/p>\n<p>Now you&#8217;re really prepared, even for something that will only be available in an upcoming version of WordPress (at this point, WordPress 4.6 is a little more than a month away)!<\/p>\n<h2>Handling deactivation<\/h2>\n<p>The good thing about the above tutorial is that it applies to the deactivation routine of a plugin as well. It&#8217;s a lot less common to have deactivation routine in a plugin anyway since you shouldn&#8217;t remove anything from your plugin on deactivation. You might still have one for things like <a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/flush_rewrite_rules\">flushing rewrite rules<\/a>. In a case like that, it works just like the above. You create a function <code>myplugin_deactivate_single_site()<\/code>\u00a0and another function <code>myplugin_deactivate()<\/code>. The latter will be passed as a callback to <code>register_deactivation_hook()<\/code>\u00a0(as the second parameter, just as in the activation hook function). Your function <code>myplugin_deactivate<\/code>\u00a0will get passed a <code>$network_wide<\/code>\u00a0 parameter to determine whether the plugin is being deactivated network wide or not. Then you can act on it as in the above tutorial.<\/p>\n<h2>Handling uninstallation<\/h2>\n<p>Uninstallation works a little differently. It is not as critical as not removing your plugin&#8217;s data won&#8217;t break anything. Still, you should probably do it right as otherwise your plugin&#8217;s data will remain on the WordPress site as garbage (don&#8217;t get me wrong, your plugin is not garbage, just its data when it&#8217;s not being used anymore \ud83d\ude42 ).<\/p>\n<p>For uninstallation, you still need to have a function <code>myplugin_uninstall_single_site()<\/code>\u00a0and another function <code>myplugin_uninstall()<\/code>\u00a0and pass the latter to <code>register_uninstall_hook()<\/code>, similar like you have for installation\/activation and deactivation. The difference here is that there is no <code>$network_wide<\/code>\u00a0 parameter. Which makes sense because your plugin is being uninstalled when its files are completely deleted from the server. That means that in your code in <code>myplugin_uninstall()<\/code>, you need to check for this another way. A good way to currently do this is simply to check whether the current site is a multisite or not. If it is, you uninstall the plugin for all sites (this time for all sites in all networks, since the plugin is completely removed), otherwise you only uninstall it for the single site. The following snippet provides an example.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/d397a5bcfb48c54bd929e9329fd5923d.js\"><\/script><\/p>\n<p>Note that in your <code>myplugin_uninstall_single_site()<\/code>\u00a0function you should check whether the plugin is installed at all before trying to uninstall it, for example by using an\u00a0option like\u00a0<code>myplugin_installed<\/code>\u00a0(which was also used in the first installation code snippets).<\/p>\n<p>And that&#8217;s it &#8211; all your plugin&#8217;s important routines are now compatible with Multisite, and even <a href=\"https:\/\/wordpress.org\/plugins\/wp-multi-network\/\">Multinetwork<\/a> (that&#8217;s the thing when there are multiple networks in one WordPress setup). If you&#8217;re a plugin developer, I strongly encourage you to follow these (or similar) steps if you haven&#8217;t yet ensured your plugin&#8217;s installation\/deactivation\/uninstallation routines are compatible with Multisite. Users will be grateful for it, and your plugin will be a good example (feel free to browse through GitHub to see how many plugins are <code>_doing_it_wrong()<\/code>). And if you see other plugins that use incompatible routines, you might wanna submit a pull-request to them, or point them to this post. \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve been getting your way around with WordPress, you have probably heard of that thing called Multisite. Multiple web sites in one WordPress installation, that is. You may also call it a network of sites. If you haven&#8217;t actually used it, that&#8217;s another issue &#8211; maybe you have not (yet) come across a project [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":836,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[71,97],"tags":[],"class_list":["post-831","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Making your plugin multisite-compatible<\/title>\n<meta name=\"description\" content=\"Even when your plugin is not related to Multisite at all, as a plugin author you still need to take care of a few things to make it multisite-compatible.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Making your plugin multisite-compatible\" \/>\n<meta property=\"og:description\" content=\"Even when your plugin is not related to Multisite at all, as a plugin author you still need to take care of a few things to make it multisite-compatible.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/\" \/>\n<meta property=\"og:site_name\" content=\"felix-arntz.me\" \/>\n<meta property=\"article:published_time\" content=\"2016-07-07T15:15:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-11T16:12:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/felix-arntz.me\/wp-content\/uploads\/2016\/07\/making-plugin-routines-multisite-compatible.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Felix\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@felixarntz\" \/>\n<meta name=\"twitter:site\" content=\"@felixarntz\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Felix\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/\"},\"author\":{\"name\":\"Felix\",\"@id\":\"https:\/\/felix-arntz.me\/#\/schema\/person\/c7c3c658d2e59bbddf3e8684a6846e55\"},\"headline\":\"Making your plugin routines multisite-compatible\",\"datePublished\":\"2016-07-07T15:15:05+00:00\",\"dateModified\":\"2025-02-11T16:12:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/\"},\"wordCount\":1529,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/felix-arntz.me\/#\/schema\/person\/c7c3c658d2e59bbddf3e8684a6846e55\"},\"image\":{\"@id\":\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/felix-arntz.me\/wp-content\/uploads\/2016\/07\/making-plugin-routines-multisite-compatible.jpg\",\"articleSection\":[\"Tutorials\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/\",\"url\":\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/\",\"name\":\"Making your plugin multisite-compatible\",\"isPartOf\":{\"@id\":\"https:\/\/felix-arntz.me\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/felix-arntz.me\/wp-content\/uploads\/2016\/07\/making-plugin-routines-multisite-compatible.jpg\",\"datePublished\":\"2016-07-07T15:15:05+00:00\",\"dateModified\":\"2025-02-11T16:12:24+00:00\",\"description\":\"Even when your plugin is not related to Multisite at all, as a plugin author you still need to take care of a few things to make it multisite-compatible.\",\"breadcrumb\":{\"@id\":\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#primaryimage\",\"url\":\"https:\/\/felix-arntz.me\/wp-content\/uploads\/2016\/07\/making-plugin-routines-multisite-compatible.jpg\",\"contentUrl\":\"https:\/\/felix-arntz.me\/wp-content\/uploads\/2016\/07\/making-plugin-routines-multisite-compatible.jpg\",\"width\":1920,\"height\":1080,\"caption\":\"Making Your Plugin Routines Multisite Compatible\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/felix-arntz.me\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"https:\/\/felix-arntz.me\/blog\/category\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Making your plugin routines multisite-compatible\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/felix-arntz.me\/#website\",\"url\":\"https:\/\/felix-arntz.me\/\",\"name\":\"felix-arntz.me\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/felix-arntz.me\/#\/schema\/person\/c7c3c658d2e59bbddf3e8684a6846e55\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/felix-arntz.me\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/felix-arntz.me\/#\/schema\/person\/c7c3c658d2e59bbddf3e8684a6846e55\",\"name\":\"Felix\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/felix-arntz.me\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/felix-arntz.me\/wp-content\/uploads\/2018\/09\/felix-arntz-site-icon.png\",\"contentUrl\":\"https:\/\/felix-arntz.me\/wp-content\/uploads\/2018\/09\/felix-arntz-site-icon.png\",\"width\":512,\"height\":512,\"caption\":\"Felix\"},\"logo\":{\"@id\":\"https:\/\/felix-arntz.me\/#\/schema\/person\/image\/\"},\"description\":\"Developer Programs Engineer at Google. WordPress Core Committer. Previously Yoast. Runner, musician, movie geek. Aprendiendo espa\u00f1ol. Fueled by Mountain Dew.\",\"sameAs\":[\"https:\/\/x.com\/felixarntz\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Making your plugin multisite-compatible","description":"Even when your plugin is not related to Multisite at all, as a plugin author you still need to take care of a few things to make it multisite-compatible.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/","og_locale":"en_US","og_type":"article","og_title":"Making your plugin multisite-compatible","og_description":"Even when your plugin is not related to Multisite at all, as a plugin author you still need to take care of a few things to make it multisite-compatible.","og_url":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/","og_site_name":"felix-arntz.me","article_published_time":"2016-07-07T15:15:05+00:00","article_modified_time":"2025-02-11T16:12:24+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/felix-arntz.me\/wp-content\/uploads\/2016\/07\/making-plugin-routines-multisite-compatible.jpg","type":"image\/jpeg"}],"author":"Felix","twitter_card":"summary_large_image","twitter_creator":"@felixarntz","twitter_site":"@felixarntz","twitter_misc":{"Written by":"Felix","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#article","isPartOf":{"@id":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/"},"author":{"name":"Felix","@id":"https:\/\/felix-arntz.me\/#\/schema\/person\/c7c3c658d2e59bbddf3e8684a6846e55"},"headline":"Making your plugin routines multisite-compatible","datePublished":"2016-07-07T15:15:05+00:00","dateModified":"2025-02-11T16:12:24+00:00","mainEntityOfPage":{"@id":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/"},"wordCount":1529,"commentCount":3,"publisher":{"@id":"https:\/\/felix-arntz.me\/#\/schema\/person\/c7c3c658d2e59bbddf3e8684a6846e55"},"image":{"@id":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#primaryimage"},"thumbnailUrl":"https:\/\/felix-arntz.me\/wp-content\/uploads\/2016\/07\/making-plugin-routines-multisite-compatible.jpg","articleSection":["Tutorials","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/","url":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/","name":"Making your plugin multisite-compatible","isPartOf":{"@id":"https:\/\/felix-arntz.me\/#website"},"primaryImageOfPage":{"@id":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#primaryimage"},"image":{"@id":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#primaryimage"},"thumbnailUrl":"https:\/\/felix-arntz.me\/wp-content\/uploads\/2016\/07\/making-plugin-routines-multisite-compatible.jpg","datePublished":"2016-07-07T15:15:05+00:00","dateModified":"2025-02-11T16:12:24+00:00","description":"Even when your plugin is not related to Multisite at all, as a plugin author you still need to take care of a few things to make it multisite-compatible.","breadcrumb":{"@id":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#primaryimage","url":"https:\/\/felix-arntz.me\/wp-content\/uploads\/2016\/07\/making-plugin-routines-multisite-compatible.jpg","contentUrl":"https:\/\/felix-arntz.me\/wp-content\/uploads\/2016\/07\/making-plugin-routines-multisite-compatible.jpg","width":1920,"height":1080,"caption":"Making Your Plugin Routines Multisite Compatible"},{"@type":"BreadcrumbList","@id":"https:\/\/felix-arntz.me\/blog\/making-plugin-multisite-compatible\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/felix-arntz.me\/"},{"@type":"ListItem","position":2,"name":"Tutorials","item":"https:\/\/felix-arntz.me\/blog\/category\/tutorials\/"},{"@type":"ListItem","position":3,"name":"Making your plugin routines multisite-compatible"}]},{"@type":"WebSite","@id":"https:\/\/felix-arntz.me\/#website","url":"https:\/\/felix-arntz.me\/","name":"felix-arntz.me","description":"","publisher":{"@id":"https:\/\/felix-arntz.me\/#\/schema\/person\/c7c3c658d2e59bbddf3e8684a6846e55"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/felix-arntz.me\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/felix-arntz.me\/#\/schema\/person\/c7c3c658d2e59bbddf3e8684a6846e55","name":"Felix","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/felix-arntz.me\/#\/schema\/person\/image\/","url":"https:\/\/felix-arntz.me\/wp-content\/uploads\/2018\/09\/felix-arntz-site-icon.png","contentUrl":"https:\/\/felix-arntz.me\/wp-content\/uploads\/2018\/09\/felix-arntz-site-icon.png","width":512,"height":512,"caption":"Felix"},"logo":{"@id":"https:\/\/felix-arntz.me\/#\/schema\/person\/image\/"},"description":"Developer Programs Engineer at Google. WordPress Core Committer. Previously Yoast. Runner, musician, movie geek. Aprendiendo espa\u00f1ol. Fueled by Mountain Dew.","sameAs":["https:\/\/x.com\/felixarntz"]}]}},"jetpack_featured_media_url":"https:\/\/felix-arntz.me\/wp-content\/uploads\/2016\/07\/making-plugin-routines-multisite-compatible.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/felix-arntz.me\/api\/wp\/v2\/posts\/831","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/felix-arntz.me\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/felix-arntz.me\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/felix-arntz.me\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/felix-arntz.me\/api\/wp\/v2\/comments?post=831"}],"version-history":[{"count":5,"href":"https:\/\/felix-arntz.me\/api\/wp\/v2\/posts\/831\/revisions"}],"predecessor-version":[{"id":838,"href":"https:\/\/felix-arntz.me\/api\/wp\/v2\/posts\/831\/revisions\/838"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/felix-arntz.me\/api\/wp\/v2\/media\/836"}],"wp:attachment":[{"href":"https:\/\/felix-arntz.me\/api\/wp\/v2\/media?parent=831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/felix-arntz.me\/api\/wp\/v2\/categories?post=831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/felix-arntz.me\/api\/wp\/v2\/tags?post=831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}