Skip to content

Commit

Permalink
remove references to of_get_option( 'tag_display' ), which is hereby …
Browse files Browse the repository at this point in the history
…deprecated
  • Loading branch information
benlk committed Sep 8, 2016
1 parent e8c8978 commit 97dcfac
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 24 deletions.
1 change: 0 additions & 1 deletion home.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
$shown_ids = array();
$home_template = largo_get_active_homepage_layout();
$layout_class = of_get_option('home_template');
$tags = of_get_option ('tag_display');

global $largo;
if ($home_template == 'LegacyThreeColumn')
Expand Down
14 changes: 0 additions & 14 deletions options.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ function optionsframework_options() {
}
}

$tag_display_options = array(
'top' => __('Single Tag Above', 'largo'),
'btm' => __('List Below', 'largo'),
'none' => __('None', 'largo')
);

$article_utility_buttons = array(
'facebook' => __('Facebook', 'largo'),
'twitter' => __('Twitter', 'largo'),
Expand Down Expand Up @@ -380,14 +374,6 @@ function optionsframework_options() {
'name' => __('Other Homepage Display Options', 'largo'),
'type' => 'info');

$options[] = array(
'desc' => __('<strong>How would you like to display categories and tags for posts on the homepage?</strong> Largo can display a single category or tag above the headline for each story, a list of tags below the story\'s excerpt or nothing at all.', 'largo'),
'id' => 'tag_display',
'std' => 'top',
'type' => 'select',
'class' => 'mini',
'options' => $tag_display_options);

$options[] = array(
'desc' => __('<strong>Number of posts</strong> to display in the main loop on the homepage', 'largo'),
'id' => 'num_posts_home',
Expand Down
5 changes: 2 additions & 3 deletions partials/content-roundup.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* @link https://github.com/INN/link-roundups
* @link https://wordpress.org/plugins/link-roundups/
*/
$tags = of_get_option( 'tag_display' );
$hero_class = largo_hero_class( $post->ID, FALSE );
$values = get_post_custom( $post->ID );
$featured = has_term( 'homepage-featured', 'prominence' );
Expand All @@ -19,8 +18,8 @@
$entry_classes = 'entry-content';
echo '<div class="' . $entry_classes . '">';

if ( largo_has_categories_or_tags() && $tags === 'top' ) {
echo '<h5 class="top-tag">' . largo_top_term( $args = array( 'echo' => FALSE ) ) . '</h5>';
if ( largo_has_categories_or_tags() ) {
echo '<h5 class="top-tag">' . largo_top_term( $args = array( 'echo' => FALSE ) ) . '</h5>';
}
?>

Expand Down
4 changes: 0 additions & 4 deletions partials/content-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*
* @package Largo
*/
$tags = of_get_option( 'tag_display' );
$values = get_post_custom( $post->ID );
$entry_classes = 'entry-content';
?>
Expand All @@ -18,9 +17,6 @@

<?php largo_excerpt( $post, 1, null, null, true, false ); ?>

<?php if ( !is_home() && largo_has_categories_or_tags() && $tags === 'btm' ) { ?>
<h5 class="tag-list"><strong><?php _e('More about:', 'largo'); ?></strong> <?php largo_categories_and_tags( 8 ); ?></h5>
<?php } ?>
<small class="date-link">
<span class="date"><?php largo_time(); ?></span>
<span class="sep">|</span>
Expand Down
3 changes: 1 addition & 2 deletions partials/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*
* @package Largo
*/
$tags = of_get_option( 'tag_display' );
$hero_class = largo_hero_class( $post->ID, FALSE );
$values = get_post_custom( $post->ID );
$featured = has_term( 'homepage-featured', 'prominence' );
Expand All @@ -20,7 +19,7 @@
// series-specific options
if ( largo_post_in_series() ) {
$in_series = TRUE;
if ( ! isset( $opt['show']['tags'] ) && ! $opt['show']['tags'] && ! largo_has_categories_or_tags() ) {
if ( ! largo_has_categories_or_tags() ) {
$show_top_tag = FALSE;
}
if ( ! isset( $opt['show']['image'] ) && ! $opt['show']['image'] ) {
Expand Down

0 comments on commit 97dcfac

Please sign in to comment.