Greetings from the Tryvium Team,
Here is how to integrate a Transferwise webhook with Slack notifications. We have chosen to use cloudflare workers as a perfect case study for serverless applications using cloudflare.
Greetings from the Tryvium Team,
Here is how to integrate a Transferwise webhook with Slack notifications. We have chosen to use cloudflare workers as a perfect case study for serverless applications using cloudflare.
| /** Updated and tested with GeneratePressVersion: 2.4.2 **/ | |
| /** | |
| * Check if logo is svg and output svg code instead of image | |
| */ | |
| function generate_construct_logo() { | |
| $logo_url = ( function_exists( 'the_custom_logo' ) && get_theme_mod( 'custom_logo' ) ) ? wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'full' ) : false; | |
| $logo_url = ( $logo_url ) ? $logo_url[0] : generate_get_option( 'logo' ); | |
| $logo_url = esc_url( apply_filters( 'generate_logo', $logo_url ) ); |
| <?php // ignore this line, its only to make highlighting work | |
| add_filter( 'fl_builder_render_module_content', function( $out, $module ) { | |
| if ( 'heading' === $module->slug ) { | |
| $string = $out; | |
| $find = ' '; | |
| $replace = ' '; | |
| $out = strrev( preg_replace( strrev( "/$find/" ), strrev( $replace ), strrev( $string ), 1 ) ); | |
| } | |
| return $out; | |
| }, 10, 2); |
| <?php | |
| function my_filter_acf_pro_license_option( $pre ) { | |
| if ( ! defined( 'ACF_PRO_LICENSE' ) || empty( ACF_PRO_LICENSE ) ) { | |
| return $pre; | |
| } | |
| $data = array( | |
| 'key' => ACF_PRO_LICENSE, | |
| 'url' => home_url(), |
| <?php | |
| /** | |
| * This will change all instances of seat(s) to member(s) for the Sponsored Members Add On - https://www.paidmembershipspro.com/add-ons/pmpro-sponsored-members/ | |
| * Add the code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_pmpro_change_seat_to_member( $output_text, $input_text, $domain ) { | |
| if ( 'pmpro-sponsored-members' === $domain ) { | |
| $output_text = str_replace( 'seats', 'members', $output_text ); | |
| $output_text = str_replace( 'Seats', 'Members', $output_text ); |
| add_filter( 'fl_module_upload_regex', function( $regex, $type, $ext, $file ) { | |
| $regex['photo'] = '#(jpe?g|png|gif|bmp|tiff?|svg)#i'; | |
| return $regex; | |
| }, 10, 4 ); |
To start with auto updates are disabled when 2.2 is released and you have to update manually by downloading the zip from your account area. With this simple file edit you can let WP do the update as if auto updates were enabled.
!Caution! Please make sure you do a backup before ANY WP plugin updates
| <?php | |
| /** | |
| * Change location where the Pay By Check Instructions are displayed when the Address For Free Levels Add On is installed. | |
| * Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_pmpro_change_location_for_checkout_instructions() { | |
| remove_filter('pmpro_checkout_after_payment_information_fields', 'pmpropbc_pmpro_checkout_after_payment_information_fields' ); | |
| add_filter('pmpro_checkout_boxes', 'pmpropbc_pmpro_checkout_after_payment_information_fields', 25 ); | |
| } |
| <?php | |
| /** | |
| *----------------------------------------------------------- | |
| * Add publisher logo/image schema for Beaver Builder plugin | |
| *----------------------------------------------------------- | |
| * | |
| * Filter: 'fl_schema_meta_publisher_image_url' | |
| * Defined in: bb-plugin/modules/post-grid/post-grid.php | |
| * |
| <?php | |
| /* | |
| * Say you have table which table id is 101 and you want to filter some data | |
| * Please disable caching for this table and load using ajax renderer | |
| */ | |
| add_filter('ninja_tables_get_public_data', function ($data, $tableId) { | |
| if($tableId != 101) { | |
| return $data; // Return if this is not our target table | |
| } |