<?php add_filter( 'af/form/editing/post_data', function ( $post_data, $form, $args ) { // Check if this is the correct form. If not, return the post data as is. if ( $form['key'] !== '{YOUR_FORM_KEY}' ) { return $post_data; } // Set the post excerpt $post_data['post_name'] = sanitize_title( $post_data['post_title'] ); return $post_data; }, 10, 3 );
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article