{"id":672,"date":"2010-05-11T02:41:29","date_gmt":"2010-05-11T00:41:29","guid":{"rendered":"http:\/\/raftaman.net\/?p=672"},"modified":"2021-05-15T11:46:40","modified_gmt":"2021-05-15T09:46:40","slug":"wordpress-mystat-plugin-breaks-rss-feed","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=672","title":{"rendered":"WordPress myStat plugin breaks rss feed"},"content":{"rendered":"<p>I recently installed <a href=\"http:\/\/sandbox.net.ua\/mystat\/\">myStat<\/a> to keep track of this blog&#8217;s rapidly increasing number of readers. Unfortunately, the plugin break the rss feed. The problem is the plugin&#8217;s <code>myStat_footer()<\/code> function, which does not check if the page is a feed before deciding to insert the myStat footer image into the page code.<\/p>\n<p>To fix <a href=\"http:\/\/wordpress.org\/extend\/plugins\/mystat\/\">myStat v2.6<\/a>, locate line 475 in <strong><code>mystat.php<\/code><\/strong> and change the <strong><code>myStat_footer()<\/code><\/strong> function<\/p>\n<pre class=\"brush: php; first-line: 472; title: ; notranslate\" title=\"\">\r\nfunction myStat_footer() {\r\n    global $cmn;\r\n    if($cmn-&gt;getParam(&quot;myStat_debug&quot;)==1){$cmn-&gt;setDebug('FOOTER LOAD');};\r\n    echo &quot;&lt;img style=(...);\r\n}\r\n<\/pre>\n<p>like this<\/p>\n<pre class=\"brush: php; first-line: 472; highlight: [475,477]; title: ; notranslate\" title=\"\">\r\nfunction myStat_footer() {\r\n    global $cmn;\r\n    if($cmn-&gt;getParam(&quot;myStat_debug&quot;)==1){$cmn-&gt;setDebug('FOOTER LOAD');};\r\n    if (!is_feed()) {\r\n        echo &quot;&lt;img style=(...);\r\n    }\r\n}\r\n<\/pre>\n<p>Resources:<br \/>\n<a href=\"http:\/\/wordpress.org\/support\/topic\/325426\">http:\/\/wordpress.org\/support\/topic\/325426<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently installed myStat to keep track of this blog&#8217;s rapidly increasing number of readers. Unfortunately, the plugin break the rss feed. The problem is the plugin&#8217;s myStat_footer() function, which does not check if the page is a feed before deciding to insert the myStat footer image into the page code. To fix myStat v2.6, locate line 475 in mystat.php&#8230; <a href=\"https:\/\/possiblelossofprecision.net\/?p=672\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,3],"class_list":["post-672","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-php","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=672"}],"version-history":[{"count":10,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/672\/revisions"}],"predecessor-version":[{"id":2687,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/672\/revisions\/2687"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}