<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>plugins &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/plugins/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Wed, 16 Oct 2024 07:42:45 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>plugins &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[WordPress GeSHi Highlighting for Markdown]]></title>
		<link>https://shkspr.mobi/blog/2024/05/wordpress-geshi-highlighting-for-markdown/</link>
					<comments>https://shkspr.mobi/blog/2024/05/wordpress-geshi-highlighting-for-markdown/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 01 May 2024 11:34:46 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[markdown]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=50390</guid>

					<description><![CDATA[I&#039;ve launched a WordPress Plugin for an extremely niche use-case.  WP GeSHi Highlight Redux works with WordPress&#039;s Classic Editor to convert Markdown to syntax highlighted code.  That allows me to write:  ```php $a = &#34;Hello&#34;; $b = 5 * 2; echo $a . str($b); ```   And have it displayed as:  $a = &#34;Hello&#34;; $b = 5 * 2; echo $a . str($b);   I&#039;ve previously written about the WP GeSHi Highlight plugin.…]]></description>
										<content:encoded><![CDATA[<p>I've launched a WordPress Plugin for an <em>extremely</em> niche use-case.</p>

<p><a href="https://github.com/edent/WP-GeSHi-Highlight-Redux/">WP GeSHi Highlight Redux</a> works with WordPress's Classic Editor to convert Markdown to syntax highlighted code.</p>

<p>That allows me to write:</p>

<pre>```php
$a = "Hello";
$b = 5 * 2;
echo $a . str($b);
```
</pre>

<p>And have it displayed as:</p>

<pre><code class="language-php">$a = "Hello";
$b = 5 * 2;
echo $a . str($b);
</code></pre>

<p>I've previously written about the <a href="https://shkspr.mobi/blog/2024/04/server-side-rendering-of-embedded-markdown-code-snippets/">WP GeSHi Highlight plugin</a>. My plugin is a fork of that. It has the following changes:</p>

<ul>
<li>RSS &amp; Atom feeds - disable code highlighting</li>
<li>Remove extra style wrappers</li>
<li>Markdown support</li>
<li>Remove line-numbers</li>
<li>Remove escape option (escape now permanent)</li>
<li>Remove TinyMCE changes</li>
<li>Remove custom CSS options</li>
<li>Improve default CSS</li>
<li>Improve HTML detection</li>
</ul>

<p>These changes work for me, with my weird blogging set-up. If they work for you, feel free to use it. If they don't work for you, please fork and write your own code.</p>

<p>You can <a href="https://github.com/edent/WP-GeSHi-Highlight-Redux/">download WP GeSHi Highlight Redux</a> or <a href="https://gehrcke.de/wp-geshi-highlight/">get the original plugin</a>.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=50390&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2024/05/wordpress-geshi-highlighting-for-markdown/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[HOWTO: Remove the Blubrry PowerPress "New!" Banner]]></title>
		<link>https://shkspr.mobi/blog/2022/10/howto-remove-the-blubrry-powerpress-new-banner/</link>
					<comments>https://shkspr.mobi/blog/2022/10/howto-remove-the-blubrry-powerpress-new-banner/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 16 Oct 2022 11:34:19 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=43730</guid>

					<description><![CDATA[The best thing about WordPress is the plugin infrastructure. A million little gadgets to make your blog better.  Sadly, there are all sorts of ways plugin authors can abuse their privileges. Dodgy code and user-hostile features sometimes make plugins more trouble than they&#039;re worth.  Recently, the normally excellent Blubrry PowerPress plugin pissed me off. It&#039;s a useful plugin for publishing…]]></description>
										<content:encoded><![CDATA[<p>The best thing about WordPress is the plugin infrastructure. A million little gadgets to make your blog better.</p>

<p>Sadly, there are all sorts of ways plugin authors can abuse their privileges. Dodgy code and user-hostile features sometimes make plugins more trouble than they're worth.</p>

<p>Recently, the normally excellent <a href="https://wordpress.org/plugins/powerpress/">Blubrry PowerPress plugin</a> pissed me off. It's a useful plugin for publishing podcasts on WordPress.  They had a new feature - some kind of embedded audio player - and introduced it with a "New!" banner on the main menu.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2022/10/Screenshot-2022-10-16-at-10-59-38-Edit-Plugins-‹-Terence-Edens-Blog-—-WordPress.png" alt="WordPress menu. There is a distracting badge with a white background and red text." width="210" height="247" class="aligncenter size-full wp-image-43731">

<p>That's... Fine I guess. You have to let people know about new features. And it wasn't too obnoxious.  I took a look at their new stuff and decided it wasn't for me.  I expected the banner to disappear.</p>

<p>It did not.</p>

<p>Look, this is a trivial thing but annoying to me. The red text on a white background is designed to be noticeable. And I kept noticing it while I was writing. Because it is a bit distracting. I <a href="https://wordpress.org/support/topic/remove-the-new-banner/">asked in their support forums about removing it</a> - but they said it would stay until a future update.</p>

<p>Well, the best thing about WordPress is that the plugins are hackable! There's a build in code editor which lets you change the functions of any plugin.</p>

<p>So I found where the "New!" banner was coded - <code>powerpressadmin.php</code> line 5282 and changed:</p>

<pre><code class="language-php">return '&lt;sup style="'.$style.'"&gt;'. __('New!', 'powerpress') .'&lt;/sup&gt;';
</code></pre>

<p>to</p>

<pre><code class="language-php">return '';
</code></pre>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2022/10/Screenshot-2022-10-16-at-11-00-06-Edit-Plugins-‹-Terence-Edens-Blog-—-WordPress.png" alt="Screenshot of a code listing." width="1163" height="295" class="aligncenter size-full wp-image-43732">

<p>Hit save, refreshed the page, and the annoying thing was banished.</p>

<p>Maybe it'll come back in a future update. And maybe I'll fix it again. Or maybe I'll disable auto-updates. Or maybe I'll remove the plugin. Or maybe Blubrry will realise that annoying users isn't a great strategy.</p>

<p>Either way, if that's been bugging you, I hope you found this blog post to be useful.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=43730&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2022/10/howto-remove-the-blubrry-powerpress-new-banner/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Why I Love Open Source]]></title>
		<link>https://shkspr.mobi/blog/2009/12/why-i-love-open-source/</link>
					<comments>https://shkspr.mobi/blog/2009/12/why-i-love-open-source/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 06 Dec 2009 12:31:57 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wpmp]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=1336</guid>

					<description><![CDATA[There are many reasons to love Open Source Software.  It&#039;s free (as in you pay nothing), it&#039;s free (as in speech) and - perhaps my favourite reasons - it&#039;s free (as in liberating).  By liberating, I mean that one isn&#039;t tied down to the product roadmap and release schedule of the developers.  If I find a bug, not only can I report it, I can fix it myself.  If I can&#039;t fix it myself, I can often fi…]]></description>
										<content:encoded><![CDATA[<p>There are many reasons to love <a href="http://www.opensource.org/">Open Source Software</a>.&nbsp; It's free (as in you pay nothing), it's free (as in speech) and - perhaps my favourite reasons - it's free (as in liberating).</p>

<p>By liberating, I mean that one isn't tied down to the product roadmap and release schedule of the developers.&nbsp; If I find a bug, not only can I report it, I can fix it myself.&nbsp; If I can't fix it myself, I can often find someone to fix it for me.</p>

<p>Imagine writing to MicroSoft and saying "Please can you make this change to Office - just for me?"&nbsp; If you ever got a response, it would be "No".&nbsp; To be fair, you may also get the same reply from <a href="http://www.openoffice.org/">OpenOffice</a> - the free replacement for MicroSoft Office - but because OpenOffice is Open Source, you can scratch the itch yourself.</p>

<p>If your itch-scratching is useful, others will benefit from it.&nbsp; If you are the only one benefiting from it, so what? You're happier and more productive.</p>

<p>I use <a href="http://wordpress.org/extend/plugins/wordpress-mobile-pack/">WordPress Mobile Pack</a>.&nbsp; It creates a mobile version of this blog.&nbsp; It's a very easy to use and very powerful plugin.</p>

<p>Unfortunately, like all software, it has bugs.</p>

<p></p><div id="attachment_1337" style="width: 490px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1337" class="size-full wp-image-1337" title="WPMP Bug" src="https://shkspr.mobi/blog/wp-content/uploads/2009/12/Capture11_43_16.jpg" alt="WPMP Bug" width="480" height="320"><p id="caption-attachment-1337" class="wp-caption-text">WPMP Bug</p></div><p></p>

<p>What you're seeing in the screenshot is WPMP picking up a shortcode and, rather than ignoring it, rendering it as human readable text within the teaser.&nbsp; It's ugly and confusing.</p>

<p>So, I <a href="https://www.assembla.com/spaces/wordpress-mobile-pack/tickets/60-Teaser-shows-shortcode-tags">raised a bug report</a> and though "I bet I can fix this!".&nbsp; Now, I'm not the world's most talented programmer - but with my knowledge of PHP and WordPress plugin architecture, I was able to locate the problem, fix it, test it and deploy it within half an hour.</p>

<pre>if(strpos($content, '[')!==false)
{
   $content = "Read more";
}</pre>

<p>That's it.&nbsp; Judicouly applied in the correct place made my problems disappear.</p>

<p>So, that's why I love Open Source.&nbsp; It places my destiny in my hands.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=1336&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2009/12/why-i-love-open-source/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
