{"id":34,"date":"2012-06-29T18:12:33","date_gmt":"2012-06-29T16:12:33","guid":{"rendered":"https:\/\/wprealm.com\/?p=34"},"modified":"2012-06-29T18:12:33","modified_gmt":"2012-06-29T16:12:33","slug":"writing-plugins-is-it-always-worth-it","status":"publish","type":"post","link":"http:\/\/wprealm.local\/writing-plugins-is-it-always-worth-it\/","title":{"rendered":"Writing Plugins: Is It Always Worth It?"},"content":{"rendered":"
Writing code can be boring sometimes, whether you need some new features, but don’t like them or the process itself has somehow become tedious. You cannot focus and you are at a dead-end. The only thing you want is to get this thing working and finish it already. Sometimes what you need to get done\u00a0is so\u00a0simple\u00a0<\/em>that two lines in your theme’s <\/p>\n We all have used any combination of these at any given moment:<\/p>\n We develop large plugins or small pieces of code. For the small pieces, we just need to add them to the\u00a0 Consider child themes, for instance. As you know, your\u00a0functions.php<\/code> file would probably do the trick, and the code for the header of a plugin alone is 10 lines. Why bother coding a plugin at all?<\/p>\n
The usual excuses<\/h3>\n
“It’s just the two lines”<\/h4>\n
functions.php<\/code> file. Pretty easy, why complicate?<\/p>\n
functions.php<\/code> file belongs to a specific theme, not your whole site. \u00a0If someone updates it, your changes will be lost. If you are the only admin or developer and you have a good memory, you can probably risk it, \u00a0but isn’t it just easier to not have to remember<\/strong> and have a plugin that you can activate and deactivate without having to touch anything else?<\/p>\n