|
1 2 3 4 |
function wpb_remove_version() { return ''; } add_filter('the_generator', 'wpb_remove_version'); |
|
1 2 3 4 |
function wpb_remove_version() { return ''; } add_filter('the_generator', 'wpb_remove_version'); |
|
1 |
[contact-form-7 id="4" html_class="js-form" title="Контактная форма"] |
|
1 2 3 4 5 6 7 8 |
<?php //Если Вы хотите добавить свой атрибут class ко всем формам на сайте необходимо добавить в function.php add_filter( 'wpcf7_form_class_attr', 'custom_custom_form_class_attr' ); function custom_custom_form_class_attr( $class ) { $class .= ' your-class'; return $class; } ?> |
|
1 |
<meta name="format-detection" content="telephone=no"> |
|
1 2 3 4 |
<?php $translations = pll_the_languages(array('raw'=>1)); ?> <? if ($translations["ru"]["current_lang"] == true): ?> <? endif;?> |
|
1 2 3 4 5 6 7 8 9 10 11 |
$.ajax({ type: 'get', url: 'https://old.bank.gov.ua/NBUStatService/v1/statdirectory/exchange?date='+output+'&json', dataType: 'json', data: [], success: function(data) { //console.log(data); $('.pocent .usd').text(data[27].rate); } }); }); |
|
1 2 3 4 5 6 7 |
var d = new Date(); var month = d.getMonth()+1; var day = d.getDate(); var output = d.getFullYear()+ ((''+month).length<2 ? '0' : '') + month + ((''+day).length<2 ? '0' : '') + day; //console.log(output); |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<?php if($_POST['submit']) { $title = substr(htmlspecialchars(trim($_POST['title'])), 0, 1000); $mess = substr(htmlspecialchars(trim($_POST['mess'])), 0, 1000000); $to = 'test@test.ru'; $from='test@test.ru'; mail($to, $title, $mess, 'From:'.$from); echo 'Спасибо! Ваше письмо отправлено.'; } ?> <form action="" method="post"> <div align="center"> Teма <input name="title" size="40" type="text" /> Сообщение<textarea cols="40" name="mess" rows="10"></textarea><input name="submit" type="submit" value="Отправить" /></div> </form> |
|
1 2 3 4 5 6 7 8 9 10 11 |
switch ( rand(0,2) ) { case 0: echo "<a href=\"#\"><img src='img/img1.jpg' ></a>"; break; case 1: echo "<a href=\"#\"><img src='img/img2.jpg' ></a>"; break; case 2: echo "<a href=\"#\"><img src='img/img3.jpg' ></a>"; break; } |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
var count = 0; $(function() { updateCount(); $('input[type=checkbox]').change(function() { updateCount(this.checked ? 1 : -1); }); $('#invert').click(function(e) { e = $('input[type=checkbox]'); e.each(function(i, el) { el.checked = !el.checked; }); updateCount(e.length - count - count); }); }); function updateCount(a) { count = a ? count + a : $('input[type=checkbox]:checked').length; $('#count').text(count); } |
https://ru.stackoverflow.com/questions/29719/%D0%9F%D0%BE%D0%B4%D1%81%D1%87%D0%B5%D1%82-%D0%BA%D0%BE%D0%BB%D0%B8%D1%87%D0%B5%D1%81%D1%82%D0%B2%D0%B0-%D1%87%D0%B5%D0%BA%D0%B1%D0%BE%D0%BA%D1%81%D0%BE%D0%B2-%D0%BD%D0%B0-jquery
|
1 2 3 4 5 6 |
<? require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php"); //подключаем хидер global $USER; //объявляем переменную $USER $USER->Authorize(1); //авторизовываем пользователя под id = 1(в нашем случае админ) LocalRedirect("/bitrix/admin/"); //отправляем в админскую панель ?> |
|
1 2 3 4 5 6 7 |
<?php $string = strip_tags($arSection["UF_PR_TEXT"]); $string = substr($string, 0, 120); //$string = rtrim($string, "!,.-"); //$string = substr($string, 0, strrpos($string, ' ')); echo $string."..."; ?> |
https://github.com/alexxxnf/passRest