Disabling users registration requirement
-
Hi,
What should I change in this file so user don’t need to be registered/logged in to do the action? Is it safe to delete this part?
$attrs = is_user_logged_in() ? 'href="#" data-toggle="modal" data-target="#report-listing-modal"' : sprintf( 'href="%s"', esc_url( \MyListing\get_login_url() ) ); ?>
Full code below. Thank you.
<?php /** * <code>Report Listing</code> quick action. * * @since 2.0 */ if ( ! defined('ABSPATH') ) { exit; } $attrs = is_user_logged_in() ? 'href="#" data-toggle="modal" data-target="#report-listing-modal"' : sprintf( 'href="%s"', esc_url( \MyListing\get_login_url() ) ); ?> <li id="<?php echo esc_attr( $action['id'] ) ?>" class="<?php echo esc_attr( $action['class'] ) ?>"> <a <?php echo $attrs ?>> <?php echo c27()->get_icon_markup( $action['icon'] ) ?> <span><?php echo $action['label'] ?></span> </a> </li>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.