| |
| <?php
|
|
|
| add_action( 'wpforms_entry_details_content', static function ( $entry, $form_data, $single_entry ) {
|
| $hook_name = 'wpforms_entry_details_content';
|
|
|
| remove_action( $hook_name, [ $single_entry, 'details_fields' ], 10 );
|
| remove_action( $hook_name, [ $single_entry, 'details_notes' ], 10 );
|
| remove_action( $hook_name, [ $single_entry, 'details_log' ], 40 );
|
| remove_action( $hook_name, [ $single_entry, 'details_debug' ], 50 );
|
|
|
| if ( ! function_exists( 'wpforms_geolocation' ) ) {
|
| return;
|
| }
|
|
|
| global $wp_filter;
|
|
|
|
|
| foreach ( $wp_filter[ $hook_name ]->callbacks as $priority => $callbacks ) {
|
| foreach ( $callbacks as $key => $callback ) {
|
| if (
|
| ! $callback['function'] instanceof \Closure &&
|
| $callback['function'][0] instanceof \WPForms_Geolocation &&
|
| $callback['function'][1] === 'entry_details_location'
|
| ) {
|
| unset( $wp_filter[ $hook_name ]->callbacks[ $priority ][ $key ] );
|
| }
|
| }
|
| }
|
| }, 0, 3 );
|
|
|
|
|
| add_action( 'wpforms_entry_details_sidebar', static function ( $entry, $form_data, $single_entry ) {
|
| remove_action( 'wpforms_entry_details_sidebar', [ $single_entry, 'details_meta' ], 10 );
|
| remove_action( 'wpforms_entry_details_sidebar', [ $single_entry, 'details_payment' ], 15 );
|
| remove_action( 'wpforms_entry_details_sidebar', [ $single_entry, 'details_actions' ], 20 );
|
| remove_action( 'wpforms_entry_details_sidebar', [ $single_entry, 'details_related' ], 20 );
|
| }, 0, 3 );
|
| |
| |
Comments