The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,182 other subscribers

Archive for the ‘WordPress’ Category

Bookmarklet to force WordPress classic-editor

Posted by jpluimers on 2022/03/29

A while ago, WordPress.com heavily started to de-emphasise the Classic Editor in order to boost the Gutenberg editor which is bloaty (in both browser DOM usage heavily slowing down editing), content (lots of meta tags that are added to blog source) and missing features (especially nesting of blocks often breaks things).

With 7000+ blog posts in the Classic Editor format (a few in still supported markdown format: that experiment failed horribly!) that still require editing  (especially because of link rot)

So here is the Bookmarklet code to switch back an editing URL that you can use for as long as the Classic Editor is there:

javascript:location.href=document.location.href+'&classic-editor';

Yup, it is that simple: it appends &classic-editor to the URL.

Read the rest of this entry »

Posted in Bookmarklet, Development, Internet, link rot, Power User, Software Development, Web Browsers, Web Development, WordPress, WWW - the World Wide Web of information | Leave a Comment »

WordPress undocumented Classic-Editor shortcut “Shift-Ctrl-F” that goes full screen

Posted by jpluimers on 2022/03/28

Suddenly, a while ago, because of a stuck modifier key I suddenly had the WordPress classic editor running in full screen without any indication to go back, nor an opportunity to save the content.

It wasn’t the usual “Shift-Alt-W” [Wayback] Distraction Free Writing – Make WordPress Support (which still allows you to hover over the sidebars to make them visible, and has a visual indication of the mode).

After lot’s of trying, I figured out the toggle “Shift-Ctrl-F” toggles between normal and full screen mode. It seems unavailable in the new editor, so that might be a reason ([Wayback] Keyboard Shortcuts | WordPress.org)

The shortcut is odd too, as in most tooling “Ctrl-F” modifications like “Shift-Ctrl-F” have something to do with find or replace operations.

It was quite tough finding any reference to this shortcut, as my initial search revealed none: [Wayback] “WordPress” “Shift-Ctrl-F” full screen – Google Search.

Later I reversed the modifiers in [Wayback] “WordPress” “Ctrl-Shift-F” full screen – Google Search and found [Wayback] How to disable non-system hotkeys on Windows – gHacks Tech News

Simple Disable Key is a free software program for Microsoft Windows devices that enables you to block non-system hotkeys.

Not all hotkeys are useful however. When I work on a WordPress site for instance, I sometimes press the shortcut Ctrl-Shift-F by accident. This switches the editor to full screen view which I never use.

First time I invoked the full screen editor I had to look up the shortcut as I could not reproduce it.

–jeroen

Posted in Development, SocialMedia, Software Development, Web Development, WordPress, WordPress | Leave a Comment »

html – CSS Display an Image Resized and Cropped – Stack Overflow

Posted by jpluimers on 2021/08/25

[WayBack] html – CSS Display an Image Resized and Cropped – Stack Overflow (thanks [WayBack] roborourke!); see full answer link for runnable snippet and HTML (the WordPress editor keeps fucking up preformatted code blocks with html or XML in it).

You could use a combination of both methods eg.

    .crop {
        width: 200px;
        height: 150px;
        overflow: hidden;
    }

    .crop img {
        width: 400px;
        height: 300px;
        margin: -75px 0 0 -100px;
    }

You embed the img in a div with class .crop, or in-line the styles in the img and div tags.

–jeroen

 

Posted in CSS, Development, HTML, HTML5, SocialMedia, Software Development, Web Development, WordPress, WordPress | Leave a Comment »

Do I really need to write a WordPress API wrapper to check the status of “missed schedule” posts?

Posted by jpluimers on 2020/01/29

After years with “missed schedule” posts on (paid!) wordpress.com based sites, WordPress has documented that the scheduler officially does not support more than 100 posts:

[WayBackWarning: Please do not schedule more than 100 posts. Any posts scheduled beyond that amount will not be published.

In practice this is not fully true, so lets explain that a little.

Background

Imagine the list of scheduled posts as a list of posts to be posted anywhere from the near future (lets call that tail) until far in the future (for now head).

As long as you schedule posts in head to tail order, then there is no problem. You can schedule 100s of posts (usually I’ve between 700 and 1200 posts scheduled that way).

The problems appear when:

Read the rest of this entry »

Posted in *nix, Development, Missed Schedule, Monitoring, Power User, SocialMedia, Software Development, Uptimerobot, Web Development, WordPress, WordPress | Leave a Comment »

Lesson learned: do not copy/paste code from the `Visual` WordPress.com editor…

Posted by jpluimers on 2019/04/16

[WayBack] Lesson learned: do not copy/paste code from the Visual WordPress.com editor; copy from the Text editor or the Preview… – Jeroen Wiert Pluimers – Google+.

Note: likely the HTML below got rendered badly by WordPress.com, so the gist below has the same text as a MarkDown file.

Ever wonder why copy-pasting code from your WordPress.com post fails?

The first statement fails, but the second works:

[root@linux:/etc] # useradd --create-home --shell /bin/false autossh24
useradd: unrecognized option '--shell /bin/false'
...
[root@linux:/etc] # useradd --create-home --shell /bin/false autossh24
[root@linux:/etc] #

The reason is that the first is copied from the Visual WordPress.com editor that renders this HTML inserting   which is a different unicode characer (0x00A0) than a normal space (0x0020):

<blockquote><p><code data-mce-selected="1"># <strong>useradd --create-home --shell&nbsp;/bin/false autossh24</strong></code></p></blockquote>

However, the the second copied from the Text WordPress.com editor succeeds because it has all regular spaces:

<blockquote><code># <strong>useradd --create-home --shell /bin/false autossh24</strong></code></blockquote>

Luckily the Preview render is correct:

<blockquote><p><code># <strong>useradd --create-home --shell /bin/false autossh24</strong></code></p></blockquote>

Lesson learned: do not copy/paste code from the Visual WordPress.com editor; copy from the Text editor or the Preview.

–jeroen

[WayBackEver wonder why copy-pasting code from your WordPress.com post fails?

Read the rest of this entry »

Posted in Development, PHP, Scripting, SocialMedia, Software Development, Web Development, WordPress, WordPress | Leave a Comment »

 
%d bloggers like this: