<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Wordpress on</title><link>http://salopst.yearl.us/tags/wordpress/</link><description>Recent content in Wordpress on</description><generator>Hugo</generator><language>en</language><copyright>&lt;a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener"&gt;CC BY-NC 4.0&lt;/a&gt;</copyright><lastBuildDate>Tue, 21 Sep 2021 02:22:00 +0100</lastBuildDate><atom:link href="http://salopst.yearl.us/tags/wordpress/index.xml" rel="self" type="application/rss+xml"/><item><title>Scratch notes on Hugo (and this implementation)</title><link>http://salopst.yearl.us/scratch-notes-on-hugo/</link><pubDate>Mon, 18 May 2020 14:33:57 +0100</pubDate><guid>http://salopst.yearl.us/scratch-notes-on-hugo/</guid><description>&lt;img src="http://salopst.yearl.us/img/uploads/leaping-baby-brown-trout.jpg" alt="Brown trout are the best trout" class="center" style="border-radius: 50px;" /&gt;&#10;&#10;&#10;&lt;h3 id="-this-image-above-is-not-in-the-general-template-for-a-post-file-it-is-added-with"&gt;^^^ This image above is not in the general template for a post file. It is added with:&lt;/h3&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{{&amp;lt; image src=&amp;#34;/img/uploads/leaping-baby-brown-trout.jpg&amp;#34; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; alt=&amp;#34;Hello Friendo&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; position=&amp;#34;center&amp;#34; &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; style=&amp;#34;border-radius: 50px;&amp;#34; &amp;gt;}}&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;Escaping&lt;/strong&gt; the shortcode such that it would not be executed was non-obvious. It is done with &lt;code&gt;/*&lt;/code&gt; and &lt;code&gt;*/&lt;/code&gt; &lt;em&gt;immediately inside&lt;/em&gt; the shortcode&amp;rsquo;s &lt;code&gt;{{&lt;/code&gt; and &lt;code&gt;}}&lt;/code&gt;&amp;hellip; hpwever you slice it, that can haardly be considered concise.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Hugo&amp;rsquo;s default markdown flavour was blackfriday: &lt;a href="https://github.com/russross/blackfriday"&gt;https://github.com/russross/blackfriday&lt;/a&gt; until Hugo version v0.60.0 adopted goldmark: &lt;a href="https://libs.garden/go/yuin/goldmark"&gt;https://libs.garden/go/yuin/goldmark&lt;/a&gt;. So, to deal with raw inline HTML in your Markdown files we need to enable the unsafe mode in &lt;code&gt;config.toml&lt;/code&gt;.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>Eek! CodeColorer Wordpress plugin and PHP 7.1</title><link>http://salopst.yearl.us/eek-codecolorer-wordpress-plugin-and-php-7-1/</link><pubDate>Wed, 01 Mar 2017 14:33:33 +0000</pubDate><guid>http://salopst.yearl.us/eek-codecolorer-wordpress-plugin-and-php-7-1/</guid><description>&lt;p&gt;Having used the most excellent &lt;a href="http://he.net/"&gt;Hurricane Electric&lt;/a&gt; for the longest time I decided to relocate. In so doing I realised that I was moving from a PHP 5.2 to a PHP 7.1 environment. Gulp! Has it been that long. Expecting lots o&amp;rsquo; issues, but amazingly no. Just the tiniest of tiny issues:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PHP Warning: preg_replace&lt;span style="color:#f92672"&gt;()&lt;/span&gt;: The /e modifier is no longer supported, use preg_replace_callback instead in /var/www/wp-content/plugins/codecolorer/codecolorer-core.php on line &lt;span style="color:#ae81ff"&gt;50&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="so-comment-out"&gt;So, comment out:&lt;/h3&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;function&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;BeforeHighlightCodeBlock&lt;/span&gt;($content) {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $content &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;preg_replace&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;#(\s*)\[cc([^\s\]_]*(?:_[^\s\]]*)?)([^\]]*)\](.*?)\[/cc\2\](\s*)#sie&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;$this-&amp;gt;PerformHighlightCodeBlock(\&amp;#39;\\4\&amp;#39;, \&amp;#39;\\3\&amp;#39;, $content, \&amp;#39;\\2\&amp;#39;, \&amp;#39;\\1\&amp;#39;, \&amp;#39;\\5\&amp;#39;);&amp;#39;&lt;/span&gt;, $content);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $content &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;preg_replace&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;#(\s*)\(.*?)\(\s*)#sie&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;$this-&amp;gt;PerformHighlightCodeBlock(\&amp;#39;\\3\&amp;#39;, \&amp;#39;\\2\&amp;#39;, $content, \&amp;#39;\&amp;#39;, \&amp;#39;\\1\&amp;#39;, \&amp;#39;\\4\&amp;#39;);&amp;#39;&lt;/span&gt;, $content);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; $content;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="adding"&gt;adding&lt;/h3&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;function&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;BeforeHighlightCodeBlock&lt;/span&gt;($content) {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $content &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;preg_replace_callback&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;#(\s*)\[cc([^\s\]_]*(?:_[^\s\]]*)?)([^\]]*)\](.*?)\[/cc\2\](\s*)#si&amp;#39;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;function&lt;/span&gt;($matches){&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; $this&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;PerformHighlightCodeBlock&lt;/span&gt;($matches[&lt;span style="color:#ae81ff"&gt;4&lt;/span&gt;], $matches[&lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;], $matches[&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;], $matches[&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;], $matches[&lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;]);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }, $content);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; $content &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;preg_replace_callback&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;#(\s*)\(.*?)\(\s*)#si&amp;#39;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;function&lt;/span&gt;($matches){&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; $this&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;PerformHighlightCodeBlock&lt;/span&gt;($matches[&lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;], $matches[&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;], &lt;span style="color:#e6db74"&gt;&amp;#39;&amp;#39;&lt;/span&gt;, $matches[&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;], $matches[&lt;span style="color:#ae81ff"&gt;4&lt;/span&gt;]);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }, $content);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; $content;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;php&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Posting from IA Writer to Wordpress (Coleman)</title><link>http://salopst.yearl.us/blog-post-ia-writer-to-wordpress-with-ruby/</link><pubDate>Sun, 24 Apr 2016 00:01:57 +0000</pubDate><guid>http://salopst.yearl.us/blog-post-ia-writer-to-wordpress-with-ruby/</guid><description>&lt;h2 id="0-wha"&gt;0. Wha?&lt;/h2&gt;&#10;&lt;p&gt;With the coming of the new &lt;a href="http://stephen.yearl.us/rescue-doggie-diary/"&gt;doggie into the house&lt;/a&gt;, perhaps I will again add more content to the &lt;a href="http://stephen.yearl.us"&gt;bloggy thing&lt;/a&gt; that I have kinda sorta not really been keeping over the last little while.&lt;/p&gt;&#10;&lt;p&gt;Probably this has been done by someone else on the Intertubz, but ach, why not. I have some time on my hands, so here are running notes in &lt;a href="https://ia.net/writer"&gt;IA Writer&lt;/a&gt; that will make its way to a &lt;a href="https://www.wordpress.com"&gt;Wordpress&lt;/a&gt; post by some means or other. There’s nothing special about IA writer, by the way. Well, there &lt;strong&gt;is&lt;/strong&gt;, but not for the purposes of the Wordpress posting. The same code should work with any plain-ish text file coming from any editor.&lt;/p&gt;</description></item><item><title>Online LaTeX editing tools</title><link>http://salopst.yearl.us/online-latex-editing-tools/</link><pubDate>Sun, 17 Feb 2013 13:12:07 +0000</pubDate><guid>http://salopst.yearl.us/online-latex-editing-tools/</guid><description>&lt;p&gt;For whatever reason, I&amp;rsquo;ve bumped into a number of in-browser &lt;code&gt;\LaTeX&lt;/code&gt; editing tools recently. I guess these are mostly useful for collaborative efforts, and I can see a reason why one would not want to use Subversion or Git. I mean Eldest is just coming of an age where he&amp;rsquo;s seeing computers as tools for his own use rather than just vectors of games/educational materials/movies. Because I am a benevolent father-dictator, he&amp;rsquo;s already familiar with &lt;code&gt;\LaTeX&lt;/code&gt; (and actually loves Computer Modern), and has decided to set all his writings in &lt;code&gt;\LaTeX&lt;/code&gt; prior to submission. Good for him. I love the fact that he was complaining about fonts on the MacBook Airs at school, and the pain of writing in MS Word. Good boy!&lt;/p&gt;</description></item><item><title>Wordpress</title><link>http://salopst.yearl.us/wordpress/</link><pubDate>Sun, 29 Jan 2012 14:02:46 +0000</pubDate><guid>http://salopst.yearl.us/wordpress/</guid><description>&lt;p&gt;Fsked the &lt;a href="http://mary.yearl.us"&gt;http://mary.yearl.us&lt;/a&gt; WP install last night whilst arsing with names. One single bloody typo in &amp;ldquo;site URL&amp;rdquo; and good luck getting back into the admin panel. WP does not even offer a warning that changing this might be a bad thing, or potentially so.&lt;/p&gt;&#10;&lt;p&gt;Fortunately having access to the database I could edit the value in-place in the tables&amp;hellip; now all is well again with the world.&lt;/p&gt;&#10;&lt;p&gt;&amp;hellip;except for the fact that I felt I had to sign up&amp;ndash;finally&amp;ndash; for a twitter account just so I could get an API key in order to explore some things on Mar&amp;rsquo;s blog. And it turns out another yearl.* has @yearlus as his handle. Grrr. for some reason this bothers me. Bothers me to the extent that I offerered him a free subdomain of his choosing under yearl.us. I&amp;rsquo;d take that deal if I were him.&lt;/p&gt;</description></item></channel></rss>