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 = (not defined)

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 Messages’ on the NGFB Advanced settings page.

NGFB_WP_DEBUG = (not defined)

Send debug messages to PHP’s error_log() function 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 = 300

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 = (not defined)

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

NGFB_FILTER_SINGLE_TAGS = (not defined)

Set this constant to ‘true’ to have NGFB apply a filter to every meta tag. An example filter:

apply_filters( 'ngfb_meta_property_og:description_content', $value, $comment, $use_post );

NGFB_OPEN_GRAPH_DISABLE = (not defined)

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

NGFB_META_TAGS_DISABLE = (not defined)

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.

NGFB_SOCIAL_SHARING_DISABLE = (not defined)

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 = (not defined)
NGFB_TRANSIENT_CACHE_DISABLE = (not defined)
NGFB_FILE_CACHE_DISABLE = (not defined)

Disable one or more types of cache.

NGFB_META_NAME = '_ngfb_meta'
NGFB_PREF_NAME = '_ngfb_pref'
NGFB_OPTIONS_NAME = 'ngfb_options'
NGFB_SITE_OPTIONS_NAME = 'ngfb_site_options'

The options field names in the database for NGFB.

NGFB_MENU_ORDER = 99.11

Adjust the location of the NGFB menu.

NGFB_INIT_PRIORITY = 14

The plugin initialization priority.

NGFB_HEAD_PRIORITY = 10

Change the execution priority of the method that adds JavaScript and meta tags to the head section.

NGFB_CURL_DISABLE = (not defined)

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

NGFB_CURL_USERAGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:40.0) Gecko/20100101 Firefox/40.0'

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.

NGFB_CURL_CAINFO = NGFB_PLUGINDIR.'share/curl/ca-bundle.crt'

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.

NGFB_CACHEDIR = NGFB_PLUGINDIR.'cache/'
NGFB_CACHEURL = NGFB_URLPATH.'cache/'

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

NGFB_IMAGE_UPSCALE_ALL = (not defined)
NGFB_IMAGE_UPSCALE_TEST = (not defined)

When set to true, NGFB can upscale all image dimensions (not just its own), and/or can also provide feedback on upscale results, without saving the upscaled images.