^(.{0,7})\r\n|^([0-9]{8})\r\n
<?php if ( $query->found_posts < 3 ) : ?>
<?php else : ?>
<?php endif; ?>
function add_contact_info( $wp_customize ) {
$wp_customize->add_section( 'contact_info', array(
'title' => 'Контактная информация',
'description' => 'Редактирование контактных данных',
'priority' => 20
) );
$wp_customize->add_setting( 'contact_info_phone', array(
'default' => '',
'transport' => 'refresh'
) );
$wp_customize->add_control(
new WP_Customize_Control(
$wp_customize,
'contact_info_phone',
array(
'label' => 'Контактный телефон',
'section' => 'contact_info',
'type' => 'tel'
)
)
);
}
<?php echo get_theme_mod( 'contact_info_phone' ); ?>
foreach ($history_tables as $history_table) {
//если данного менеджера еще нет в массиве, создаем его
$manager_id = $history_table['manager_id'];
if (!isset($data['history_tables'][$manager_id])) {
$data['history_tables'][$manager_id] = array();
}
$data['history_tables'][$manager_id][] = array(
'date' => $history_table['date'],
'text' => $history_table['text'],
'manager' => $history_table['manager'],
'manager_id' => $history_table['manager_id'],
'status' => $history_table['status']
);
}
<?php
$str = "Яблоко, Апельсин, <br>Киви, <u>Молоко</u>, <a src='//'>ссылка</a>";
echo strip_tags($str);