function cm_typesense_add_available_post_types( $available_post_types ) { //Edit, delete or add according to your information $available_post_types[‘docs’] = [ ‘label’ => ‘Documentation’, ‘value’ => ‘docs’ ]; $available_post_types[‘actualites’] = [ ‘label’ => ‘Actualités’, ‘value’ => ‘actualites’ ]; $available_post_types[‘notes_versions’] = [ ‘label’ => ‘Notes de…Continue reading
add_filter( ‘editable_roles’, function( $roles ) { if (!current_user_can(‘administrator’) && !is_admin()) { unset( $roles[‘administrator’] ); } unset( $roles[‘editor’] ); unset( $roles[‘subscriber’] ); unset( $roles[‘revisor’] ); unset( $roles[‘docspress_manager’] ); unset( $roles[‘author’] ); unset( $roles[‘contributor’] ); return $roles; } );Continue reading
/** * Plugin Name: WP Simple Pay – Custom Smart Tags */ add_filter( ‘simpay_payment_details_template_tags’, function( $smart_tags ) { $smart_tags[] = ‘fee-recovery-amount’; $smart_tags[] = ‘pre-fee-amount’; return $smart_tags; } ); add_filter( ‘simpay_payment_confirmation_template_tag_fee-recovery-amount’, function( $value, $payment_confirmation_data ) { $object = current( $payment_confirmation_data[‘paymentintents’] );…Continue reading
function remove_hello_elementor_description_meta_tag() { remove_action( ‘wp_head’, ‘hello_elementor_add_description_meta_tag’ ); } add_action( ‘after_setup_theme’, ‘remove_hello_elementor_description_meta_tag’ );Continue reading
function remove_hello_elementor_description_meta_tag() { remove_action( ‘wp_head’, ‘hello_elementor_add_description_meta_tag’ ); } add_action( ‘after_setup_theme’, ‘remove_hello_elementor_description_meta_tag’ );Continue reading
add_filter( ‘simpay_get_paymentintent_args_from_payment_form_request’, function( $args ) { $args[‘metadata’] = array_map( function( $value ) { // If the value is `on` or `off`, change it. Otherwise return the normal value. if ( ‘off’ === $value ) { return ‘No’; } else if…Continue reading
add_filter( ‘wfea_price_display’, function ( $price_display, $min, $max, $currency ) { $event_id= get_post()->ID; if ( $event_id == 1234 ) { $min = $min – 10; $max = $max – 10; } if ( $min == $max ) { $price_display = $min;…Continue reading
add_filter( ‘wfea_price_display’, function ( $price_display, $min, $max, $currency ) { return $price_display . ‘ (Discounts available at checkout)’; }, 10, 4 );Continue reading
add_filter( ‘wfea_strip_eb_inline_styles’, ‘__return_false’ );Continue reading
add_filter(‘wfea_currency_symbols’, function ($currency_symbols) { $currency_symbols[‘CAD’] = ‘CAD$’; return $currency_symbols; } );Continue reading