To address very specific needs, some PHP constants for NGFB may be defined in your wp-config.php or theme templates (generally before the wp_head() function call).


Set this constant to ‘true’ to turn on hidden debug messages, and use “View Source” on any webpage to view the debug messages. An informational message box will also be displayed in admin pages as reminder that debug mode is on. This is equivalent to using the ‘Add Hidden Debug Info’ on the NGFB Advanced settings page.


Send debug messages to PHP’s error_log() as well. Here’s an example that will send WordPress and PHP error messages to a wordpress/wp-content/debug.log file, along with NGFB debug messages.


An adjusted expiration time (in seconds) when both the file caching feature and debug mode is enabled (defaults is 300 seconds). The file caching feature can save social sharing images and JavaScript to a cache folder, providing URLs to these cached files instead of the originals. Enable file caching from the NGFB Advanced settings page.


Set this constant to ‘true’ to reset all options to their defaults when the plugin is activated.


Set this constant to ‘true’ to prevent the plugin from adding Open Graph meta tags in the webpage head section.


Set this constant to ‘true’ to prevent the plugin from adding any meta tags in the webpage head section. You can also set it as httpd variable, and/or use it as a query argument.


Setting this constant to ‘true’ will disable all social sharing features, including the NGFB Sharing Buttons and Sharing Style settings pages, the Social Settings -> Sharing Buttons tab on Post and Page editing pages, along with the social sharing shortcode and widget.


Disable one or more types of cache.


The options field names in the database for NGFB. The default values are ‘_ngfb_meta’, ‘ngfb_options’, and ‘ngfb_site_options’.


Adjust the location of the “Open Graph” menu (default is 99.11).


The plugin initialization priority (default is 13).


Change the execution priority of the method that adds JavaScript and Open Graph meta tags to the head section (default is 10).


Change the execution priority for the method that adds social buttons to the content (default is 100).


Change the execution priority for the method that adds JavaScript to the footer section (default is 100).


Disable all use of PHP’s curl functions (all NGFB file caching features will be disabled).


Used by the remote content caching feature for social button images and JavaScript. The Google+ JavaScript is different for (what Google considers) invalid user agents. Since crawlers and robots might refresh the cached files, the NGFB_CURL_USERAGENT defines a default user agent string. You may define a NGFB_CURL_USERAGENT constant in your wp-config.php file to change the default that NGFB uses.


When the “Verify SSL Certificates” option is checked, PHP’s curl function needs a certificate authority file. Define the NGFB_CURL_CAINFO constant in your wp-config.php file to change the default location used by NGFB.


Specify an alternate location for the NGFB cache folder with the NGFB_CACHEDIR constant. This folder should be publicly available from your web server, and its URL can be modified using the NGFB_CACHEURL constant. Make sure both values end with a slash, and if your web server uses HTTPS, don’t forget to use HTTPS in the URL value as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>