RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
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 | |
| /* Custom fields on WooCommerce My Account | |
| ================================================================================================ */ | |
| /* Set up custom My Account tab and display the custom form fields | |
| ------------------------------------------------------------------------------------------------ | |
| Based on https://www.businessbloomer.com/woocommerce-add-new-tab-account-page/ | |
| */ | |
| // Register new endpoint (URL) for My Account page |
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 | |
| /** | |
| * FYKI | |
| * | |
| * The user's first and last names are stored within the user_meta!!! | |
| * | |
| * So if you need this data, you can access it by using `get_user_meta( $new_user->ID )`. | |
| * | |
| * Or, you can directly ask for it like this: | |
| * |
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 sortable Last Login column to users table | |
| * | |
| * Edited from Misha Rudrastyh's original @ | |
| * https://rudrastyh.com/wordpress/sortable-users-last-login-column.html | |
| */ | |
| // Collect login timestamp upon login events | |
| function collect_login_timestamp( $user_login, $user ) { |
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 | |
| /** | |
| * Determines whether a $post or a string contains a specific block type, | |
| * including blocks that are included in reusable blocks. | |
| * | |
| * @author Jb Audras – @audrasjb on socials. | |
| * | |
| * @param string $block_name Full Block type to look for. | |
| * @param int|string|WP_Post|null $post Optional. Post content, post ID, or post object. Defaults to global $post. | |
| * @return bool Whether the post content contains the specified block. |
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 | |
| global $post, $wp_query; | |
| if ( | |
| is_search() && | |
| 0 === $wp_query->found_posts | |
| ) : | |
| // do something |
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 | |
| /** | |
| * Based on this one: | |
| * https://portalzine.de/dev/php/advanced-custom-fields-get-gutenberg-blocks-data/ | |
| */ | |
| // Parse blocks from post content | |
| $blocks = parse_blocks( $post->post_content ); | |
| $img_Arr = []; | |
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
| // _easing.scss, CSS easing functions - gist.github.com/terkel/4377409 | |
| // Based on Caesar - matthewlein.com/ceaser | |
| $linear: cubic-bezier( 0.250, 0.250, 0.750, 0.750 ); | |
| $ease: cubic-bezier( 0.250, 0.100, 0.250, 1.000 ); | |
| $ease-in: cubic-bezier( 0.420, 0.000, 1.000, 1.000 ); | |
| $ease-out: cubic-bezier( 0.000, 0.000, 0.580, 1.000 ); | |
| $ease-in-out: cubic-bezier( 0.420, 0.000, 0.580, 1.000 ); | |
| $ease-in-quad: cubic-bezier( 0.550, 0.085, 0.680, 0.530 ); |