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
'<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
.....................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
<?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
<?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 | |
$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 | |
$cur_queried_object = get_queried_object(); | |
/*======================================================== | |
* получить родительскую по названию и родительской term_id | |
========================================================*/ | |
$terms = get_terms( array( | |
'taxonomy' => array( 'category', ), // название таксономии с WP 4.5 | |
'child_of' => $department_term->term_id, | |
'name__like' => $cat_lvl2->subdivision, | |
) ); |
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 | |
class Asc_ch_WP_Nav_Menu_Widget extends WP_Widget { | |
public function __construct() { | |
$widget_ops = array( | |
'classname' => 'col masonry-col', //задать клаасс CSS | |
'description' => __( 'Add a custom menu to your sidebar +' ), | |
'customize_selective_refresh' => true, | |
); | |
parent::__construct( 'ask_widget_nav_menu', __('Меню +'), $widget_ops ); |
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 | |
private static $bearer = "2MDaDp4eFyFqMkj33grHC1wDuSYZ8mso"; | |
static function getPurchaseData( $code ) { | |
//setting the header for the rest of the api | |
$bearer = 'bearer ' . self::$bearer; | |
$header = array(); |