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 | |
| /* | |
| * Function to check if given user is enrolled into any course. | |
| */ | |
| function wpac_check_enrolled_user($user_id){ | |
| if (is_numeric($user_id)) { | |
| //Global WordPress DB object | |
| global $wpdb; |
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
| [ | |
| { | |
| "country-name": "Afghanistan", | |
| "iso2": "AF", | |
| "iso3": "AFG", | |
| "top-level-domain": "af", | |
| "fips": "AF", | |
| "iso-numeric": "004", | |
| "geonameid": "1149361", | |
| "e164": "93", |
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 | |
| //Simple Ajax Login Form | |
| //Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/ | |
| ?> | |
| //html | |
| <form id="login" action="login" method="post"> | |
| <h1>Site Login</h1> | |
| <p class="status"></p> | |
| <label for="username">Username</label> |
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 | |
| $countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island |
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
| { | |
| "af": "Afrikaans", | |
| "sq": "Albanian", | |
| "am": "Amharic", | |
| "ar_DZ": "Arabic - Algeria", | |
| "ar_BH": "Arabic - Bahrain", | |
| "ar_EG": "Arabic - Egypt", | |
| "ar_IQ": "Arabic - Iraq", | |
| "ar_JO": "Arabic - Jordan", | |
| "ar_KW": "Arabic - Kuwait", |
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 | |
| /* ————————————————————————— */ | |
| /* ACF Inline SVGs | |
| /* ————————————————————————— */ | |
| $repeater = 'repeater_field_name' | |
| if ( have_rows( $repeater ) ): ?> | |
| <section class="content-main"> | |
| <div class="container"> <?php |
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
| first: you have to link bootstrap scripts and css style sheets. | |
| second: write this html code | |
| { | |
| <a href="#" class="playVideo play-icon-link" data-toggle="modal" data-target="#myModal"><span class="play-icon-span"><i class="fa fa-play" aria-hidden="true"></i></span></a> | |
| <!-- Modal --> | |
| <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | |
| <div class="modal-dialog" role="document"> | |
| <div class="modal-content"><!-- | |
| <div class="modal-header"> |
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
| Afghanistan | |
| Albania | |
| Algeria | |
| Andorra | |
| Angola | |
| Antigua and Barbuda | |
| Argentina | |
| Armenia | |
| Australia | |
| Austria |
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 | |
| /* | |
| * Changing WooCommerce City field to dropdown with predifned cities. | |
| * Based on https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/ | |
| */ | |
| function elicohenator_override_checkout_fields( $fields ) { | |
| // Create args for city fields - same for shipping & billing |
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
| /** | |
| * Hide shipping rates when free shipping is available. | |
| * Updated to support WooCommerce 2.6 Shipping Zones. | |
| * | |
| * @param array $rates Array of rates found for the package. | |
| * @return array | |
| */ | |
| function my_hide_shipping_when_free_is_available( $rates ) { | |
| $free = array(); | |
| foreach ( $rates as $rate_id => $rate ) { |