- hidden-xs-down = d-none d-sm-block
- hidden-sm-down = d-none d-md-block
- hidden-md-down = d-none d-lg-block
- hidden-lg-down = d-none d-xl-block
- hidden-xl-down = d-none (same as hidden)
- hidden-xs-up = d-none (same as hidden)
- hidden-sm-up = d-sm-none
- hidden-md-up = d-md-none
- hidden-lg-up = d-lg-none
- hidden-xl-up = d-xl-none
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
| INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`) | |
| VALUES ('hackadmin', MD5('password123'), 'Andy Admin', '[email protected]', '0'); | |
| INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) | |
| VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); | |
| INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) | |
| VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10'); |
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 | |
| // Disable REST API for logged out users | |
| add_filter( 'rest_authentication_errors', function( $result ) { | |
| if ( ! empty( $result ) ) { | |
| return $result; | |
| } | |
| if ( ! is_user_logged_in() ) { | |
| return new WP_Error( 'rest_not_logged_in', 'You are not currently logged in.', array( 'status' => 401 ) ); | |
| } |
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 | |
| /* | |
| * Append Bootstrap tabs to the post's content using ACF Pro repeater field. | |
| * | |
| * Prequisites: | |
| * - ACF PRO plugin | |
| * - Repeater field `tabs` containing `tab_title` (text) and `tab_content` (WYSIWYG) fields. | |
| * - Bootstrap 4.0 with util.js and tab.js loaded (or bootrap.js) | |
| */ |
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
| wget http://www.oreilly.com/programming/free/files/modern-java-ee-design-patterns.epub | |
| wget http://www.oreilly.com/programming/free/files/object-oriented-vs-functional-programming.epub | |
| wget http://www.oreilly.com/programming/free/files/java-the-legend.epub | |
| wget http://www.oreilly.com/programming/free/files/introducing-java-8.epub | |
| wget http://www.oreilly.com/programming/free/files/a-whirlwind-tour-of-python.epub | |
| wget http://www.oreilly.com/programming/free/files/20-python-libraries-you-arent-using-but-should.epub | |
| wget http://www.oreilly.com/programming/free/files/hadoop-with-python.epub | |
| wget http://www.oreilly.com/programming/free/files/how-to-make-mistakes-in-python.epub | |
| wget http://www.oreilly.com/programming/free/files/functional-programming-python.epub | |
| wget http://www.oreilly.com/programming/free/files/python-in-education.epub |
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
| # BEGIN WordPress | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteCond %{HTTPS} !=on | |
| RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] | |
| RewriteRule ^index\.php$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f |
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 | |
| /* | |
| * Issue: the validation was preventing me from using non-standard domains when developing on localhost. | |
| * Solution: disabled the URL verification, so I can use relative URLs and non-standard domains. | |
| * | |
| */ | |
| /* | |
| * Disable admin URL validation for Files, Images, Audio, and Video. |
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 stylesheet after default style.css | |
| wp_enqueue_style( 'my-css', get_template_directory_uri() . 'my-css.css', array('themename-style')); | |
| //WooCommerce - Sort products by SKU | |
| add_filter('woocommerce_get_catalog_ordering_args', 'custom_woocommerce_catalog_orderby'); | |
| function custom_woocommerce_catalog_orderby( $args ) { | |
| $args['meta_key'] = '_sku'; | |
| $args['orderby'] = 'meta_value'; | |
| $args['order'] = 'asc'; |
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 enqueue this funciton in functions.php | |
| `wp_enqueue_script( 'scrollto', '//cdn.jsdelivr.net/jquery.scrollto/2.1.2/jquery.scrollTo.min.js', array( 'jquery' ), '20161205', true );` | |
| // Bind to the click of all links with a #hash in the href | |
| if ( $.isFunction($.fn.scrollTo) ) { | |
| $('a[href^="#"]').click(function(e) { | |
| e.preventDefault(); | |
| // Scroll the window, stop any previous animation, stop on user manual scroll | |
| // Check https://github.com/flesler/jquery.scrollTo for more customizability | |
| $(window).stop(true).scrollTo(this.hash, {duration:1000, interrupt:true}); |