Code Duplication    Length = 6-6 lines in 2 locations

classes/PodsAdmin.php 2 locations

@@ 243-248 (lines=6) @@
240
                                $all_title = $plural_label;
241
                                $all_label = __( 'All', 'pods' ) . ' ' . $plural_label;
242
243
                                if ( $page == pods_var( 'page', 'get' ) ) {
244
                                    if ( 'edit' == pods_var( 'action', 'get', 'manage' ) )
245
                                        $all_title = __( 'Edit', 'pods' ) . ' ' . $singular_label;
246
                                    elseif ( 'add' == pods_var( 'action', 'get', 'manage' ) )
247
                                        $all_title = __( 'Add New', 'pods' ) . ' ' . $singular_label;
248
                                }
249
250
                                add_submenu_page( $parent_page, $all_title, $all_label, 'read', $page, array( $this, 'admin_content' ) );
251
                            }
@@ 298-303 (lines=6) @@
295
                            $all_title = $plural_label;
296
                            $all_label = __( 'Manage', 'pods' ) . ' ' . $plural_label;
297
298
                            if ( $page == pods_var( 'page', 'get' ) ) {
299
                                if ( 'edit' == pods_var( 'action', 'get', 'manage' ) )
300
                                    $all_title = __( 'Edit', 'pods' ) . ' ' . $singular_label;
301
                                elseif ( 'add' == pods_var( 'action', 'get', 'manage' ) )
302
                                    $all_title = __( 'Add New', 'pods' ) . ' ' . $singular_label;
303
                            }
304
305
                            add_submenu_page( $parent_page, $all_title, $all_label, 'read', $page, array( $this, 'admin_content' ) );
306
                        }