Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
| # ------------------------------------------------------------ | |
| # Master queries to modify databases in WordPress ------------ | |
| # ------------------------------------------------------------ | |
| # show all admin users | |
| SELECT u.ID, u.user_login, u.user_email, u.user_nicename, | |
| um.meta_value AS capability | |
| FROM wp_users AS u | |
| INNER JOIN wp_usermeta AS um ON (u.ID = um.user_id) | |
| WHERE um.meta_key = 'wp_capabilities' |
| update NEWPREFIX_usermeta set meta_key = 'NEWPREFIX_capabilities' where meta_key = 'OLDPREFIX_capabilities'; | |
| update NEWPREFIX_usermeta set meta_key = 'NEWPREFIX_user_level' where meta_key = 'OLDPREFIX_user_level'; | |
| update NEWPREFIX_usermeta set meta_key = 'NEWPREFIX_autosave_draft_ids' where meta_key = 'OLDPREFIX_autosave_draft_ids'; | |
| update NEWPREFIX_options set option_name = 'NEWPREFIX_user_roles' where option_name = 'OLDPREFIX_user_roles'; |
| <?php | |
| //enable upload for webp image files. | |
| function webp_upload_mimes($existing_mimes) { | |
| $existing_mimes['webp'] = 'image/webp'; | |
| return $existing_mimes; | |
| } | |
| add_filter('mime_types', 'webp_upload_mimes'); | |
| // functions.php | |
| //enable preview / thumbnail for webp image files. |
| <?php | |
| // functions.php | |
| function custom_archive_title($title) { | |
| if (is_category()) { | |
| $title = 'Category: ' . single_cat_title('', false); | |
| } elseif (is_tag()) { | |
| $title = 'Tag: ' . single_tag_title('', false); | |
| } elseif (is_author()) { | |
| $author = get_queried_object(); | |
| $title = 'Author: ' . $author->display_name; |
| <?php | |
| /* Recent Post | image */ | |
| function show_related_posts($atts) { | |
| $atts = shortcode_atts(array( | |
| 'post_id' => get_option('page_on_front'), | |
| ), $atts); | |
| $related_post_ids = get_field('recent_post', $atts['post_id']); | |
| if ($related_post_ids) { |
| <?php | |
| /** | |
| * W3C Fix and HTML minifier | |
| * Nobody knows how this work, so don't touch it!!! | |
| * | |
| * https://wordpress.stackexchange.com/a/227896/129134 | |
| * https://stackoverflow.com/a/41148695 | |
| */ |
| const gltfLoader = new GLTFLoader() | |
| // Array de archivos GLTF | |
| const gltfFiles = [ | |
| 'models/Model/glTF/model1.gltf', | |
| 'models/Model/glTF/model2.gltf' | |
| //'models/Model/glTF/other_model.gltf' | |
| ]; |
NOTE: .htaccess files are for people that do not have rights to edit the main server configuration file. They are intrinsically slower and more complicated than using the main config. Please see the howto in the httpd documentation for further details.
Disclaimer: While dropping the snippet into an .htaccess file is most of the time sufficient, there are cases when certain modifications might be required. Use at your own risk.
IMPORTANT: Apache 2.4 introduces a few breaking changes, most notably in access control configuration. For more information, check the upgrading document as well as this issue.
What we are doing here is mostly collecting useful snippets from all over the interwebs (for example, a good chunk is from Apache Server Configs) into one
| <?php | |
| // Trigger Holiday Mode | |
| add_action ('init', 'bbloomer_woocommerce_holiday_mode'); | |
| // Disable Cart, Checkout, Add Cart | |
| function bbloomer_woocommerce_holiday_mode() { |