WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

ACF_Admin_Field_Groups::admin_footer__sync() public ACF 5.9.0

Customizes the admin table HTML when viewing "sync" post_status.

{} Это метод класса: ACF_Admin_Field_Groups{}

Хуков нет.

Возвращает

Массив.

Использование

$ACF_Admin_Field_Groups = new ACF_Admin_Field_Groups();
$ACF_Admin_Field_Groups->admin_footer__sync();

Список изменений

С версии 5.9.0 Введена.

Код ACF_Admin_Field_Groups::admin_footer__sync() ACF 5.10.2

<?php
public function admin_footer__sync() {
	global $wp_list_table;

	// Get table columns.
	$columns = $wp_list_table->get_columns();
	$hidden  = get_hidden_columns( $wp_list_table->screen );
	?>
<div style="display: none;">
<table>
	<tbody id="acf-the-list">
	<?php
	foreach ( $this->sync as $k => $field_group ) {
		echo '<tr>';
		foreach ( $columns as $column_name => $column_label ) {
			$el = 'td';
			if ( $column_name === 'cb' ) {
				$el           = 'th';
				$classes      = 'check-column';
				$column_label = '';
			} elseif ( $column_name === 'title' ) {
				$classes = "$column_name column-$column_name column-primary";
			} else {
				$classes = "$column_name column-$column_name";
			}
			if ( in_array( $column_name, $hidden, true ) ) {
				$classes .= ' hidden';
			}
			echo "<$el class=\"$classes\" data-colname=\"$column_label\">";
			switch ( $column_name ) {

				// Checkbox.
				case 'cb':
					echo '<label for="cb-select-' . esc_attr( $k ) . '" class="screen-reader-text">' . esc_html( sprintf( __( 'Select %s', 'acf' ), $field_group['title'] ) ) . '</label>';
					echo '<input id="cb-select-' . esc_attr( $k ) . '" type="checkbox" value="' . esc_attr( $k ) . '" name="post[]">';
					break;

				// Title.
				case 'title':
					$post_state = '';
					if ( ! $field_group['active'] ) {
						$post_state = ' — <span class="post-state">' . $this->get_disabled_post_state() . '</span>';
					}
					echo '<strong><span class="row-title">' . esc_html( $field_group['title'] ) . '</span>' . $post_state . '</strong>';
					echo '<div class="row-actions"><span class="file acf-secondary-text">' . $this->get_human_readable_file_location( $field_group['local_file'] ) . '</span></div>';
					echo '<button type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button>';
					break;

				// All other columns.
				default:
					$this->render_admin_table_column( $column_name, $field_group );
					break;
			}
			echo "</$el>";
		}
		echo '</tr>';
	}
	?>
	</tbody>
</table>
</div>
<script type="text/javascript">
(function($){
	$('#the-list').html( $('#acf-the-list').children() );
})(jQuery);
</script>
	<?php
}