Constants

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).

NGFB_HTML_DEBUG

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.

NGFB_WP_DEBUG

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.

NGFB_DEBUG_FILE_EXP

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.

NGFB_RESET_ON_ACTIVATE

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

NGFB_OPEN_GRAPH_DISABLE

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

NGFB_SOCIAL_SHARING_DISABLE

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.

NGFB_OBJECT_CACHE_DISABLE
NGFB_TRANSIENT_CACHE_DISABLE
NGFB_FILE_CACHE_DISABLE

Disable one or more types of cache.

NGFB_META_NAME
NGFB_OPTIONS_NAME
NGFB_SITE_OPTIONS_NAME

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

NGFB_MENU_PRIORITY

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

NGFB_INIT_PRIORITY

The plugin initialization priority (default is 13).

NGFB_HEAD_PRIORITY

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

NGFB_SOCIAL_PRIORITY

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

NGFB_FOOTER_PRIORITY

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

NGFB_CURL_DISABLE

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

NGFB_CURL_USERAGENT

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.

NGFB_CURL_CAINFO

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.

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=""> <strike> <strong>