= 5.3 ) { $classes .= ' acf-admin-5-3'; } else { $classes .= ' acf-admin-3-8'; } // Add browser for specific CSS. $classes .= ' acf-browser-' . acf_get_browser(); // Return classes. return $classes; } /** * Adds custom functionality to "ACF" admin pages. * * @date 7/4/20 * @since 5.9.0 * * @param void * @return void */ function current_screen( $screen ) { // Determine if the current page being viewed is "ACF" related. if ( isset( $screen->post_type ) && $screen->post_type === 'acf-field-group' ) { add_action( 'in_admin_header', array( $this, 'in_admin_header' ) ); add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ) ); $this->setup_help_tab(); } } /** * Sets up the admin help tab. * * @date 20/4/20 * @since 5.9.0 * * @param void * @return void */ public function setup_help_tab() { $screen = get_current_screen(); // Overview tab. $screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview', 'acf' ), 'content' => '
' . __( 'Overview', 'acf' ) . '
' . '' . __( 'The Advanced Custom Fields plugin provides a visual form builder to customize WordPress edit screens with extra fields, and an intuitive API to display custom field values in any theme template file.', 'acf' ) . '
' . '' . sprintf( __( 'Before creating your first Field Group, we recommend first reading our Getting started guide to familiarize yourself with the plugin\'s philosophy and best practises.', 'acf' ), 'https://www.advancedcustomfields.com/resources/getting-started-with-acf/' ) . '
' . '' . __( 'Please use the Help & Support tab to get in touch should you find yourself requiring assistance.', 'acf' ) . '
' . '', ) ); // Help tab. $screen->add_help_tab( array( 'id' => 'help', 'title' => __( 'Help & Support', 'acf' ), 'content' => '' . __( 'Help & Support', 'acf' ) . '
' . '' . __( 'We are fanatical about support, and want you to get the best out of your website with ACF. If you run into any difficulties, there are several places you can find help:', 'acf' ) . '
' . '' . __( 'Information', 'acf' ) . '
' . '' . sprintf( __( 'Version %s', 'acf' ), ACF_VERSION ) . '
' . '' . '' . '' ); } /** * Renders the admin navigation element. * * @date 27/3/20 * @since 5.9.0 * * @param void * @return void */ function in_admin_header() { acf_get_view( 'html-admin-navigation' ); } /** * Modifies the admin footer text. * * @date 7/4/20 * @since 5.9.0 * * @param string $text The admin footer text. * @return string */ function admin_footer_text( $text ) { // Use RegExp to append "ACF" after the element allowing translations to read correctly. return preg_replace( '/()/', '$1 ' . __( 'and', 'acf' ) . ' ACF', $text, 1 ); } } // Instantiate. acf_new_instance( 'ACF_Admin' ); endif; // class_exists check