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
| /** | |
| * Simple Javascript that generates WordPress salts | |
| * | |
| * Note that the Javascript version affects uniqueness for some functions - for | |
| * example, `Math.random().toString(36).substring(7);` generates a lot of | |
| * duplicates when using old versions of Node, but over 1M iterations shows | |
| * no duplication in Node v6.2.2. We're not using this method anyway, so this | |
| * note is for academic interest only. | |
| * | |
| * (c) David Egan 2016 |
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
| /*** MAIN WRAPPER ***/ | |
| .gform_wrapper { | |
| background: #6000AA; | |
| padding: 5%; | |
| } | |
| /*** REMOVE LABEL FOR PLACEHOLDER ONLY ***/ | |
| .gform_wrapper .top_label .gfield_label, | |
| .gform_wrapper .field_sublabel_below .ginput_complex.ginput_container label { | |
| display: 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
| /** | |
| * Password reset on sub site (1 of 4) | |
| * Replace login page "Lost Password?" urls. | |
| * | |
| * @param string $lostpassword_url The URL for retrieving a lost password. | |
| * @param string $redirect The path to redirect to. | |
| * | |
| * @return string | |
| * | |
| * @since 1.0.0 |
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 | |
| /** | |
| * Plugin Name: Filename-based cache busting | |
| * Version: 0.3 | |
| * Description: Filename-based cache busting for WordPress scripts/styles. | |
| * Author: Dominik Schilling | |
| * Author URI: http://wphelper.de/ | |
| * Plugin URI: https://dominikschilling.de/880/ | |
| * | |
| * License: GPLv2 or later |
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 | |
| /** | |
| * Reset the slugs on a particular post type to use the default sanitized slugs | |
| * @param string $post_type filter by post type | |
| * @param int $offset set the paginated post to start | |
| * @param boolean $force_guid_update * WARNING * never enable this | |
| * | |
| * @example add the following code into your theme's functions.php file, ensure |
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 | |
| /** | |
| * Performance improved gather_discount_coeffs function | |
| * code adapted from woocommerce-bulk-discount 2.4.5 | |
| * by Nils Magnus Englund <nme@stepone.no> | |
| * | |
| * NOTE: The code below is only compatible with WooCommerce 3.0 as-is. | |
| * Should be easy enough to backport. | |
| * |
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 | |
| // Display variations dropdowns on shop page for variable products | |
| add_filter( 'woocommerce_loop_add_to_cart_link', 'woo_display_variation_dropdown_on_shop_page' ); | |
| function woo_display_variation_dropdown_on_shop_page() { | |
| global $product; | |
| if( $product->is_type( 'variable' )) { | |
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 | |
| class ACF_Product_Options { | |
| static $slug = 'hwid_attributes'; | |
| public static function init() { | |
| // Gather the global attribute types | |
| $attribute_terms = wc_get_attribute_taxonomy_names(); |
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
| :: Pick one of these two files (cmd or ps1) | |
| :: Set directory for installation - Chocolatey does not lock | |
| :: down the directory if not the default | |
| SET INSTALLDIR=c:\ProgramData\chocoportable | |
| setx ChocolateyInstall %INSTALLDIR% | |
| :: All install options - offline, proxy, etc at | |
| :: https://chocolatey.org/install | |
| @powershell -NoProfile -ExecutionPolicy Bypass -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH="%PATH%;%INSTALLDIR%\bin" |
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_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) { | |
| if ( 'wc_user_membership' == $query->get( 'post_type' ) ) { | |
| $is_main_query = false; | |
| } | |
| return $is_main_query; | |
| }, 10, 2 ); |