register_section_type( 'Ti_Notify' ); $wp_customize->add_section( new Ti_Notify( $wp_customize, 'ti-notify', array( /* translators: Link to the recommended theme */ 'text' => sprintf( __( 'This theme is not maintained anymore, check-out our latest free one-page theme: %1$s.','constructisle' ), sprintf( '%s', 'Hestia' ) ), 'priority' => 0, ) ) ); $wp_customize->add_setting( 'constructisle-notify', array( 'sanitize_callback' => 'esc_html', ) ); $wp_customize->add_control( 'constructisle-notify', array( 'label' => __( 'Notification', 'constructisle' ), 'section' => 'ti-notify', 'priority' => 1, ) ); } add_action( 'customize_register', 'constructisle_customize_register' ); /** * Notice in admin dashboard to announce the theme is not maintained anymore */ function constructisle_admin_notice() { global $pagenow; if ( is_admin() && ( 'themes.php' == $pagenow ) && isset( $_GET['activated'] ) ) { echo '

'; printf( /* translators: link to the recommended theme */ __( 'This theme is not maintained anymore, check-out our latest free one-page theme: %1$s.','constructisle' ), sprintf( '%s', 'Hestia' ) ); echo '

'; } } add_action( 'admin_notices', 'constructisle_admin_notice', 99 );