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/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

components/Pages.php 1 location

@@ 245-262 (lines=18) @@
242
     *
243
     * @since 2.0.5
244
     */
245
    public function remove_row_actions ( $actions, $post ) {
246
        global $current_screen;
247
248
        if ( !is_object( $current_screen ) || $this->object_type != $current_screen->post_type )
249
            return $actions;
250
251
        if ( isset( $actions[ 'view' ] ) )
252
            unset( $actions[ 'view' ] );
253
254
        if ( isset( $actions[ 'inline hide-if-no-js' ] ) )
255
            unset( $actions[ 'inline hide-if-no-js' ] );
256
257
        // W3 Total Cache
258
        if ( isset( $actions[ 'pgcache_purge' ] ) )
259
            unset( $actions[ 'pgcache_purge' ] );
260
261
        return $actions;
262
    }
263
264
    /**
265
     * Remove unused bulk actions