WordPress.org

Ready to get started?Download WordPress

Forums

Simple Facebook Connect
[resolved] Disable functionnalities when not using it (7 posts)

  1. madri2
    Member
    Posted 1 year ago #

    Hi,

    i'm using simple facebook connect only to provide a way for users to login using facebook. I've checked only the "Allow FB Login to Comment (for non-registered users)" fonctionnality.

    The problem is, like a lot of people said before, sfc does call the_content filters to get the content to "publish to facebook". But i'm not using that feature, and my shortcodes/filters are still called twice by page.

    I'll help you, it's n the file sfc-base.php, on line 489,
    i commented "add_action('wp_head','sfc_base_meta');" and the user can still log in with facebook and the filters/shortcodes aren't processed twice.

    You just need to add a check of the need to process the content.

    http://wordpress.org/extend/plugins/simple-facebook-connect/

  2. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 1 year ago #

    No, that feature is there by design and won't be made optional. The name of the plugin is "Simple", it's supposed to do that sort of thing in the background.

    Shortcodes/filters and such are supposed to be capable of being called twice. If they aren't, then they're doing-it-wrong.

  3. madri2
    Member
    Posted 1 year ago #

    they are able to be caled twice, but it slow down the rendering of the page.

    So, just add a check to just disable the shortcodes & filters or just shortcodes. It's just one option, the plugin will still be simple.

    You may even also don't add any other option, just a little "if" on the code to not filter the content if it's not needed.

  4. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 1 year ago #

    it slow down the rendering of the page

    By a fractions of a millisecond, at most. It will be completely unnoticable to any significant degree.

    ALL code will "slow down rendering of the page" in that respect. If you want to speed up your site, use caching systems like W3 Total Cache or WP-Super-Cache. Going in and editing minor little deals like this is premature-optimization, which is the true root-of-all-evil.

  5. madri2
    Member
    Posted 1 year ago #

    there are plugins that use shortcode to displays a lot of datas, with a lot of queries & so on.

    Adding the possibility to disable the filters and shortcodes can be done in not so much time and i think all the people that have problem with shortcodes evaluated twice will be happy

  6. COCOCO
    Member
    Posted 1 year ago #

    Same here. This plugin slow down my website too and looking into this forum I've found many with the same issue.
    Otto, maybe is time to admit your code need improvements ;)

  7. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 1 year ago #

    COCOCO: If you don't like it, don't use the plugin. The plugin works fine for me and many others as is.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.