[] operator not supported for strings – PHP

I had a problem with Revolution Slider on a WordPress installation when upgrading to PHP 7.2+. It would generate the error – PHP Fatal error: [] operator not supported for strings in C:[path]\wp-content\plugins\revslider\includes\framework\base-admin.class.php:71 The problem was from the plugin attempting to use the short array push syntax on a string: The solution was to modify […]

Display TIFF Files on a Web Site in Chrome and Firefox

If you need to display TIFF files on the web, you might have problems. TIFF files used to be displayed by all browsers, but as they are not really suitable for web use, support has been dropping. See Image Support by Browser:  https://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support This makes sense of course, if you are only trying to use the […]

WordPress IDE – Visual Studio Code

I have decided to test out another WordPress IDE – Visual Studio Code *(or should I do PHP Tools for Visual Studio first?) Step 1: Install the Visual Studio Code IDE from: https://code.visualstudio.com/ References: Autocomplete and snippetrs: https://marketplace.visualstudio.com/items?itemName=tungvn.wordpress-snippet Review with recommended plugins, etc: https://tommcfarlin.com/vs-code-wordpress/ https://code.visualstudio.com/docs/languages/php

Bulk Migrate Users to New Blog on WordPress Multisite

Recently I had to move a large number of users from one blog to another on a Multisite install. These users had been mistakenly added to the wrong blog and most of them also had been assigned the wrong role. There were plugin options to do this one by one, but not to bulk migrate users. […]

INCOMPLETE – Parsing XML with SimpleXML and PHP

More reference: http://www.sitepoint.com/parsing-xml-with-simplexml/ Given the XML: Sample Account Name Test User 2014-03-01 Event Number One 2014-03-01T09:30:00 General Another Event 2014-03-01T09:30:00 Meeting Hockey Game 2014-03-01T10:00:00 Sports Perhaps this was entered into a textarea on a form and we have read it it into a variable. We can access the various data nodes using SimpleXML: $oXML = […]

Loop Through PHP Request Values – GET and POST

Loop through PHP Request Values In order to Loop through PHP Request Values – GET and POST without knowing what they all might be, you can simply use the following code: foreach ($_REQUEST as $key => $value) { $value = mysql_real_escape_string( $value ); $value = addslashes($value); $value = strip_tags($value); if($value != “”){$requestnumber ++;} echo $key. […]