Tag Info

Hot answers tagged


Third party themes are off topic, but I ended up checking it anyway: The Problem What comes before & after your posted code is important: Before: // Return array of cached results if they exist. $featured_ids = get_transient( 'featured_content_ids' ); if ( ! empty( $featured_ids ) ) { return array_map( 'absint', (array) $featured_ids ); } ...


It is quite easy to achieve this. Your answer is usort() FEW NOTES: Before we code, just a few notes Requires PHP5.4+ due to the use of the short array syntax ([]). If you have an older version, you should really upgrade as older versions are a real security threat as all older versions prior to PHP 5.4 has been EOL'ed I will comment the code as I go ...

Only top voted, non community-wiki answers of a minimum length are eligible