Skip to content

Commit

Permalink
Merge pull request #1913 from WPBuddy/1880-INN-constants
Browse files Browse the repository at this point in the history
1880 Update INN_* constants
  • Loading branch information
rlambertsen authored Jul 16, 2021
2 parents 3afc835 + b6a783c commit 04e55ed
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 41 deletions.
12 changes: 2 additions & 10 deletions docs/developers/constants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,9 @@ For more information about how Largo handles image sizes, see `Image Sizes <imag
The other constants
-------------------

.. php:const:: INN_HOSTED
.. php:const:: WPB_HOSTED
``INN_HOSTED`` indicates whether or not a WordPress instance is hosted by INN. This setting should be set in ``wp-config.php``, but there is no reason for you to set this.

If ``INN_HOSTED`` is true, then ``INN_MEMBER`` below is also true.

.. php:const:: INN_MEMBER
``INN_MEMBER`` indicates whether or not a WordPress site belongs to `a member of the Institute for Nonprofit News <https://inn.org/members/>`_.

``INN_MEMBER`` is defined as true in ``functions.php`` if it is not otherwise defined and if ``INN_HOSTED`` is true. If ``INN_HOSTED`` is false, then ``INN_MEMBER`` will also be false unless ``INN_MEMBER`` is explicitly defined in ``wp_config.php`` or in the ``functions.php`` of a child theme.
``WPB_HOSTED`` indicates whether or not a WordPress instance is hosted by WP Buddy. This setting should be set in ``wp-config.php``, but there is no reason for you to set this.

.. php:const:: LARGO_DEBUG
Expand Down
19 changes: 4 additions & 15 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,12 @@
*/

/**
* By default we'll assume the site is not hosted by INN.
* By default we'll assume the site is not hosted by WPB.
*
* There should be no reason to set this. It is defined to
* modify the default value of 'INN_MEMBER' below to true for
* INN hosted sites.
* There should be no reason to set this.
*/
if ( ! defined( 'INN_HOSTED' ) )
define( 'INN_HOSTED', FALSE );

/**
* By default we'll assume the site is not for an INN member.
*
* Set INN_MEMBER to TRUE to show an INN logo in the footer
* and a widget of INN member stories in the homepage sidebar
*/
if ( ! defined( 'INN_MEMBER' ) )
define( 'INN_MEMBER', FALSE || INN_HOSTED );
if ( ! defined( 'WPB_HOSTED' ) )
define( 'WPB_HOSTED', FALSE );

/**
* LARGO_DEBUG defines whether or not to use minified assets
Expand Down
10 changes: 0 additions & 10 deletions options.php
Original file line number Diff line number Diff line change
Expand Up @@ -758,16 +758,6 @@ function optionsframework_options() {
'type' => 'checkbox',
);


/*
* Removing inn_member_since in 0.5.2
if ( INN_MEMBER ) { // only relevant in this case, options affecting the logo display
$options[] = array(
'name' => __('INN Membership Options', 'largo'),
'type' => 'info');
}
*/

return apply_filters('largo_options', $options);
}

Expand Down
9 changes: 3 additions & 6 deletions partials/footer-boilerplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@
</div>

<div class="span6 right">
<?php if (INN_MEMBER) { ?>
<?php inn_logo(); ?>
<?php } ?>
<p class="footer-credit <?php echo ( !INN_MEMBER ? 'footer-credit-padding-inn-logo-missing' : ''); ?>"><?php
<p class="footer-credit"><?php
printf(
// translators: %1$s and %2$s are URLs for largo.inn.org and inn.org respectively
__('Built with the <a href="%1$s">Largo WordPress Theme</a> from the <a href="%2$s">Institute for Nonprofit News</a>.', 'largo'),
__('Built with the <a href="%1$s">Largo WordPress Theme</a> from <a href="%2$s">WP Buddy</a>', 'largo'),
'https://largo.inn.org/',
'https://inn.org'
'https://wpbuddy.co'
);
?></p>
</div>
Expand Down

0 comments on commit 04e55ed

Please sign in to comment.