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 | |
| /** | |
| * Auto-extend membership expiration and send receipt email | |
| * when an admin manually creates a check order. | |
| * | |
| * New orders fire `pmpro_added_order` (not `pmpro_update_order`), | |
| * so the pay-by-check plugin's logic never runs for them. | |
| * This fills that gap for manually created check orders. | |
| * | |
| * End date calculation mirrors PMPro core's pmpro_checkout_level_extend_memberships(): |
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 | |
| /** | |
| * Filter the Excerpt Block | |
| * | |
| * @package fse-starter | |
| **/ | |
| // Track if the current post title is linked (simple boolean flag) | |
| add_filter( 'render_block', 'fse_track_linked_post_title_simple_flag', 9, 2 ); |
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 | |
| // Set product price if dyncialy populate vlaue is set to 'workshop_price' | |
| add_filter( 'gform_field_value_workshop_price', 'cf_custom_product_price', 10, 2 ); | |
| function cf_custom_product_price( $value, $field ) { | |
| global $post; | |
| // Get the workshop price | |
| $quantity = get_post_meta( $post->ID, 'workshop_price', 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 | |
| function pb_load_inline_svg( $filename ) { | |
| // Add the path to your SVG directory inside your theme. | |
| $svg_path = '/assets/svg/'; | |
| $file_end = '.svg'; | |
| //Check the SVG file exists | |
| if ( ! file_exists( CHILD_DIR . $svg_path . $filename . $file_end ) ) { |
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
| //* Lightweight Youtube Emebeds | |
| //********************************************** | |
| // https://www.labnol.org/internet/light-youtube-embeds/27941/ | |
| document.addEventListener("DOMContentLoaded", | |
| function() { | |
| var div, n, | |
| v = document.getElementsByClassName("youtube-player"); | |
| for (n = 0; n < v.length; n++) { | |
| div = document.createElement("div"); |
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
| $ dandelion --config=staging.yml deploy | |
| $ dandelion --config=production.yml deploy |
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 | |
| // Don't include opening php tag | |
| // Cmb2 meta feild prefix | |
| $prefix = '_homepage_header_gallery_' | |
| // Get the list of files | |
| $files = get_post_meta( get_the_ID(), $prefix . 'images', 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 | |
| // Don't include opening php tage | |
| // Change feautred image text for Portfolios | |
| add_filter( 'post_type_labels_portfolios', 'pb_change_featured_portfolios_image_labels', 10, 1 ); | |
| function pb_change_featured_portfolios_image_labels( $labels ) { | |
| $new_text = __( 'Portfolio Image', 'core-functionality' ); | |
| $labels->featured_image = $new_text; |
NewerOlder