I use Google Domains as a registrar, DigitalOcean.com for hostings and Comodo for SSL Certs.
These are the steps I went through to set up an SSL cert.
| <?php // Do not include this if already open! Code goes in theme functions.php. | |
| /* | |
| * Force customer creation process in Stripe. | |
| */ | |
| add_filter( 'wc_stripe_force_save_source', '__return_true' ); |
| <script> | |
| // This example displays an address form, using the autocomplete feature | |
| // of the Google Places API to help users fill in the information. | |
| // This example requires the Places library. Include the libraries=places | |
| // parameter when you first load the API. For example: | |
| // <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"> | |
| var placeSearch, autocomplete; | |
| var componentForm = { |
I use Google Domains as a registrar, DigitalOcean.com for hostings and Comodo for SSL Certs.
These are the steps I went through to set up an SSL cert.
| // Block Non-Admins from Accessing Dashboard | |
| function blockusers_init() { | |
| if ( is_admin() && ! current_user_can( 'administrator' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { | |
| wp_redirect( home_url() ); | |
| exit; | |
| } | |
| } | |
| add_action( 'init', 'blockusers_init' ); |
| //Remove query strings from static resources | |
| function remove_cssjs_ver( $src ) { | |
| if( strpos( $src, '?ver=' ) ) | |
| $src = remove_query_arg( 'ver', $src ); | |
| return $src; | |
| } | |
| add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 ); | |
| add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 ); |
| // Use Google Hosted jQuery | |
| function modify_jquery() { | |
| if (!is_admin()) { | |
| wp_deregister_script('jquery'); | |
| wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', false, '1.12.4'); | |
| wp_enqueue_script('jquery'); | |
| } | |
| } | |
| add_action('init', 'modify_jquery'); |
| <script> | |
| // This example displays an address form, using the autocomplete feature | |
| // of the Google Places API to help users fill in the information. | |
| // This example requires the Places library. Include the libraries=places | |
| // parameter when you first load the API. For example: | |
| // <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"> | |
| var placeSearch, autocomplete; | |
| var componentForm = { |
| // Change Comments Links to Disqus | |
| add_filter( 'get_comments_link', function( $link, $post_id ) | |
| { | |
| return get_permalink( $post_id ) . '#disqus_thread'; | |
| }, 10, 2 ); |