Skip to content

Commit

Permalink
#62 hides waw support link in menu for non logged in users
Browse files Browse the repository at this point in the history
  • Loading branch information
numeroteca committed Jan 28, 2020
1 parent 0520050 commit cd536e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nav-waw.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<li role="presentation"><a href="<?php echo get_permalink( icl_object_id( 23274 , 'page' , false)); ?>"><?php _e("Waste Pickers' Organizations","globalrec"); ?></a></li>
<li role="presentation"><a href="<?php echo get_permalink( icl_object_id( 20848 , 'page' , false)); ?>"><?php _e('Type of Oganizations','globalrec'); ?></a></li>
<li role="presentation"><a href="<?php echo get_permalink( icl_object_id( 20830 , 'page' , false)); ?>"><?php _e('Scope','globalrec'); ?></a></li>
<li role="presentation"><a href="<?php echo get_permalink( icl_object_id( 21900 , 'page' , false)); ?>"><?php _e('Supporters','globalrec'); ?></a></li>
<?php if ( is_user_logged_in() ) { ?><li role="presentation"><span class="glyphicon glyphicon-lock"><a href="<?php echo get_permalink( icl_object_id( 21900 , 'page' , false)); ?>"><?php _e('Supporters','globalrec'); ?></a></li><?php } // hides supporters page for not logged in users?>
</ul>
</li>
<li role="presentation"><a href="<?php echo get_permalink( icl_object_id( 30746 , 'page' , false)); ?>"><?php _e('Add your organization','globalrec'); ?></a></li>
Expand Down
4 changes: 2 additions & 2 deletions page-waw-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<li><span class="label" style="background-color: #ff9933;"><?php _e("National","globalrec"); ?></span></li>
<li><span class="label" style="background-color: #ffff66; color: black;"><?php _e("International","globalrec"); ?></span></li>
</ul>
<?php if ( is_user_logged_in() ) { ?>
<?php if ( is_user_logged_in() ) { // hides supporters page for not logged in users ?>
<h3><span class="glyphicon glyphicon-lock"></span> <a href="<?php echo get_permalink( icl_object_id( 21900 , 'page' , false)); ?>"><?php _e("Supporters","globalrec"); ?></a></h3>
<ul>
<li><span class="label" style="background-color: #FFaaaa"><?php _e("Waste picker support organization","globalrec"); ?></span></li>
Expand All @@ -43,7 +43,7 @@
</div>
<div class="col-md-9 content">
<?php the_content(); ?>
<?php
<?php // hides supporters page for not logged in users
if ( is_user_logged_in() ) {
if ( is_page( array( 'supporters', 'apoyos-recicladores-en-el-mundo-rem', 'apoiadores' ) ) ) {
echo "<span class='glyphicon glyphicon-lock'></span> You can access <a href='/?page_id=30781'> the list of potential supporters and support organizations</a>.";
Expand Down

0 comments on commit cd536e2

Please sign in to comment.