Code Duplication    Length = 2-3 lines in 4 locations

classes/PodsUI.php 4 locations

@@ 1605-1607 (lines=3) @@
1602
			return null;
1603
		}
1604
1605
		if ( $this->restricted( $this->action ) ) {
1606
			return $this->error( sprintf( __( '<strong>Error:</strong> You do not have access to this %s.', 'pods' ), $this->item ) );
1607
		}
1608
		?>
1609
		<div class="wrap pods-ui">
1610
			<div id="icon-edit-pages" class="icon32"
@@ 1662-1664 (lines=3) @@
1659
			return null;
1660
		}
1661
1662
		if ( $this->restricted( $this->action ) ) {
1663
			return $this->error( sprintf( __( '<strong>Error:</strong> You do not have access to this %s.', 'pods' ), $this->item ) );
1664
		}
1665
		?>
1666
		<div class="wrap pods-ui">
1667
			<div id="icon-edit-pages" class="icon32"
@@ 1752-1753 (lines=2) @@
1749
				return $this->error( sprintf( __( '<strong>Error:</strong> %s not found.', 'pods' ), $this->item ) );
1750
			}
1751
1752
			if ( $this->restricted( $this->action, $this->row ) ) {
1753
				return $this->error( sprintf( __( '<strong>Error:</strong> You do not have access to this %s.', 'pods' ), $this->item ) );
1754
			}
1755
1756
			$label = $this->do_template( $this->label['edit'] );
@@ 1781-1783 (lines=3) @@
1778
				$alt_vars['action'] = 'manage';
1779
				unset( $alt_vars['id'] );
1780
			}
1781
		} elseif ( $this->restricted( $this->action, $this->row ) ) {
1782
			return $this->error( sprintf( __( '<strong>Error:</strong> You do not have access to this %s.', 'pods' ), $this->item ) );
1783
		}//end if
1784
1785
		$fields = array();
1786