redirection_redirect_updated

redirection_redirect_updated

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: redirection.5.5.2

do_action('redirection_redirect_updated') is found 2 times:

  • /models/redirect/redirect.php line 510
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
        Red_Module::flush( $data['group_id'] );
     
        $redirect = self::get_by_id( $wpdb->insert_id );
        if ( $redirect ) {
            do_action( 'redirection_redirect_updated', $wpdb->insert_id, $redirect );
     
            return $redirect;
        }
     
        return new WP_Error( 'redirect_create_failed', 'Unable to get newly added redirect' );
    }
  • /models/redirect/redirect.php line 550
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    }
     
    $result = $wpdb->update( $wpdb->prefix . 'redirection_items', $data, array( 'id' => $this->id ) );
    if ( $result !== false ) {
        do_action( 'redirection_redirect_updated', $this, self::get_by_id( $this->id ) );
        $this->load_from_data( $data );
     
        Red_Module::flush( $this->group_id );
     
        if ( $old_group !== $this->group_id && $old_group !== false ) {
            Red_Module::flush( $old_group );

See this hook used in plugins: