@set "COMPOSER_CACHE_DIR=%PHP_DIR%..\..\..\userdata\composer\cache"
@set "COMPOSER_HOME=%PHP_DIR%..\..\..\userdata\composer"
@set "COMPOSER_CAFILE=%PHP_DIR%..\..\..\userdata\config\cacert.pem"
@"%PHP_BIN%" -d output_buffering=0 "%PHP_DIR%..\..\..\userdata\composer\composer.phar" %*
function disable_content_editor()
{
if (isset($_GET['post'])) {
$post_ID = $_GET['post'];
} else if (isset($_POST['post_ID'])) {
$post_ID = $_POST['post_ID'];
}
if (!isset($post_ID) || empty($post_ID)) {
return;
}
/*
* Полностью отключить редактор WordPress для страницы с определённым ID (в нашем примере с ID = 15)
*/
if ($post_ID == 15) {
remove_post_type_support('page', 'editor');
}
/*
* Отключить возможность редактирования для всех страниц (т.е. для всех постов с типом "страница")
*/
$post_type = get_post_type($post_ID);
if ($post_type == 'page') {
return false;
}
/*
* Отключить возможность редактирования для страниц с ID 16, 25 и 30 (для случаев, когда нужно отключить редактор сразу для нескольких страниц)
*/
$disabled_IDs = array(16, 25, 30);
if (in_array($post_ID, $disabled_IDs)) {
remove_post_type_support('page', 'editor');
}
/*
* Скрыть редактор ВордПресс на страницах с определённым шаблоном (!!!ВНИМАНИЕ!!! указывать нужно не название шаблона, а имя его файла, например my_page_template.php)
*/
$page_template = get_post_meta($post_ID, '_wp_page_template', true);
if ($page_template == 'my_page_template.php') {
remove_post_type_support('page', 'editor');
}
}
add_action('admin_init', 'disable_content_editor');
<?php if( have_rows('repeater_field_name') ): ?>
<?php $i = 1; while ( have_rows('repeater_field_name') ) : the_row(); ?>
<?php the_sub_field('sub_field_name'); ?>
<p>ID <?php=$i; ?></p>
<?php $i++; endwhile; ?>
<?php else : ?>
<?php endif; ?>
This will happen if the table contains an existing record with an id of 0 (or negative). Updating all existing records to use positive values will allow auto_increment to be set on that column.
Edit: Some people asked how that 0 got in there. For clarification, the MySQL Reference Manual states that "For numeric types, the default is 0, with the exception that for integer or floating-point types declared with the AUTO_INCREMENT attribute, the default is the next value in the sequence." So, if you performed an insert on a table without providing a value for the numeric column before the auto_increment was enabled, then the default 0 would be used during the insert. More details may be found at https://dev.mysql.com/doc/refman/5.0/en/data-type-....
<g style="clip-path:url(#id0)">
и т.д. Это весь код и никаких #id0 и т.д. не существует и, если убрать теги этих групп и оставить только
<image />
, то ничего не изменится.Доберусь до компа и попробую вариант с base64 от IvanU7n. Или есть ещё какие-то варианты?