WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Open Graph Meta Tags for WordPress
[resolved] [PATCH] Optimize DB calls (2 posts)

  1. flynsarmy
    Member
    Posted 1 year ago #

    I was browsing through the source and noticed you keep every WOG option separately in the DB. This means lots of DB calls are made when grabbing the options back out, slowing the frontend of the site down. I've written a (completely backwards compatable) patch that moves them all into a single option. This way you can grab all data out with:

    $options = wonderm00n_open_graph_get_settings();

    and then use it like

    if ( $options['fb_url_show']==1 && $options['fb_url_canonical']==1 )
    	do_something()

    I've uploaded the patch to github.

    When testing that everything is working at it should, please do the following:

    • take note of your current settings
    • backup your db
    • install the updated version of the plugin
    • load either your site or the admin page and make sure all settings are how you left them.

    http://wordpress.org/extend/plugins/wonderm00ns-simple-facebook-open-graph-tags/

  2. wonderm00n
    Member
    Plugin Author

    Posted 7 months ago #

    Sorry I haven't seen this before. For personal reasons I haven't been able to develop the plugin further until now.

    Anyway I implemented a similar solution in the new version of the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.