TIPS / Change A href into button action
-
Hi,
it’s just to share a small modification not have another link on page to generate bad SEO link on himself page.Version 1.2.48
File : cookie-notice.php
Line : 1108 > 1119
Localisation : // Output message// message output $output = ' <div id="cookie-notice" role="banner" class="cn-' . ( $options['position'] ) . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . '" style="color: ' . $options['colors']['text'] . '; background-color: ' . $options['colors']['bar'] . ';">' . '<div class="cookie-notice-container"><span id="cn-notice-text">'. $options['message_text'] .'</span>' . '<button onclick="location.href="#" type="button" id="cn-accept-cookie" data-cookie-set="accept" class="cn-set-cookie ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '">' . $options['accept_text'] . '</button>' . ( $options['refuse_opt'] === 'yes' ? '<button onclick="location.href="#" type="button" id="cn-refuse-cookie" data-cookie-set="refuse" class="cn-set-cookie ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '">' . $options['refuse_text'] . '</button>' : '' ) . ( $options['see_more'] === 'yes' ? '<button onclick="location.href="/'. ( $options['see_more_opt']['link_type'] === 'custom' ? $options['see_more_opt']['link'] : get_permalink( $options['see_more_opt']['id'] ) ) .'/" target="' . $options['link_target'] . '" id="cn-more-info" class="cn-more-info ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '" type="button">' . $options['see_more_opt']['text'] . '</button>' : '' ) . ' </div> ' . ( $options['refuse_opt'] === 'yes' ? '<div class="cookie-notice-revoke-container"><button onclick="location.href="#" type="button" class="cn-revoke-cookie ' . $options['button_class'] . ( $options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '' ) . ( $options['css_class'] !== '' ? ' ' . $options['css_class'] : '' ) . '">' . esc_html( $options['revoke_text'] ) . '</button></div>' : '' ) . ' </div>'; echo apply_filters( 'cn_cookie_notice_output', $output, $options );
Best regards
- The topic ‘TIPS / Change A href into button action’ is closed to new replies.