function sync_acf_post_title($post_id, $post, $update) { $acf_name = get_field(‘name’, $post_id); // Get the value of the “name” ACF field $acf_vorname = get_field(‘vorname’, $post_id); // Get the value of the “vorname” ACF field $post_type = get_post_type($post_id); if ($acf_name && $post_type === “mitarbeiterinnen”)…Continue reading
//* Hide this administrator account from the users list add_action(‘pre_user_query’,’site_pre_user_query’); function site_pre_user_query($user_search) { global $current_user; $username = $current_user->user_login; if ($username == ‘mediAdmin’) { } else { global $wpdb; $user_search->query_where = str_replace(‘WHERE 1=1’, “WHERE 1=1 AND {$wpdb->users}.user_login != ‘mediAdmin’”,$user_search->query_where); } }Continue reading
// associate a buddyboss group with a product function set_ox_subs_group_id($product_id,$group_id) { //create_new_oxsubs($product_id,$group_id); // add_post_meta( int $post_id, string $meta_key, mixed $meta_value, bool $unique = false ): int|false add_post_meta($product_id,’_social_group_id’, $group_id); return; }Continue reading
add_filter(‘the_generator’, ‘__return_empty_string’);Continue reading
add_filter( ‘login_head’, function () { // Update the line below with the URL to your own logo. // Adjust the Width & Height accordingly. $custom_logo = ‘https://wpcode.com/wp-admin/images/wordpress-logo.svg’; $logo_width = 84; $logo_height = 84; printf( ‘ ‘, $custom_logo, $logo_width, $logo_height );…Continue reading
// Disable core auto-updates add_filter( ‘auto_update_core’, ‘__return_false’ ); // Disa add_filter( ‘auto_update_theme’,Continue reading
/** * @link https://library.wpcode.com/snippet/e5wnp95d/ */ add_filter( ‘simpay_get_paymentintent_args_from_payment_form_request’, /** * @param array $paymentintent_args Arguments for PaymentIntent. * @param SimplePay\Core\Abstracts\Form $form Form instance. * @param array $form_data Form data generated by the client. * @param array $form_values Values of named fields in…Continue reading
/** * @link https://library.wpcode.com/snippet/ro8wgkow/ */ add_action( ‘simpay_before_payment_create’, /** * @param \WP_REST_Request WordPress REST API request. */ function( $request ) { // “Stripe Metadata Label” of the custom field. $custom_field_name = ‘Customer DOB’; // Retrieve form values. $fields = $request->get_param( ‘form_values’…Continue reading