
{"id":14558,"date":"2013-11-29T15:27:46","date_gmt":"2013-11-29T15:27:46","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=14558"},"modified":"2013-11-29T15:27:46","modified_gmt":"2013-11-29T15:27:46","slug":"understanding-a-wordpress-plugin","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2013\/11\/29\/understanding-a-wordpress-plugin\/","title":{"rendered":"Understanding a WordPress Plugin"},"content":{"rendered":"<pre style=\"width:100%;\">\n&lt;?php\n\/*\nPlugin Name: Yet Another Search Meddle\nPlugin URI:\nVersion: 0.1\nAuthor: Jeffrin Jose T and Public Domain\nAuthor URI: http:\/\/linkedin.com\/in\/jeffrinl\nDescription: modifying the way search results are displayed\n\n*\/\n\nfunction resultsperpage($limits) {\n\/* resultsperpage - it is a custom created php function. *\/\n\nif (is_search()) {\n\/* is_search() - it is an inbuilt php function in wordpress *\/\n\/* http:\/\/codex.wordpress.org\/Function_Reference\/is_search *\/\n\nreturn 'LIMIT 0, 25';\n}\nreturn $limits;\n}\n\nadd_filter('post_limits', 'resultsperpage');\n\/* post_limits - a wordpress hook ( a filter hook ) *\/\n\/* http:\/\/codex.wordpress.org\/Plugin_API\/Filter_Reference\/post_limits *\/\n\n\/* add_filter - Hook a function to a specific filter action. *\/\n\/* http:\/\/codex.wordpress.org\/Function_Reference\/add_filter *\/\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&lt;?php \/* Plugin Name: Yet Another Search Meddle Plugin URI: Version: 0.1 Author: Jeffrin Jose T and Public Domain Author URI: http:\/\/linkedin.com\/in\/jeffrinl Description: modifying the way search results are displayed *\/ function resultsperpage($limits) { \/* resultsperpage &#8211; it is a custom created php function. *\/ if (is_search()) { \/* is_search() &#8211; it is an inbuilt &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2013\/11\/29\/understanding-a-wordpress-plugin\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Understanding a WordPress Plugin&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[168,91],"tags":[906,1697],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/14558"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=14558"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/14558\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=14558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=14558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=14558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}