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
| /cart/* | |
| /checkout/* | |
| /my-account/* | |
| /wp-admin/* | |
| /wp-login.php | |
| /wp-json/* |
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
| wp plugin list --format=csv | grep -E "perfmatters|ninja-forms-uploads|mw-wp-form" |
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
| mv /home/user/public_html/wp-content /home/user/assets |
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
| // 1. Render | |
| add_action( 'edd_purchase_form_after_personal_info', function () { | |
| $value = edd_get_option( 'vat_id_placeholder', '' ); | |
| ?> | |
| <fieldset id="edd_checkout_vat_id"> | |
| <legend><?php esc_html_e( 'VAT ID (optional)', 'mystore' ); ?></legend> | |
| <p> | |
| <label class="edd-label" for="edd-vat-id"> | |
| <?php esc_html_e( 'EU VAT Registration Number', 'mystore' ); ?> | |
| </label> |
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
| my-theme/blocks/team-member/ | |
| block.json # metadata, WordPress reads this to register the block | |
| edit.js # React component rendered in the editor | |
| save.js # HTML saved to post_content (for static blocks) | |
| render.php # PHP template (for dynamic blocks), alternative to save.js | |
| style.scss # shared styles (editor + frontend) | |
| editor.scss # editor-only styles (optional) | |
| view.js # frontend JavaScript (optional) |
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
| User-agent: GPTBot | |
| Disallow: / | |
| User-agent: ClaudeBot | |
| Disallow: / | |
| User-agent: anthropic-ai | |
| Disallow: / | |
| User-agent: Meta-ExternalAgent |
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
| set_transient( 'my_cache_key', $data, HOUR_IN_SECONDS ); | |
| $cached = get_transient( 'my_cache_key' ); | |
| delete_transient( 'my_cache_key' ); |
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
| add_action( 'template_redirect', function () { | |
| if ( ! empty( $_GET['coupon'] ) ) { | |
| $code = sanitize_text_field( $_GET['coupon'] ); | |
| if ( wc_get_cart_remove_url() && ! WC()->cart->has_discount( $code ) ) { | |
| WC()->cart->apply_coupon( $code ); | |
| } | |
| } | |
| } ); |
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
| # Next.js page query | |
| query GetPost($slug: ID!) { | |
| post(id: $slug, idType: SLUG) { | |
| title | |
| content | |
| date | |
| featuredImage { | |
| node { sourceUrl altText mediaDetails { width height } } | |
| } | |
| seo { title metaDesc canonical } |
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
| npm install --save-dev @wordpress/build |