Code Duplication    Length = 6-9 lines in 3 locations

includes/general.php 3 locations

@@ 397-402 (lines=6) @@
394
 */
395
function pods_help ( $text, $url = null ) {
396
397
	if ( ! wp_script_is( 'jquery-qtip2', 'registered' ) ) {
398
		wp_register_script( 'jquery-qtip2', PODS_URL . 'ui/js/jquery.qtip.min.js', array( 'jquery' ), '2.2' );
399
	}
400
	elseif ( ! wp_script_is( 'jquery-qtip2', 'queue' ) && ! wp_script_is( 'jquery-qtip2', 'to_do' ) && ! wp_script_is( 'jquery-qtip2', 'done' ) ) {
401
		wp_enqueue_script( 'jquery-qtip2' );
402
	}
403
404
	if ( ! wp_style_is( 'jquery-qtip2', 'registered' ) ) {
405
		wp_register_style( 'jquery-qtip2', PODS_URL . 'ui/css/jquery.qtip.min.css', array(), '2.2' );
@@ 404-409 (lines=6) @@
401
		wp_enqueue_script( 'jquery-qtip2' );
402
	}
403
404
	if ( ! wp_style_is( 'jquery-qtip2', 'registered' ) ) {
405
		wp_register_style( 'jquery-qtip2', PODS_URL . 'ui/css/jquery.qtip.min.css', array(), '2.2' );
406
	}
407
	elseif ( ! wp_style_is( 'jquery-qtip2', 'queue' ) && ! wp_style_is( 'jquery-qtip2', 'to_do' ) && ! wp_style_is( 'jquery-qtip2', 'done' ) ) {
408
		wp_enqueue_style( 'jquery-qtip2' );
409
	}
410
411
	if ( ! wp_script_is( 'pods-qtip-init', 'registered' ) ) {
412
		wp_register_script( 'pods-qtip-init', PODS_URL . 'ui/js/qtip.js', array(
@@ 411-419 (lines=9) @@
408
		wp_enqueue_style( 'jquery-qtip2' );
409
	}
410
411
	if ( ! wp_script_is( 'pods-qtip-init', 'registered' ) ) {
412
		wp_register_script( 'pods-qtip-init', PODS_URL . 'ui/js/qtip.js', array(
413
			'jquery',
414
			'jquery-qtip2'
415
		), PODS_VERSION );
416
	}
417
	elseif ( ! wp_script_is( 'pods-qtip-init', 'queue' ) && ! wp_script_is( 'pods-qtip-init', 'to_do' ) && ! wp_script_is( 'pods-qtip-init', 'done' ) ) {
418
		wp_enqueue_script( 'pods-qtip-init' );
419
	}
420
421
	if ( is_array( $text ) ) {
422
		if ( isset( $text[ 1 ] ) ) {