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: REST API - change field value | |
| Plugin URI: https://www.damiencarbery.com | |
| Description: Change the value of a field in a REST API endpoint. | |
| Author: Damien Carbery | |
| Version: 0.1.20260522 | |
| */ | |
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( 'limit_order_quantity_product_limited', 'check_if_product_limited', 10, 2 ); | |
| // Check to see if this limit applies to this product. | |
| // Return true if the product is quantity limited (to prevent adding more to the cart). | |
| // Return false if there is no special quantity limit. | |
| function check_if_product_limited( $limited, $product ) { | |
| // Hoodies category has ID 18. | |
| if ( in_array( 18, $product->get_category_ids() ) ) { | |
| return true; |
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 fields to event JSON+LD to fix warnings from Google Search Console. | |
| add_filter( 'tribe_json_ld_event_object', 'ccs_add_data_to_json_ld', 10, 2 ); | |
| function ccs_add_data_to_json_ld( $data, $args ) { | |
| $fields = array( 'location', 'organizer', 'image', 'offers', 'description' ); | |
| foreach ( $fields as $field ) { | |
| if ( empty( $data->$field ) ) { | |
| $data->$field = ''; | |
| } |
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: New badge for Product Collection block | |
| * Description: Insert a 'New' badge after the product price. | |
| * Plugin URI: https://www.kathyisawesome.com/leverage-block-hooks-to-insert-content/ | |
| * Author: Kathy Awesome | |
| * Author URI: https://www.kathyisawesome.com | |
| * Requires Plugins: woocommerce | |
| * Version: 0.1 | |
| */ |
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: Allow specific download always | |
| Plugin URI: https://www.damiencarbery.com/downloads-for-logged-in-users/ | |
| Description: With the <a href="https://wordpress.org/plugins/downloads-for-logged-in-users/">Downloads for logged in users</a> plugin, always allow one download. | |
| Author: Damien Carbery | |
| Version: 0.1 | |
| Requires Plugins: downloads-for-logged-in-users | |
| */ |
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
| <!DOCTYPE html> | |
| <html lang='en-GB'> | |
| <head> | |
| <meta charset='UTF-8'> | |
| <meta name='robots' content='noindex',' nofollow' /> | |
| <meta name='viewport' content='width=device-width',' initial-scale=1'> | |
| <title>Public Holidays</title> | |
| <link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css' rel='stylesheet' crossorigin='anonymous'> | |
| <style> | |
| .container { padding-top: 50px; } |
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: Events Manager - custom placeholder demos | |
| * Description: Demonstration of static and dynamic custom placeholder tags for Events Manager. | |
| * Plugin URI: https://www.damiencarbery.com/2025/09/events-manager-custom-placeholders/ | |
| * Author: Damien Carbery | |
| * Author URI: https://www.damiencarbery.com | |
| * Requires Plugins: events-manager | |
| * Version: 0.1.20250908 | |
| */ |
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
| .editor-styles-wrapper .wp-block-paragraph a[href^="https://eur04.safelinks.protection.outlook.com"] | |
| { background-color: black; color: white; } |
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 | |
| // This code is for a checkbox in the Order Information area. | |
| add_action( 'woocommerce_init', 'cbt_add_newsletter_checkbox' ); | |
| function cbt_add_newsletter_checkbox() { | |
| woocommerce_register_additional_checkout_field( | |
| array( | |
| 'id' => 'namespace/marketing-opt-in', | |
| 'label' => 'Do you want to subscribe to our newsletter?', | |
| 'location' => 'order', |
NewerOlder