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_HOSTED
indicates 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_HOSTED
is true, thenINN_MEMBER
below is also true.
-
constant
INN_MEMBER
¶ INN_MEMBER
indicates whether or not a WordPress site belongs to a member of the Institute for Nonprofit News.INN_MEMBER
is defined as true infunctions.php
if it is not otherwise defined and ifINN_HOSTED
is true. IfINN_HOSTED
is false, thenINN_MEMBER
will also be false unlessINN_MEMBER
is explicitly defined inwp_config.php
or in thefunctions.php
of a child theme.
-
constant
LARGO_DEBUG
¶ LARGO_DEBUG
should be set totrue
in development environments. It controls many behaviors:- in
inc/enqueue.php
,LARGO_DEBUG
controls whether or not minified versions of the following files are used: css/style.css
js/largoCore.js
css/widgets-php.css
js/widgets-php.js
- in
- in
inc/custom-less-variables.php
,LARGO_DEBUG
controls whether or not minified versions of the recompiled files are used. - in
inc/featured-media.php
,LARGO_DEBUG
controls whether or not minified versions of the following files are used: js/featured-media.js
- in
- in
inc/post-metaboxes.php
,LARGO_DEBUG
controls whether or not minified versions of the following files are used: js/custom-sidebar.js
js/top-terms.js
- in
- in
inc/term-icons.php
,LARGO_DEBUG
controls 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_DEBUG
totrue
in yourwp-config.php
with 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_NAV
defaults 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-holder
will 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_NAV
may 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_NAV
defaults 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
¶