add_filter( ‘charitable_campaign_suggested_donations’, ‘example_charitable_campaign_suggested_donations’, 10, 2 ); function example_charitable_campaign_suggested_donations( $value = array(), $campaign_object ) { if ( empty( $value ) ) { return; } /* $value is an array of suggested donations. It often looks like this by default: Array (…Continue reading
@ini_set( ‘upload_max_size’ , ‘256M’ ); @ini_set( ‘post_max_size’, ‘256M’); @ini_set( ‘max_execution_time’, ‘300’ );Continue reading
// Change OG title for Yoast on Vendor Pages function wcv_wpseo_change_og_title( $title ) { if ( WCV_Vendors::is_vendor_page() ) { $vendor_shop = urldecode( get_query_var( ‘vendor_shop’ ) ); $vendor_id = WCV_Vendors::get_vendor_id( $vendor_shop ); $shop_title = get_user_meta( $vendor_id, ‘pv_shop_name’, true ); $og_title =…Continue reading
add_filter( ‘simpay_payment_confirmation_template_tag_customer-name’, function( $value ) { if ( ” === $value ) { return ‘Donor’; } return $value; } );Continue reading
function custom_upload_mimes($existing_mimes) { // Hinzufügen oder Ändern von Dateitypen $existing_mimes[‘svg’] = ‘image/svg+xml’; $existing_mimes[‘woff’] = ‘application/font-woff’; $existing_mimes[‘woff2’] = ‘application/font-woff2’; $existing_mimes[‘eot’] = ‘application/vnd.ms-fontobject’; $existing_mimes[‘ttf’] = ‘application/x-font-ttf’; // Entfernen von Dateitypen unset( $existing_mimes[‘exe’] ); return $existing_mimes; } add_filter(‘upload_mimes’, ‘custom_upload_mimes’);Continue reading
/** * Setting Hero Block on Pages by default. * */ function awesome_register_page_template() { $post_type_object = get_post_type_object( ‘page’ ); $post_type_object->template = array( array( ‘core/pattern’, array( ‘slug’ => ‘frost/hero’, ) ), ); } add_action( ‘init’, ‘awesome_register_page_template’ );Continue reading
// Define a custom filter hook for the repeater field function customize_vendor_category_repeater($field) { // Initialize an array to hold only the valid subfields $valid_sub_fields = array(); // Get the selected vendors from the Relationship Field $selected_vendors = get_field(‘vendor_relationship’, false, false);…Continue reading
// Define a custom filter hook for the repeater field function customize_vendor_category_repeater($field) { // Initialize an array to hold only the valid subfields $valid_sub_fields = array(); // Get the selected vendors from the Relationship Field $selected_vendors = get_field(‘vendor_relationship’, false, false);…Continue reading
function my_acf_enqueue_scripts() { wp_enqueue_script(‘my-acf-dynamic-fields’, get_stylesheet_directory_uri() . ‘/js/acf-dynamic-fields.js’, array(‘acf-input’), null, true); wp_localize_script(‘my-acf-dynamic-fields’, ‘wpApiSettings’, array( ‘nonce’ => wp_create_nonce(‘wp_rest’), // Provide nonce for secure AJAX calls )); } add_action(‘acf/input/admin_enqueue_scripts’, ‘my_acf_enqueue_scripts’); // add_action(‘save_post’, ‘save_dynamic_acf_fields’, 10, 3); // function save_dynamic_acf_fields($post_id, $post, $update) { // //…Continue reading