Largo Constants¶
The image constants¶
Largo’s image constants are used to define the crop and scaling sizes that WordPress automatically chops your image into.
Width:
FULL_WIDTH(default: 1170): the largest width for the largest image sizeLARGE_WIDTH(default: 771): medium image crop widthMEDIUM_WIDTH(default: 336): small image crop width
Height:
Largo does not impose any height limits on crop sizes. Thus the defaults are set to 9999.
FULL_HEIGHT(default: 9999): full image crop heightLARGE_HEIGHT(default: 9999): medium image crop heightMEDIUM_HEIGHT(default: 9999): small image crop height
For more information about how Largo handles image sizes, see Image Sizes.
The other constants¶
-
constant
INN_HOSTED¶ INN_HOSTEDindicates whether or not a WordPress instance is hosted by INN. This setting should be set inwp-config.php, but there is no reason for you to set this.If
INN_HOSTEDis true, thenINN_MEMBERbelow is also true.
-
constant
INN_MEMBER¶ INN_MEMBERindicates whether or not a WordPress site belongs to a member of the Institute for Nonprofit News.INN_MEMBERis defined as true infunctions.phpif it is not otherwise defined and ifINN_HOSTEDis true. IfINN_HOSTEDis false, thenINN_MEMBERwill also be false unlessINN_MEMBERis explicitly defined inwp_config.phpor in thefunctions.phpof a child theme.
-
constant
LARGO_DEBUG¶ LARGO_DEBUGshould be set totruein development environments. It controls many behaviors:- in
inc/enqueue.php,LARGO_DEBUGcontrols whether or not minified versions of the following files are used: css/style.cssjs/largoCore.jscss/widgets-php.cssjs/widgets-php.js
- in
- in
inc/custom-less-variables.php,LARGO_DEBUGcontrols whether or not minified versions of the recompiled files are used. - in
inc/featured-media.php,LARGO_DEBUGcontrols whether or not minified versions of the following files are used: js/featured-media.js
- in
- in
inc/post-metaboxes.php,LARGO_DEBUGcontrols whether or not minified versions of the following files are used: js/custom-sidebar.jsjs/top-terms.js
- in
- in
inc/term-icons.php,LARGO_DEBUGcontrols whether or not minified versions of the following files are used: js/custom-term-icons.js
- in
- in
inc/update.php, js/update-page.js
- in
Define
LARGO_DEBUGtotruein yourwp-config.phpwith the following line:define( 'LARGO_DEBUG', TRUE);
Please be careful with
LARGO_DEBUG-related functionality, as it is difficult to write tests for functions including constants.
-
constant
OPTIONS_FRAMEWORK_DIRECTORY¶ This constant represents the URI of the options framework, defined as
get_template_directory_uri() . '/lib/options-framework/'infunctions.php. This path is used to enqueue the options framework CSS, color picker CSS, jquery-dependent color picker, iris.min.js, the options framework scripts, and the options framework media library uploader.
-
constant
SHOW_GLOBAL_NAV¶ The Global Nav is a thin blck bar displayed in the header of Largo, goverened by
SHOW_GLOBAL_NAV.SHOW_GLOBAL_NAVdefaults to true, but child themes can set it to false withdefine( 'SHOW_GLOBAL_NAV', FALSE );in their themefunctions.php.
-
constant
SHOW_STICKY_NAV¶ DEPRECATED in Largo version 0.5.5. Conditional logic based on this constant should remove the conditional logic, and make sure that the HTML stucture is similar to that of partials/nav_sticky.php. The element
#sticky-nav-holderwill be shown or hidden by navigation.js.The sticky nav used to appear on the homepage and all internal pages, and on mobile devices, governed by
SHOW_STICKY_NAV.SHOW_STICKY_NAVmay be defined to be true or false.
-
constant
SHOW_MAIN_NAV¶ The main navigation appears on the homepage and all internal pages, but not on mobile devices, governed by
SHOW_MAIN_NAV.SHOW_MAIN_NAVdefaults to true, but child themes can set it to false withdefine( 'SHOW_GLOBAL_NAV', FALSE );in their themefunctions.php
-
constant
SHOW_SECONDARY_NAV¶
-
constant
SHOW_CATEGORY_RELATED_TOPICS¶
-
constant
LARGO_AVATAR_META_NAME¶
-
constant
LARGO_AVATAR_ACTION_NAME¶
-
constant
LARGO_AVATAR_INPUT_NAME¶
-
constant
JCLV_UNCOMPRESSED¶
-
constant
DOING_AUTOSAVE¶
-
constant
CFTL_SELF_DIR¶
-
constant
LARGO_TEMPLATE_LANDING_VERSION¶
-
constant
MEDIA_CREDIT_POSTMETA_KEY¶