id ) ) { if ( strpos( $screen->id, 'acfcs' ) !== false ) { // @TODO: better rendering $on_this_page = esc_html__( 'On this page you can import cities by either CSV file or raw (pasted) CSV data.', 'acf-city-selector' ); $field_info = '
' . esc_html__( 'The required order is "City,State code,State,Country code,Country".', 'acf-city-selector' ) . '
| ' . esc_html__( 'Field', 'acf-city-selector' ) . ' | ' . esc_html__( 'What to enter', 'acf-city-selector' ) . ' | ' . esc_html__( 'Note', 'acf-city-selector' ) . ' |
|---|---|---|
| ' . esc_html__( 'City', 'acf-city-selector' ) . ' | ' . esc_html__( 'full name', 'acf-city-selector' ) . ' | |
| ' . esc_html__( 'State code', 'acf-city-selector' ) . ' | ' . esc_html__( 'state abbreviation', 'acf-city-selector' ) . ' | ' . esc_html__( 'max 3 characters', 'acf-city-selector' ) . ' |
| ' . esc_html__( 'State', 'acf-city-selector' ) . ' | ' . esc_html__( 'full state name', 'acf-city-selector' ) . ' | |
| ' . esc_html__( 'Country code', 'acf-city-selector' ) . ' | ' . esc_html__( 'country abbreviation', 'acf-city-selector' ) . ' | ' . esc_html__( 'exactly 2 characters', 'acf-city-selector' ) . ' |
| ' . esc_html__( 'Country', 'acf-city-selector' ) . ' | ' . esc_html__( 'full country name', 'acf-city-selector' ) . ' |
' . $on_this_page . '
' . esc_html__( 'You can only upload *.csv files.', 'acf-city-selector' ) . '
' . $field_info ) ); $screen->add_help_tab( array( 'id' => 'import-raw', 'title' => esc_html__( 'Import raw CSV data', 'acf-city-selector' ), 'content' => sprintf( '' . $on_this_page . '
' . esc_html__( 'Raw CSV data has to be formatted (and ordered) in a certain way, otherwise it won\'t work.', 'acf-city-selector' ) . '
' . $field_info ) ); $screen->add_help_tab( array( 'id' => 'preview-data', 'title' => esc_html__( 'Preview CSV data', 'acf-city-selector' ), 'content' => sprintf( '' . esc_html__( 'On the preview page, you can preview uploaded csv files. Not to be confused with search where you can search imported cities. Please keep in mind, if you preview an uploaded csv file, the file will get verified and it can be deleted if it contains errors.', 'acf-city-selector' ) . '
' ) ); $screen->add_help_tab( array( 'id' => 'search-data', 'title' => esc_html__( 'Search CSV data', 'acf-city-selector' ), 'content' => '' . esc_html__( 'On the search page, you can search in imported cities. Not to be confused with preview where you can preview uploaded csv files.', 'acf-city-selector' ) . '
' ) ); $screen->add_help_tab( array( 'id' => 'more-countries', 'title' => esc_html__( 'More countries', 'acf-city-selector' ), 'content' => sprintf( '' . sprintf( __( 'If you need more countries, you can get them on the official website: %s.', 'acf-city-selector' ), 'acf-city-selector.com' ) . '
' ) ); get_current_screen()->set_help_sidebar( '' . esc_html__( 'Official website', 'acf-city-selector' ) . '
' ); } } return false; } add_action( 'current_screen', 'acfcs_help_tabs' );