<input type="hidden" id="_wpnonce" name="_wpnonce" value="cdf6135429" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/3542" /><input type="hidden" id="_wpnonce" name="_wpnonce" value="cdf6135429" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/3542" />{"id":3542,"date":"2015-06-22T22:00:04","date_gmt":"2015-06-22T12:00:04","guid":{"rendered":"https:\/\/www.businesslegions.com\/blog\/?p=3542"},"modified":"2015-06-22T22:00:04","modified_gmt":"2015-06-22T12:00:04","slug":"wordpress-plugin-my-site-functions","status":"publish","type":"post","link":"https:\/\/www.businesslegions.com\/blog\/2015\/06\/22\/wordpress-plugin-my-site-functions\/","title":{"rendered":"WordPress Plugin: My Site Functions"},"content":{"rendered":"<!--CusAds0--><p>This is a simple WordPress Plugin for adding site functions rather than using theme functions. One of the biggest drawbacks with using theme functions in WordPress is that switching themes or updating themes causes the functions you created in the theme to no longer work &#8211; it is theme specific. There is a lot of documentation that suggests not to use theme functions, so based on some of the experiences I&#8217;ve encountered with using theme functions I decided to create a simple plugin. Here it is:<\/p>\n<div class='w3eden'><!-- WPDM Link Template: Default Template -->\n\n<div class=\"link-template-default card mb-2\">\n    <div class=\"card-body\">\n        <div class=\"media\">\n            <div class=\"mr-3 img-48\"><img decoding=\"async\" class=\"wpdm_icon\" alt=\"Icon\"   src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/download-manager\/assets\/file-type-icons\/download_drive.png?strip=all&w=960\" \/><\/div>\n            <div class=\"media-body\">\n                <h3 class=\"package-title\"><a href='https:\/\/www.businesslegions.com\/blog\/download\/wordpress-plugin-my-site-functions\/'>WordPress Plugin: My Site Functions<\/a><\/h3>\n                <div class=\"text-muted text-small\"><i class=\"fas fa-copy\"><\/i> 1 file(s) <i class=\"fas fa-hdd ml-3\"><\/i> 0.49 KB<\/div>\n            <\/div>\n            <div class=\"ml-3\">\n                <a class='wpdm-download-link download-on-click btn btn-primary ' rel='nofollow' href='#' data-downloadurl=\"https:\/\/www.businesslegions.com\/blog\/download\/wordpress-plugin-my-site-functions\/?wpdmdl=3545&refresh=69fb92cfecac91778094799\">Download<\/a>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n<\/div>\n<p>Simply download it then upload it to your WordPress Site Plugins.<\/p>\n<p>Once activated Click on edit<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit-Button.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone size-full wp-image-3548\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit-Button.png?strip=all\" alt=\"My Site Functions Edit Button\" width=\"724\" height=\"63\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit-Button.png?strip=all 724w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit-Button-300x26.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit-Button.png?strip=all&amp;w=144 144w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit-Button.png?strip=all&amp;w=434 434w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit-Button.png?strip=all&amp;w=579 579w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><\/a><\/p><!--CusAds0-->\n<p>&nbsp;<\/p>\n<p>Paste your functions there.\u00a0Here&#8217;s an example of how I&#8217;ve used the My Site Functions. This was a function to change the date format from d\/m\/Y (e.g 12\/04\/2015) to Y-m-d (2015-04-12).<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone wp-image-3547 \" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit.png?strip=all\" alt=\"My Site Functions Edit\" width=\"947\" height=\"425\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit.png?strip=all 1499w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit-300x135.png?strip=all 300w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit.png?strip=all&amp;w=599 599w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit.png?strip=all&amp;w=899 899w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit.png?strip=all&amp;w=1199 1199w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/06\/My-Site-Functions-Edit.png?strip=all&amp;w=450 450w\" sizes=\"(max-width: 947px) 100vw, 947px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div class=\"lt-box\" style=\"border:1px solid #1d6a9e\"><div class=\"lt-box-title\" style=\"background-color:#2485C6;border-top:1px solid #a7cee8;text-shadow:1px 1px 0 #0b283b\">DO YOU LIKE WHAT YOU'VE READ?<\/div><div class=\"lt-box-content\">Join our subscription list and receive our content right in your mailbox. If you like to receive some Great deals our Freebies then subscribe now!\r\n\r\n<p><div class=\"tnp tnp-subscription \">\n<form method=\"post\" action=\"https:\/\/www.businesslegions.com\/blog\/wp-admin\/admin-ajax.php?action=tnp&amp;na=s\">\n<input type=\"hidden\" name=\"nlang\" value=\"\">\n<div class=\"tnp-field tnp-field-firstname\"><label for=\"tnp-1\">Name<\/label>\n<input class=\"tnp-name\" type=\"text\" name=\"nn\" id=\"tnp-1\" value=\"\" placeholder=\"\"><\/div>\n<div class=\"tnp-field tnp-field-email\"><label for=\"tnp-2\">Email<\/label>\n<input class=\"tnp-email\" type=\"email\" name=\"ne\" id=\"tnp-2\" value=\"\" placeholder=\"\" required><\/div>\n<div class=\"tnp-field tnp-field-button\" style=\"text-align: left\"><input class=\"tnp-submit\" type=\"submit\" value=\"Subscribe\" style=\"\">\n<\/div>\n<\/form>\n<\/div>\n<\/p>\r\n\r\n<\/div><\/div><!--CusAds0-->\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>This is a simple WordPress Plugin for adding site functions rather than using theme functions. One of the biggest drawbacks with using theme functions in WordPress is that switching themes or updating themes causes the functions you created in the theme to no longer work &#8211; it is theme specific. There is a lot of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1043,382],"tags":[1017,1888,1766,880],"class_list":["post-3542","post","type-post","status-publish","format-standard","hentry","category-websites","category-wordpress","tag-format","tag-functions","tag-paste","tag-theme"],"_links":{"self":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/3542","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/comments?post=3542"}],"version-history":[{"count":3,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/3542\/revisions"}],"predecessor-version":[{"id":3551,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/3542\/revisions\/3551"}],"wp:attachment":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media?parent=3542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/categories?post=3542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/tags?post=3542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}