Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Open link term and condition _ blank
- This topic has 2 replies, 2 voices, and was last updated 6 years, 5 months ago by Massimo BH.
Viewing 3 posts - 1 through 3 (of 3 total)
- AuthorPosts
- May 30, 2018 at 1:04 pm #683453Massimo BHParticipant
thank you
June 1, 2018 at 12:47 pm #684236J. DavisKeymasterHi Massimo,
Thank you for your message however could you specify why do not you like default solution? Such method is widely used in other platforms and systems.
Also there istarget="_blank"
attribute available in the link of terms and conditions by default. But there is also available a JS code that opens page content without opening it in new window.
That JS is applied for link class mphb-terms-and-conditions-link so you can override functionrenderTermsAndConditions()
and change class to something different e.g.add_action( 'wp_head', 'remove_renderTermsAndConditions' ); function remove_renderTermsAndConditions(){ remove_action( 'mphb_sc_checkout_form', array( '\MPHB\Views\Shortcodes\CheckoutView', 'renderTermsAndConditions' ), 60 ); } add_action( 'mphb_sc_checkout_form', 'custom_renderTermsAndConditions', 60); function custom_renderTermsAndConditions(){ $termsPageId = MPHB()->settings()->pages()->getTermsAndConditionsPageId(); $termsHtml = MPHB()->settings()->main()->getTermsAndConditionsText(); if ( !empty( $termsHtml ) ) { ?> <section class="mphb-checkout-terms-wrapper mphb-checkout-section"> <div class="mphb-terms-and-conditions"> <?php echo $termsHtml; ?> </div> <p class="mphb-terms-and-conditions-accept"> <label> <input type="checkbox" id="mphb_accept_terms" name="mphb_accept_terms" value="1" required="required" /> <?php $termsPageUrl = get_permalink( $termsPageId ); $termsPagelink = '<a href="' . esc_url( $termsPageUrl ) . '" target="_blank">' . _x( 'terms & conditions', 'I\'ve read and accept the terms & conditions', 'motopress-hotel-booking' ) . '</a>'; printf( _x( 'I\'ve read and accept the %s', 'I\'ve read and accept the <tag>terms & conditions</tag>', 'motopress-hotel-booking' ), $termsPagelink ); ?> <abbr title="<?php _e( 'Required', 'motopress-hotel-booking' ); ?>">*</abbr> </label> </section> <?php } }
June 15, 2018 at 12:27 pm #689073Massimo BHParticipantCiao Davis,
Thank you for your precious help! - AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.