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
add_filter( ‘http_request_args’, ‘aioseo_filter_analyzer_timeout’, 1, 2 ); function aioseo_filter_analyzer_timeout( $args, $url ) { if ( ‘https://analyze.aioseo.com/v1/analyze/’ === $url ) { $args[‘timeout’] = 120; } return $args; – }Continue reading
// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading
// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading
// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading
// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading