This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function() { | |
| $("#slider-range").slider({ | |
| range: true, | |
| min: 0, | |
| max: 100000, | |
| values: [500, 5000], | |
| //step:function(event, ui), | |
| slide: function(event, ui) { | |
| $("#amount").val('$' + ui.values[0] + ' - $' + ui.values[1]); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Add a function to check user access on template redirect | |
| //add_action('wp_head', 'drt_restrict_page_access'); | |
| //add_action('wp_footer', 'drt_display_notice_after_footer'); | |
| add_action('template_redirect', 'drt_restrict_page_access', 11); | |
| function drt_restrict_page_access() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Add a function to check user access on template redirect | |
| //add_action('wp_head', 'drt_restrict_page_access'); | |
| //add_action('wp_footer', 'drt_display_notice_after_footer'); | |
| add_action('template_redirect', 'drt_restrict_page_access', 11); | |
| function drt_restrict_page_access() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Add a function to check user access on template redirect | |
| //add_action('wp_head', 'drt_restrict_page_access'); | |
| //add_action('wp_footer', 'drt_display_notice_after_footer'); | |
| add_action('template_redirect', 'drt_restrict_page_access', 11); | |
| function drt_restrict_page_access() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function aba_save_card_shortcode() { | |
| ob_start(); | |
| ?> | |
| <!-- Include PHP class --> | |
| <?php | |
| require_once plugin_dir_path(__FILE__) . 'PayWayApiCheckout.php'; | |
| $transactionId = time(); | |
| $firstName = 'hj'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* test */ | |
| // Register Taxonomy GdC Ingredient | |
| // Taxonomy Key: gdc_ingredient1 | |
| function create_gdcingredient_tax() { | |
| $labels = array( | |
| 'name' => _x( 'GdC Ingredient', 'taxonomy general name', 'textdomain' ), | |
| 'singular_name' => _x( 'GdC Ingredient', 'taxonomy singular name', 'textdomain' ), | |
| 'search_items' => __( 'Search GdC Ingredient', 'textdomain' ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // we need to add class="uk-link-text" | |
| <span> | |
| <a class="uk-link-text" href="<?php echo get_permalink(8157); ?>" class="c-offer-btn open-popup-link">Next Steps?</a></span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // we can do samethings using wp_loaded also. | |
| add_action( 'init', function() { | |
| $status = session_status(); | |
| if ( PHP_SESSION_DISABLED === $status ) { | |
| return; | |
| } | |
| if ( PHP_SESSION_NONE === $status ) { | |
| session_start(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // note: always put session code in top of the functions.php | |
| // error handling : If you only want to avoid the error, use @ before the function like this @session_start(); | |
| // example 1 | |
| add_action( 'template_redirect', function() { | |
| $status = session_status(); | |
| if ( PHP_SESSION_DISABLED === $status ) { | |
| // That's why you cannot rely on sessions! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function dr_remove_update_notifications( $value ) { | |
| if ( isset( $value ) && is_object( $value ) ) { | |
| unset( $value->response[ 'stripe-payments/accept-stripe-payments.php' ] ); | |
| } | |
| return $value; | |
| } | |
| add_filter( 'site_transient_update_plugins', 'dr_remove_update_notifications' ); |
NewerOlder