Best possible way to get all options

I think it is always better to use the API, the functions of WP in this context. The function wp_load_alloptions() is under maintain and a custom select must always tested and maintain. Also the function use the Cache, if the installation support this. A good point for performance.
The function supports also the Multisite installation, maybe this also a point for maintain effort.

But the function have no filters to enhance the sql statement or output. That’s the point, that you must filter after the returned values.

Leave a Comment