WP Manifestindependent plugin directory
manifest / utilities / wp-left-pad

left-pad

left-pad for WordPress

★ 2stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/w-biggs/wp-left-pad/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
wp-left-pad Because programming sucks. Installation Download master.zip, then install it via the "Add Plugin" button on WordPress's "Plugins" page. Usage example Just use the shortcode in any WordPress text area. Easy peasy. A few examples: Note: The third argument should be a single character. Obviously. Release History 1.0 First proper release CHANGE: Fix handling of multi-byte pad characters 0.1 Work in progress Meta Distributed under the WTFPL. Because who cares. See LICENSE for more information. FAQ Why? I originally had the idea to do this after someone on Reddit joked about WordPress plugins being like node modules. I responded with a low-effort left-pad joke, but soon thought "hey, that might actually be funny to do!". It was a fun little exercise to spend a little time on. Boooring. You just have to use strpad(), right? Wrong. strpad() doesn't handle multi-byte characters correctly, and while I tried to replicate the functionality of left-pad as closely as possible, multi-byte characters needed to work correctly. Otherwise, I couldn't use non-breaking spaces (which are encoded as c2 a0 in UTF-8); I needed to use non-breaking spaces as WordPress aut