{"id":2880,"date":"2021-11-16T11:44:03","date_gmt":"2021-11-16T11:44:03","guid":{"rendered":"https:\/\/tschaki.com\/?p=2880"},"modified":"2021-11-20T14:13:24","modified_gmt":"2021-11-20T14:13:24","slug":"create-new-wordpress-plugin","status":"publish","type":"post","link":"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/","title":{"rendered":"Create new wordpress plugin"},"content":{"rendered":"<p>To create a new WordPress plugin is easy. For this you need an empty file in a folder. This file serves as the main file of the new plugin and only needs a comment header so that WordPress recognizes the plugin.<\/p>\n\n\n\n<h2 id=\"h-file-header-for-create-new-wordpress-plugin\">File header for create new WordPress plugin<\/h2>\n\n\n\n<p>As with new <a href=\"https:\/\/tschaki.com\/en\/create-a-new-wordpress-theme\/\">WordPress themes<\/a>, the title, description, author, etc. are specified as comments in the main plugin file (for example, <code>myplugin.php<\/code>):<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;language&quot;:&quot;PHP&quot;,&quot;modeName&quot;:&quot;php&quot;}\">&lt;?php\n\/**\n * Plugin Name: My First Plugin\n * Plugin URI: http:\/\/www.mywebsite.com\/my-first-plugin\n * Description: The very first plugin that I have ever created.\n * Requires at least: 5.2\n * Requires PHP: 7.2\n * Version: 1.0\n * Author: Your Name\n * Author URI: http:\/\/www.mywebsite.com\n * Textdomain: your-plugin\n *\/<\/pre><\/div>\n\n\n\n<ul><li><strong>Name<\/strong> (*): Name from the new plugin.<\/li><li><strong>Plugin URI<\/strong>: The URL of a public web page where users can find more information about the plugin.<\/li><li><strong>Description<\/strong>: A brief description of the plugin.<\/li><li><strong>Requires at least:<\/strong> The lowest WordPress version that the plugin will work on.<\/li><li><strong>Requires PHP:<\/strong> The minimum required PHP version.<\/li><li><strong>Version<\/strong>: The version of the plugin, written in the format X.X or X.X.X.<\/li><li><strong>Author<\/strong>: The name of the person or organization that developed the plugin. <\/li><li><strong>Author URI<\/strong>: The URL of the authoring person or organization.<\/li><li><strong>Text Domain<\/strong>: Text domain for translation.<\/li><\/ul>\n\n\n\n<p>That is why the version of plugins is also used to check for updates.<\/p>\n\n\n\n<p>To see the new, empty WordPress plugin, it must be uploaded to <code>\/wp-content\/plugins\/PLUGINNAME. <\/code>In the WordPress backend. Under plugins the new plugin appears. In the WordPress backend under plugins the new plugin appears.  <\/p>\n\n\n\n<p>Source: <a href=\"https:\/\/developer.wordpress.org\/plugins\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developer.wordpress.org\/plugins\/<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>To create a new WordPress plugin is easy. For this you need an empty file in a folder. This file serves as the main file of the new plugin and only needs a comment header so that WordPress recognizes the plugin. File header for create new WordPress plugin As with new WordPress themes, the title, [&hellip;]<\/p>","protected":false},"author":1,"featured_media":2398,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[124,125],"tags":[194,130,102,131],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v16.6 (Yoast SEO v17.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create wordpress plugin &bull; tschaki<\/title>\n<meta name=\"description\" content=\"Creating a new Wordpress plugin is easy. Thus, various new actions can be extended and added to Wordpress.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create new wordpress plugin\" \/>\n<meta property=\"og:description\" content=\"Creating a new Wordpress plugin is easy. Thus, various new actions can be extended and added to Wordpress.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/\" \/>\n<meta property=\"og:site_name\" content=\"tschaki\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-16T11:44:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-11-20T14:13:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1580\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Trent Bojett\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/tschaki.com\/#organization\",\"name\":\"Tschaki.com\",\"url\":\"https:\/\/tschaki.com\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/tschaki.com\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/12\/tschaki-logo-1.png\",\"contentUrl\":\"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/12\/tschaki-logo-1.png\",\"width\":1022,\"height\":273,\"caption\":\"Tschaki.com\"},\"image\":{\"@id\":\"https:\/\/tschaki.com\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tschaki.com\/#website\",\"url\":\"https:\/\/tschaki.com\/\",\"name\":\"tschaki\",\"description\":\"Codesupport and alternatives\",\"publisher\":{\"@id\":\"https:\/\/tschaki.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tschaki.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg\",\"contentUrl\":\"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg\",\"width\":1580,\"height\":500,\"caption\":\"create wordpress plugin\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#webpage\",\"url\":\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/\",\"name\":\"Create wordpress plugin &bull; tschaki\",\"isPartOf\":{\"@id\":\"https:\/\/tschaki.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#primaryimage\"},\"datePublished\":\"2021-11-16T11:44:03+00:00\",\"dateModified\":\"2021-11-20T14:13:24+00:00\",\"description\":\"Creating a new Wordpress plugin is easy. Thus, various new actions can be extended and added to Wordpress.\",\"breadcrumb\":{\"@id\":\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/tschaki.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create new wordpress plugin\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#webpage\"},\"author\":{\"@id\":\"https:\/\/tschaki.com\/#\/schema\/person\/b4bf4286ba196fcd756146568acb3219\"},\"headline\":\"Create new wordpress plugin\",\"datePublished\":\"2021-11-16T11:44:03+00:00\",\"dateModified\":\"2021-11-20T14:13:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#webpage\"},\"wordCount\":220,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/tschaki.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg\",\"keywords\":[\"create\",\"php\",\"plugin\",\"wordpress\"],\"articleSection\":[\"Technology\",\"Wordpress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/tschaki.com\/#\/schema\/person\/b4bf4286ba196fcd756146568acb3219\",\"name\":\"Trent Bojett\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/tschaki.com\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7344f00aff4a7391a8f499ff58fc7275?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7344f00aff4a7391a8f499ff58fc7275?s=96&d=mm&r=g\",\"caption\":\"Trent Bojett\"},\"description\":\"My name is Trent Bojett, I am 28 years old and I live in Switzerland. Because of my enthusiasm for writing and the logical world (= software development) I started this blog in early 2020.\",\"sameAs\":[\"https:\/\/tschaki.com\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Create wordpress plugin &bull; tschaki","description":"Creating a new Wordpress plugin is easy. Thus, various new actions can be extended and added to Wordpress.","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:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/","og_locale":"en_US","og_type":"article","og_title":"Create new wordpress plugin","og_description":"Creating a new Wordpress plugin is easy. Thus, various new actions can be extended and added to Wordpress.","og_url":"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/","og_site_name":"tschaki","article_published_time":"2021-11-16T11:44:03+00:00","article_modified_time":"2021-11-20T14:13:24+00:00","og_image":[{"width":1580,"height":500,"url":"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"Trent Bojett","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/tschaki.com\/#organization","name":"Tschaki.com","url":"https:\/\/tschaki.com\/","sameAs":[],"logo":{"@type":"ImageObject","@id":"https:\/\/tschaki.com\/#logo","inLanguage":"en-US","url":"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/12\/tschaki-logo-1.png","contentUrl":"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/12\/tschaki-logo-1.png","width":1022,"height":273,"caption":"Tschaki.com"},"image":{"@id":"https:\/\/tschaki.com\/#logo"}},{"@type":"WebSite","@id":"https:\/\/tschaki.com\/#website","url":"https:\/\/tschaki.com\/","name":"tschaki","description":"Codesupport and alternatives","publisher":{"@id":"https:\/\/tschaki.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tschaki.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#primaryimage","inLanguage":"en-US","url":"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg","contentUrl":"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg","width":1580,"height":500,"caption":"create wordpress plugin"},{"@type":"WebPage","@id":"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#webpage","url":"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/","name":"Create wordpress plugin &bull; tschaki","isPartOf":{"@id":"https:\/\/tschaki.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#primaryimage"},"datePublished":"2021-11-16T11:44:03+00:00","dateModified":"2021-11-20T14:13:24+00:00","description":"Creating a new Wordpress plugin is easy. Thus, various new actions can be extended and added to Wordpress.","breadcrumb":{"@id":"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tschaki.com\/en\/"},{"@type":"ListItem","position":2,"name":"Create new wordpress plugin"}]},{"@type":"Article","@id":"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#article","isPartOf":{"@id":"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#webpage"},"author":{"@id":"https:\/\/tschaki.com\/#\/schema\/person\/b4bf4286ba196fcd756146568acb3219"},"headline":"Create new wordpress plugin","datePublished":"2021-11-16T11:44:03+00:00","dateModified":"2021-11-20T14:13:24+00:00","mainEntityOfPage":{"@id":"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#webpage"},"wordCount":220,"commentCount":0,"publisher":{"@id":"https:\/\/tschaki.com\/#organization"},"image":{"@id":"https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#primaryimage"},"thumbnailUrl":"https:\/\/tschaki.com\/wp-content\/uploads\/2020\/11\/WP-WooCommerce.jpg","keywords":["create","php","plugin","wordpress"],"articleSection":["Technology","Wordpress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/tschaki.com\/en\/create-new-wordpress-plugin\/#respond"]}]},{"@type":"Person","@id":"https:\/\/tschaki.com\/#\/schema\/person\/b4bf4286ba196fcd756146568acb3219","name":"Trent Bojett","image":{"@type":"ImageObject","@id":"https:\/\/tschaki.com\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/7344f00aff4a7391a8f499ff58fc7275?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7344f00aff4a7391a8f499ff58fc7275?s=96&d=mm&r=g","caption":"Trent Bojett"},"description":"My name is Trent Bojett, I am 28 years old and I live in Switzerland. Because of my enthusiasm for writing and the logical world (= software development) I started this blog in early 2020.","sameAs":["https:\/\/tschaki.com"]}]}},"_links":{"self":[{"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/posts\/2880"}],"collection":[{"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/comments?post=2880"}],"version-history":[{"count":5,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/posts\/2880\/revisions"}],"predecessor-version":[{"id":3038,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/posts\/2880\/revisions\/3038"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/media\/2398"}],"wp:attachment":[{"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/media?parent=2880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/categories?post=2880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tschaki.com\/en\/wp-json\/wp\/v2\/tags?post=2880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}