'; $add_scr_desc .= __( 'Help to make this plugin even better. Please follow the link to ' ); $add_scr_desc .= sprintf( '%2$s %3$s', esc_url( __( 'https://wordpress.org/support/plugin/additional-script' ) ), __( 'Contribute / Donate' ), __( '(opens in a new window)' ) ); $add_scr_desc .= '
'; $add_scr_desc .= ''; $add_scr_desc .= __( ' Give me a chance to appreciate your Rating and a nice little comment ' ); $add_scr_desc .= sprintf( '%2$s %3$s', esc_url( __( 'https://wordpress.org/support/plugin/additional-script/reviews/?rate=5#new-post' ) ), __( 'Rate 5 Stars' ), __( '(opens in a new window)' ) ); $add_scr_desc .= '
'; $wp_customize->add_section( 'add_scr_section', array( 'title' => __( 'Additional Script', 'twentyseventeen-child' ), 'priority' => 255, 'description' => $add_scr_desc ) ); add_scr_custom_sections( $wp_customize ); } function add_scr_custom_sections( $wp_customize ) { $wp_customize->add_setting ( 'script-head-code', array () ); $no_script_reqd = ''; $no_script_reqd .= __( 'No need to add script tags.' ); $no_script_reqd .= ''; $wp_customize->add_control (new WP_Customize_Control ( $wp_customize, 'script-head-code', array ( 'label' => 'Head JS Code', 'section' => 'add_scr_section', 'settings' => 'script-head-code', 'type' => 'textarea', 'priority' => 1, 'description' => $no_script_reqd ) ) ); $wp_customize->add_setting ( 'script-footer-code', array () ); $wp_customize->add_control (new WP_Customize_Control ( $wp_customize, 'script-footer-code', array ( 'label' => 'Footer JS Code', 'section' => 'add_scr_section', 'settings' => 'script-footer-code', 'type' => 'textarea', 'priority' => 2, 'description' => $no_script_reqd ) ) ); } add_action( 'wp_head', 'add_scr_insert_head_js' ); function add_scr_insert_head_js() { ?>