WordPress Social Sharing Optimization (WPSSO) version 3.33.1-1 has been released, along with updates for the WPSSO JSON, WPSSO ORG, and WPSSO PLM extensions.
One of the big features for this new release is the added support for the Schema http://schema.org/Event type and its sub-types (DanceEvent, MusicEvent, etc.), along with integration of The Events Calendar plugin. The Events Calendar plugin already includes basic JSON-LD support, but the WPSSO Organization Markup (WPSSO ORG) and WPSSO Place / Location and Local Business Meta (WPSSO PLM) extensions allow you to include much more detail about the organizer (as an actual Organization instead of a Person), select a performer for the event, along with WPSSO’s standard support for images, videos, etc. The combination of WPSSO Pro and all three Pro extensions can provide extensive Schema markup about your event — see the following Schema JSON-LD markup for an example.
If you use a caching plugin, you may have an option to include custom PHP code when flushing the cache manually — for example, Comet Cache has an “Evaluate Custom PHP Code when Clearing the Cache?” option where you can enter additional PHP code to execute when clearing the cache manually. Adding the following code will also clear the WPSSO object cache when clearing the webpage cache:
if ( function_exists( 'wpsso_clear_all_cache' ) )
echo 'Cleared '.wpsso_clear_all_cache().
' files and objects from the WPSSO cache.<br/>';
WordPress Social Sharing Optimization (WPSSO) version 3.31.0-1 has been released, and includes several interesting changes — The display of Free / Pro version features in the settings pages sidebar has been improved by adding icons and grouping similar features. And the big change for this version is the support of post / page co-authors and guest authors using the Co-Authors Plus plugin. WPSSO Pro will extend the list of Contact Info under the Guest Author profile page, and include co-authors and guest authors (name, description / bio, image, and all contact URLs) in post / page meta tags. The WPSSO Schema JSON-LD Markup extension has also been updated to add co-authors and guest authors to all Schema types that include author information (Article, NewsArticle, TechArticle, BlogPosting, WebPage, etc.).
If you need to create an array of store hours (for example), the following function can generate an associative array of values quickly, with the hours formatted and stepped (every hour, 30 mins, etc.) as you wish.
I’ve seen similar functions using DateTime(), but we’re already working with timestamps, so there’s really no need.
I often want to output an array for debugging purposes, but using var_dump() or print_r() on an array that includes true / false values and class objects can be problematic — false values appear empty, and class objects can include too much information. I wrote the following recursive static method (presented here as a function) to pre-filter an array for readability when using print_r() or var_dump().