Code Duplication    Length = 18-18 lines in 3 locations

components/Helpers.php 1 location

@@ 173-190 (lines=18) @@
170
     *
171
     * @since 2.0.5
172
     */
173
    function remove_row_actions ( $actions, $post ) {
174
        global $current_screen;
175
176
        if ( !is_object( $current_screen ) || $this->object_type != $current_screen->post_type )
177
            return $actions;
178
179
        if ( isset( $actions[ 'view' ] ) )
180
            unset( $actions[ 'view' ] );
181
182
        if ( isset( $actions[ 'inline hide-if-no-js' ] ) )
183
            unset( $actions[ 'inline hide-if-no-js' ] );
184
185
        // W3 Total Cache
186
        if ( isset( $actions[ 'pgcache_purge' ] ) )
187
            unset( $actions[ 'pgcache_purge' ] );
188
189
        return $actions;
190
    }
191
192
    /**
193
     * Remove unused bulk actions

components/Pages.php 1 location

@@ 222-239 (lines=18) @@
219
     *
220
     * @since 2.0.5
221
     */
222
    public function remove_row_actions ( $actions, $post ) {
223
        global $current_screen;
224
225
        if ( !is_object( $current_screen ) || $this->object_type != $current_screen->post_type )
226
            return $actions;
227
228
        if ( isset( $actions[ 'view' ] ) )
229
            unset( $actions[ 'view' ] );
230
231
        if ( isset( $actions[ 'inline hide-if-no-js' ] ) )
232
            unset( $actions[ 'inline hide-if-no-js' ] );
233
234
        // W3 Total Cache
235
        if ( isset( $actions[ 'pgcache_purge' ] ) )
236
            unset( $actions[ 'pgcache_purge' ] );
237
238
        return $actions;
239
    }
240
241
    /**
242
     * Remove unused bulk actions

components/Templates/Templates.php 1 location

@@ 216-233 (lines=18) @@
213
	 *
214
	 * @since 2.0.5
215
	 */
216
	function remove_row_actions ( $actions, $post ) {
217
		global $current_screen;
218
219
		if ( !is_object( $current_screen ) || $this->object_type != $current_screen->post_type )
220
			return $actions;
221
222
		if ( isset( $actions[ 'view' ] ) )
223
			unset( $actions[ 'view' ] );
224
225
		if ( isset( $actions[ 'inline hide-if-no-js' ] ) )
226
			unset( $actions[ 'inline hide-if-no-js' ] );
227
228
		// W3 Total Cache
229
		if ( isset( $actions[ 'pgcache_purge' ] ) )
230
			unset( $actions[ 'pgcache_purge' ] );
231
232
		return $actions;
233
	}
234
235
	/**
236
	 * Remove unused bulk actions