Code Duplication    Length = 6-9 lines in 3 locations

includes/general.php 3 locations

@@ 458-463 (lines=6) @@
455
 */
456
function pods_help ( $text, $url = null ) {
457
458
	if ( ! wp_script_is( 'jquery-qtip2', 'registered' ) ) {
459
		wp_register_script( 'jquery-qtip2', PODS_URL . 'ui/js/jquery.qtip.min.js', array( 'jquery' ), '2.2' );
460
	}
461
	elseif ( ! wp_script_is( 'jquery-qtip2', 'queue' ) && ! wp_script_is( 'jquery-qtip2', 'to_do' ) && ! wp_script_is( 'jquery-qtip2', 'done' ) ) {
462
		wp_enqueue_script( 'jquery-qtip2' );
463
	}
464
465
	if ( ! wp_style_is( 'jquery-qtip2', 'registered' ) ) {
466
		wp_register_style( 'jquery-qtip2', PODS_URL . 'ui/css/jquery.qtip.min.css', array(), '2.2' );
@@ 465-470 (lines=6) @@
462
		wp_enqueue_script( 'jquery-qtip2' );
463
	}
464
465
	if ( ! wp_style_is( 'jquery-qtip2', 'registered' ) ) {
466
		wp_register_style( 'jquery-qtip2', PODS_URL . 'ui/css/jquery.qtip.min.css', array(), '2.2' );
467
	}
468
	elseif ( ! wp_style_is( 'jquery-qtip2', 'queue' ) && ! wp_style_is( 'jquery-qtip2', 'to_do' ) && ! wp_style_is( 'jquery-qtip2', 'done' ) ) {
469
		wp_enqueue_style( 'jquery-qtip2' );
470
	}
471
472
	if ( ! wp_script_is( 'pods-qtip-init', 'registered' ) ) {
473
		wp_register_script( 'pods-qtip-init', PODS_URL . 'ui/js/qtip.js', array(
@@ 472-480 (lines=9) @@
469
		wp_enqueue_style( 'jquery-qtip2' );
470
	}
471
472
	if ( ! wp_script_is( 'pods-qtip-init', 'registered' ) ) {
473
		wp_register_script( 'pods-qtip-init', PODS_URL . 'ui/js/qtip.js', array(
474
			'jquery',
475
			'jquery-qtip2'
476
		), PODS_VERSION );
477
	}
478
	elseif ( ! wp_script_is( 'pods-qtip-init', 'queue' ) && ! wp_script_is( 'pods-qtip-init', 'to_do' ) && ! wp_script_is( 'pods-qtip-init', 'done' ) ) {
479
		wp_enqueue_script( 'pods-qtip-init' );
480
	}
481
482
	if ( is_array( $text ) ) {
483
		if ( isset( $text[ 1 ] ) ) {