base64_encode conflict with convert_smilies in wordpress

Here’s the code from formatting.php if ( get_option( ‘use_smilies’ ) && ! empty( $wp_smiliessearch ) ) { // HTML loop taken from texturize function, could possible be consolidated. $textarr = preg_split( ‘/(<.*>)/U’, $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // Capture the tags as well as in between. $stop = count( $textarr ); // Loop stuff. The problem … Read more

How to change the headline title for an admin page in a plugin?

You shouldn’t need to hook anywhere in particular, simply output your heading at the start of your settings page callback and WP should position admin notices appropriately after your heading (there’s some logic written into the js/jquery). For example i have lines like this at the start of various plugin settings pages. <div class=”wrap”> <h1><?php … Read more

How to automatically convert images to WebP on WordPress?

Doing this in vanilla WordPress using hooks requires code that hasn’t been released yet, specifically: https://core.trac.wordpress.org/changeset/53751 https://core.trac.wordpress.org/ticket/55443 That Trac ticket adds new filters which are available in WordPress 6.1. Note that if your server cannot process webp images for resizing then webp will not work for you even with these filters. You will need to … Read more