Code Duplication    Length = 5-5 lines in 2 locations

classes/Pods.php 1 location

@@ 4276-4280 (lines=5) @@
4273
					'view' => 'view',
4274
				);
4275
4276
				foreach ( $available_actions as $action ) {
4277
					if ( ! in_array( $action, $actions_enabled, true ) ) {
4278
						$actions_disabled[ $action ] = $action;
4279
					}
4280
				}
4281
			} else {
4282
				$actions_disabled = array(
4283
					'duplicate' => 'duplicate',

classes/PodsAdmin.php 1 location

@@ 3097-3101 (lines=5) @@
3094
						'view' => 'view',
3095
					);
3096
3097
					foreach ( $available_actions as $action ) {
3098
						if ( ! in_array( $action, $actions_enabled, true ) ) {
3099
							$actions_disabled[ $action ] = $action;
3100
						}
3101
					}
3102
3103
					if ( ! in_array( 'export', $actions_disabled, true ) ) {
3104
						$capabilities[] = 'pods_export_' . $pod['name'];