edit_form_before_permalink
Action HookDescription
Fires before the permalink field in the edit form.Hook Information
| File Location | 
                                wp-admin/edit-form-advanced.php
                                
                                    View on GitHub
                                
                             | 
                        
| Hook Type | Action | 
| Line Number | 558 | 
                        
Hook Parameters
| Type | Name | Description | 
|---|---|---|
                                    WP_Post
                                 | 
                                
                                    $post
                                 | 
                                Post object. | 
Usage Examples
                        Basic Usage
                    
                    <?php
// Hook into edit_form_before_permalink
add_action('edit_form_before_permalink', 'my_custom_function', 10, 1);
function my_custom_function($post) {
    // Your custom code here
}
                        
                    Source Code Context
                        wp-admin/edit-form-advanced.php:558
                        - How this hook is used in WordPress core
                    
                    <?php
 553  	 *
 554  	 * @since 4.1.0
 555  	 *
 556  	 * @param WP_Post $post Post object.
 557  	 */
 558  	do_action( 'edit_form_before_permalink', $post );
 559  	?>
 560  <div class="inside">
 561  	<?php
 562  	if ( $viewable ) :
 563  		$sample_permalink_html = $post_type_object->public ? get_sample_permalink_html( $post->ID ) : '';
                    PHP Documentation
<?php
/**
	 * Fires before the permalink field in the edit form.
	 *
	 * @since 4.1.0
	 *
	 * @param WP_Post $post Post object.
	 */
                
            
                        Quick Info
                    
                    - Hook Type: Action
 - Parameters: 1
 - File: wp-admin/edit-form-advanced.php
 
                        Related Hooks
                    
                    Related hooks will be displayed here in future updates.