This file contains hidden or 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 | |
$result = preg_match('/<spa.+>(.+)<\/span>/',$str,$found); | |
$result = preg_match('/<strong>(.+)<\\/strong>/',$str,$found); | |
$ulclass = preg_replace('/<a /', '<a class="cms30_link" onclick="yaCounter49161010.reachGoal(' . "'callback_click'" . '); return true;"', $ulclass, 1); | |
return preg_replace('/<a href/', '<a class="cms30_link" onclick="yaCounter49161010.reachGoal('."'calculate_click'".'); return true;" href', $ulclass, 1); | |
$new_key = preg_replace('/^\./', '', $new_key, 1); | |
This file contains hidden or 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 | |
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
// get array url params | |
parse_str(parse_url($test_query['$HTTP_REFERER'], PHP_URL_QUERY), $output); | |
$get_params = array( | |
'foo' => 'bar', | |
'baz' => 'boom', | |
'cow' => 'milk', |
This file contains hidden or 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 | |
/////////////////////////////////////////////////////////////////////////////////////////// | |
/////// ADMIN PAGE SETTINGS | |
/////////////////////////////////////////////////////////////////////////////////////////// | |
add_action('admin_menu', 'access_register_wc_submenu_page'); | |
function access_register_wc_submenu_page() { | |
add_submenu_page( 'edit.php?post_type=product', 'Страна для подкатегории', 'Страна для подкатегории', 'manage_options', 'access-product-attribute-state', 'access_my_wc_submenu_page_callback' ); | |
} |
This file contains hidden or 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
.....................CHROME............................ | |
monitorEvents($0) -- смотреть события js |
This file contains hidden or 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
'<a href="javascript:void(0)">Войти</a>'; | |
window.location.href = 'uploads/file.doc'; | |
str.search( /лю/i ); | |
window.open('http://ya.ru'); | |
document.body.style.background = 'red'; | |
location.href = location.pathname + '/?wt_city_by_default=' + geoData.city; | |
event.preventDefault(); | |
$('html, body').animate( { scrollTop: 0 }, 'medium'); |
This file contains hidden or 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
@media (max-width: 576px){ | |
.container{ | |
max-width: none; | |
} | |
} | |
@media (min-width: 576px){ | |
.container{ | |
max-width: 540px; | |
} |
This file contains hidden or 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 get_header(); ?> | |
<div class="wrapper"> | |
<div class="middle"> | |
<div class="breadcrumbs"> | |
<?php if (function_exists('yoast_breadcrumb')) { | |
yoast_breadcrumb('<p id="breadcrumbs">', '</p>'); | |
} ?> | |
</div><!-- .breadcrumbs--> |
This file contains hidden or 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 | |
/** | |
* Submit function for calculator_page_form. | |
*/ | |
function import_excel_page_form_submit($form, &$form_state) { | |
$uri = $form_state['values']['file']->uri; | |
$data = import_excel_parse_csv_file($uri); | |
$data = import_excel_filterData($data); | |
$db_product = import_excel_getProductDB($data); |
This file contains hidden or 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
.block1{ | |
display: flex; | |
flex-direction: row; | |
justify-content:space-around; /* выравнивание по главной оси */ | |
align-items: stretch; /* выравнивание по поперечной оси. */ | |
flex-wrap: wrap; /* Многострочная организация блоков */ | |
align-content: flex-start; /* каким образом образовавшиеся ряды блоков будут выровнены */ | |
} |
This file contains hidden or 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 | |
$args = array( | |
'post_type' => 'product_variation', | |
'post_status' => array( 'private', 'publish' ), | |
'numberposts' => -1, | |
'orderby' => 'menu_order', | |
'order' => 'ASC', | |
'post_parent' => get_the_ID() // get parent post-ID | |
); | |
$variations = get_posts( $args ); |