Code Duplication    Length = 11-11 lines in 3 locations

classes/PodsUI.php 3 locations

@@ 714-724 (lines=11) @@
711
            else
712
                $options[ 'where' ] = array( 'manage' => $deprecated_options[ 'where' ] );
713
        }
714
        if ( isset( $deprecated_options[ 'edit_where' ] ) ) {
715
            /*if ( isset( $options[ 'where' ] ) )
716
                $options[ 'where' ][ 'edit' ] = $deprecated_options[ 'edit_where' ];
717
            else
718
                $options[ 'where' ] = array( 'edit' => $deprecated_options[ 'edit_where' ] );*/
719
720
            if ( isset( $options[ 'restrict' ] ) )
721
                $options[ 'restrict' ][ 'edit' ] = (array) $deprecated_options[ 'edit_where' ];
722
            else
723
                $options[ 'restrict' ] = array( 'edit' => (array) $deprecated_options[ 'edit_where' ] );
724
        }
725
        if ( isset( $deprecated_options[ 'duplicate_where' ] ) ) {
726
            /*if ( isset( $options[ 'where' ] ) )
727
                $options[ 'where' ][ 'duplicate' ] = $deprecated_options[ 'duplicate_where' ];
@@ 725-735 (lines=11) @@
722
            else
723
                $options[ 'restrict' ] = array( 'edit' => (array) $deprecated_options[ 'edit_where' ] );
724
        }
725
        if ( isset( $deprecated_options[ 'duplicate_where' ] ) ) {
726
            /*if ( isset( $options[ 'where' ] ) )
727
                $options[ 'where' ][ 'duplicate' ] = $deprecated_options[ 'duplicate_where' ];
728
            else
729
                $options[ 'where' ] = array( 'duplicate' => $deprecated_options[ 'duplicate_where' ] );*/
730
731
            if ( isset( $options[ 'restrict' ] ) )
732
                $options[ 'restrict' ][ 'duplicate' ] = (array) $deprecated_options[ 'duplicate_where' ];
733
            else
734
                $options[ 'restrict' ] = array( 'duplicate' => (array) $deprecated_options[ 'duplicate_where' ] );
735
        }
736
        if ( isset( $deprecated_options[ 'delete_where' ] ) ) {
737
            /*if ( isset( $options[ 'where' ] ) )
738
                $options[ 'where' ][ 'delete' ] = $deprecated_options[ 'delete_where' ];
@@ 736-746 (lines=11) @@
733
            else
734
                $options[ 'restrict' ] = array( 'duplicate' => (array) $deprecated_options[ 'duplicate_where' ] );
735
        }
736
        if ( isset( $deprecated_options[ 'delete_where' ] ) ) {
737
            /*if ( isset( $options[ 'where' ] ) )
738
                $options[ 'where' ][ 'delete' ] = $deprecated_options[ 'delete_where' ];
739
            else
740
                $options[ 'where' ] = array( 'delete' => $deprecated_options[ 'delete_where' ] );*/
741
742
            if ( isset( $options[ 'restrict' ] ) )
743
                $options[ 'restrict' ][ 'delete' ] = (array) $deprecated_options[ 'delete_where' ];
744
            else
745
                $options[ 'restrict' ] = array( 'delete' => (array) $deprecated_options[ 'delete_where' ] );
746
        }
747
        if ( isset( $deprecated_options[ 'reorder_where' ] ) ) {
748
            if ( isset( $options[ 'where' ] ) )
749
                $options[ 'where' ][ 'reorder' ] = $deprecated_options[ 'reorder_where' ];