bitrix/templates/НАЗВАНИЕ_ШАБЛОНА_САЙТА/components/bitrix/catalog.element/НАЗВАНИЕ_ШАБЛОНА_СТРАНИЦЫ ТОВАРА/template.php
var arSpan = [], arSpan2 = [], arSpan3 = [];
$("#dRoles select").val('');
$("#dRoles select").change(function()
{
arSpan.push($(this).parent().attr('id'));
$('#res').html(arSpan.join());
arSpan2.push($(this).val());
$('#res2').html(arSpan2.join());
arSpan3.push($(this).find('option:selected' ).text());
$('#res3').html(arSpan3.join());
});
require_once(JPATH_SITE.'/libraries/phpmailer/phpmailer.php');
$mail = new PHPMailer;
$sender = array($call_email, JText::_('modcallback_title'));
$mail->isSMTP();
$mail->SMTPDebug = 0;
$mail->Host = 'ssl://smtp.yandex.ru';
$mail->Port = 465;
$mail->SMTPSecure = 'SSL';
$mail->SMTPAuth = true;
$mail->Username = $call_email;
$mail->Password = "";// Пароль
$mail->setFrom($sender);
$mail->addReplyTo($sender);
$mail->addAddress($sender);
$mail->Subject = 'subjec't;
$mail->Body = 'Body';
return $mail->send();
$mhSmtpMail_Server = "ssl://smtp.yandex.ru";
<?php
// args
$args = array(
'numberposts' => -1,
'post_type' => 'event',
'meta_key' => 'location',
'meta_value' => 'Melbourne'
);
// query
$the_query = new WP_Query( $args );
?>
<?php if( $the_query->have_posts() ): ?>
<ul>
<?php while( $the_query->have_posts() ) : $the_query->the_post(); ?>
<li>
<a href="<?php the_permalink(); ?>">
<img src="<?php the_field('event_thumbnail'); ?>" />
<?php the_title(); ?>
</a>
</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
<?php wp_reset_query(); // Restore global post data stomped by the_post(). ?>
// Отключаем сам REST API
add_filter('rest_enabled', '__return_false');
// Отключаем фильтры REST API
remove_action( 'xmlrpc_rsd_apis', 'rest_output_rsd' );
remove_action( 'wp_head', 'rest_output_link_wp_head', 10, 0 );
remove_action( 'template_redirect', 'rest_output_link_header', 11, 0 );
remove_action( 'auth_cookie_malformed', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_expired', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_bad_username', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_bad_hash', 'rest_cookie_collect_status' );
remove_action( 'auth_cookie_valid', 'rest_cookie_collect_status' );
remove_filter( 'rest_authentication_errors', 'rest_cookie_check_errors', 100 );
// Отключаем события REST API
remove_action( 'init', 'rest_api_init' );
remove_action( 'rest_api_init', 'rest_api_default_filters', 10, 1 );
remove_action( 'parse_request', 'rest_api_loaded' );
// Отключаем Embeds связанные с REST API
remove_action( 'rest_api_init', 'wp_oembed_register_route' );
remove_filter( 'rest_pre_serve_request', '_oembed_rest_pre_serve_request', 10, 4 );
много кто знает-вот и ответ