'#edit-slug-box', 'the_content' => '#postdivrich', 'excerpt' => '#postexcerpt', 'custom_fields' => '#postcustom', 'discussion' => '#commentstatusdiv', 'comments' => '#commentsdiv', 'slug' => '#slugdiv', 'author' => '#authordiv', 'format' => '#formatdiv', 'page_attributes' => '#pageparentdiv', 'featured_image' => '#postimagediv', 'revisions' => '#revisionsdiv', 'categories' => '#categorydiv', 'tags' => '#tagsdiv-post_tag', 'send-trackbacks' => '#trackbacksdiv', ); // Loop over field group settings and generate list of selectors to hide. if ( is_array( $field_group['hide_on_screen'] ) ) { $hide = array(); foreach ( $field_group['hide_on_screen'] as $k ) { if ( isset( $elements[ $k ] ) ) { $id = $elements[ $k ]; $hide[] = $id; $hide[] = '#screen-meta label[for=' . substr( $id, 1 ) . '-hide]'; } } $style = implode( ', ', $hide ) . ' {display: none;}'; } /** * Filters the generated CSS styles. * * @date 12/02/2014 * @since 5.0.0 * * @param string $style The CSS styles. * @param array $field_group The field group array. */ return apply_filters( 'acf/get_field_group_style', $style, $field_group ); } /** * acf_get_field_group_edit_link * * Checks if the current user can edit the field group and returns the edit url. * * @date 23/9/18 * @since 5.7.7 * * @param int $post_id The field group ID. * @return string */ function acf_get_field_group_edit_link( $post_id ) { return acf_get_internal_post_type_edit_link( $post_id, 'acf-field-group' ); } /** * acf_prepare_field_group_for_export * * Returns a modified field group ready for export. * * @date 11/03/2014 * @since 5.0.0 * * @param array $field_group The field group array. * @return array */ function acf_prepare_field_group_for_export( $field_group = array() ) { return acf_prepare_internal_post_type_for_export( $field_group, 'acf-field-group' ); } /** * acf_prepare_field_group_for_import * * Prepares a field group for the import process. * * @date 21/11/19 * @since 5.8.8 * * @param array $field_group The field group array. * @return array */ function acf_prepare_field_group_for_import( $field_group ) { return acf_prepare_internal_post_type_for_import( $field_group, 'acf-field-group' ); } /** * acf_import_field_group * * Imports a field group into the databse. * * @date 11/03/2014 * @since 5.0.0 * * @param array $field_group The field group array. * @return array The new field group. */ function acf_import_field_group( $field_group ) { return acf_import_internal_post_type( $field_group, 'acf-field-group' ); } /** * Returns an array of tabs for the field group settings. * We combine a list of default tabs with filtered tabs. * I.E. Default tabs should be static and should not be changed by the * filtered tabs. * * @since 6.1 * * @return array Key/value array of the default settings tabs for field group settings. */ function acf_get_combined_field_group_settings_tabs() { $default_field_group_settings_tabs = array( 'location_rules' => __( 'Location Rules', 'acf' ), 'presentation' => __( 'Presentation', 'acf' ), 'group_settings' => __( 'Group Settings', 'acf' ), ); $field_group_settings_tabs = (array) apply_filters( 'acf/field_group/additional_group_settings_tabs', array() ); // remove any default tab values from the filter tabs. foreach ( $field_group_settings_tabs as $key => $tab ) { if ( isset( $default_field_group_settings_tabs[ $key ] ) ) { unset( $field_group_settings_tabs[ $key ] ); } } $combined_field_group_settings_tabs = array_merge( $default_field_group_settings_tabs, $field_group_settings_tabs ); return $combined_field_group_settings_tabs; }