This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var input = document.querySelector("#edit-submitted-nomer-telefona--3"); | |
var desc = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value"); | |
Object.defineProperty(input, "value", { | |
get: desc.get, | |
set: function (v) { | |
console.log("setting programmatically", v); | |
desc.set.call(this, v); | |
console.log(arguments); | |
debugger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$allowed_ips = [ | |
'185.134.233.66', | |
]; | |
$allowed_secret = ''; | |
if (in_array($_SERVER['REMOTE_ADDR'], $allowed_ips) || ($allowed_secret && (@$_GET['secret'] === $allowed_secret))){ | |
phpinfo(); | |
} else { | |
header("HTTP/1.1 301 Moved Permanently"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Kama_Thumbnail; | |
/** | |
* TODO extract to separate class. | |
*/ | |
trait Make_Thumb__Creators { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
// код ... | |
} catch (err) { | |
// обработка ошибки | |
console.log('Ошибка ' + err.name + ":" + err.message + "\n" + err.stack); | |
} finally { | |
// выполняем всегда | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function aaa(){ | |
return new Promise(function (resolve, reject) { | |
var obj = new Object(); | |
if (1 === 1){ | |
resolve(obj); | |
} else { | |
reject(obj); | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Table of contents generator | |
*/ | |
// !function(){function e(){ | |
(function(){ | |
var beforeHTML = '<ul class="chapters">'; | |
var afterHTML = '</ul>'; | |
var glavs = 'h2'; | |
var li_classes = 'chapter'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!function_exists('hdden_d')){ | |
function hdden_d($var, $onlyWithGet = true){ | |
if ($onlyWithGet && (!isset($_GET['deb']) || ($_GET['deb'] !== 'y') ) ){ | |
return false; | |
} | |
echo '<pre>'; | |
if (function_exists('esc_html')){ | |
echo esc_html(var_export($var, true)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach ($pans_reviews as $pans_review) { | |
global $post; | |
$post = $pans_review; | |
setup_postdata($pans_review); | |
get_template_part('template_parts/elements/review', 'loop-item', []); | |
wp_reset_postdata(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$review_content = ''; | |
if (function_exists('kama_excerpt')){ | |
$review_content = kama_excerpt([ | |
'maxchar' => 271, | |
'text' => strip_tags($review->post_content), | |
]); | |
} else { | |
$review_content = wp_html_excerpt($review->post_content, 271, '...'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$rev_date = date_format(date_create($pans_review->post_date), 'd.m.Y г. H:i'); |