Blog Post PHP 8.1, XF 2.2, and WP 5.9

E48B35F1-47E7-4466-A024-F9D6CE90953B.jpeg

Lots of changes are coming down the road in January. PHP 8 was introduced several years ago but this server is 7.4. More important, WordPress is being forced to change some of its coding and so it'll be important to watch. WordPress 5.9 is expected near the end of January.

A new development server was built on a Windows box and here are the latest changes. I'll run them on this site before packaging them up. I'll probably update tomorrow morning before starting to prepare for classes.

Changelog




( 32 ) 2022.1.2 - January 2, 2022
Refactored Avatars.php to create method getSelection()
Lots of methods were cleaned up by removing unnecessary conditions in if statements.
Moved getAuthor to /Includes/Authors/Author.php
Removed duplicate thread code in Connector.php
Removed duplicate thread code in Admin\Thread.php
Method fn is deprecated; replaced code in several files with func
Bug Fix: Removed Feature Image posting in Forum when Link Only option is set
Removed $user statement in Thread.php
Removed $post statement in Banned.php
Created \Includes\Threads\Content.php to separate out building XF Post from WP Post
Added Prefixes option
Rearranged the XenWord Options Settings; moved featured image option into Thread Text




To answer questions that have been asked by many:
  • No, I'm not back. The plugin needed updating to work properly on the main website.
  • No, I'm not answering individual questions. I answered why my life changed in several places and decided the 50+ people messaging me with that question have an answer. Sure. It's not one you might like but I took on a heavy teaching assignment. Those of you who don't understand and think evenings, weekends, and summers are off -- well -- that just isn't the case.
  • No. I cannot get onto your server and install the plugin.
  • No. You shouldn't buy the plugin if you haven't been running it.
  • Yes. The product is "for sale." It's so that people who have lifetime licenses can continue to get the plugin.
  • No. You cannot repackage the code and call it yours.
  • Yes. Development is incremental. It means -- when I figure something out or when there is time. For example, I still don't get how to build metaboxes using an abstract class.
  • Yes. Developers continue to be able to package the product.
  • No. I didn't know until the other day that ThemeHouse has changed XPress.
  • Yes. I saw the other day that someone else has built a bridge based on the API. I strongly support this effort.
  • Yes. XenLate runs on XenForo 2.2. I haven't touched the code and want to add a wide version.
  • Sorry. If I haven't answered your question then it's not because XYZ. I have a heavy teaching load. In fact, I moved classrooms four times in the past four years. Try that while keeping your sanity -- over 60K pieces of equipment to track for engineering,, physics, honors physics, and four different AP physics courses0
  • Yes, you can follow me on twitter and read my blurry nonsense.
 

LPH

Flight Director
Staff member
This is the latest changelog after running the plug-in on PHP 8.1, the main server, and here.

Code:
( 32 ) 2022.1.4 - January 4, 2022
Refactored Avatars.php to create method getSelection()
Lots of methods were cleaned up by removing unnecessary conditions in if statements.
Moved getAuthor to /Includes/Authors/Author.php
Removed duplicate thread code in Connector.php
Removed duplicate thread code in Admin\Thread.php
Method fn is deprecated; replaced code in several files with func
Bug Fix: Removed Feature Image posting in Forum when Link Only option is set
Removed $user statement in Thread.php
Removed $post statement in Banned.php
Created \Includes\Threads\Content.php to separate out building XF Post from WP Post
Added Prefixes option
Rearranged the XenWord Options Settings; moved featured image option into Thread Text
Changes to dirname code in loader.php files; use of levels.
Login logout change to str_contains in Redirects.php
Bug Fix:use_xenword_legacy option caused PHP error; use array_key_exists
Comments.php file rewritten to pull WP post meta rather than query of XF threads.
Added new metaboxes (2 files) to show below comment edit form. Can show, edit, or save a thread_id or origin.
 

LPH

Flight Director
Staff member
Added the option to make a new WordPress post a sticky thread.
Big Fix: Checking or unchecking the Create or Edit Thread behaves properly.
 
Top