Skip to content

Instantly share code, notes, and snippets.

@Costosis
Costosis / gulpinstall.sh
Created December 24, 2021 12:28 — forked from rlandas/gulpinstall.sh
GULP : Uninstalling and Installing GULP global and local
npm uninstall -g gulp
npm install -g gulp
npm uninstall --save-dev gulp
npm install --save-dev gulp
@Costosis
Costosis / example-bem-menu.html
Created December 14, 2021 18:59 — forked from campusboy87/example-bem-menu.html
Преобразует дефолтное меню WordPress в меню на основе методологии БЭМ с помощью только фильтров меню
<ul class="menu menu--main menu--horizontal">
<li class="menu-node menu-node--main_lvl_1 menu-node--active">
<a href="#" class="menu-link menu-link--active">Пункт 1</a>
<ul class="menu menu--dropdown menu--vertical">
<li class="menu-node menu-node--main_lvl_2">
<a href="#" class="menu-link">Подпункт 1.1</a>
</li>
<li class="menu-node menu-node--main_lvl_2">
<a href="#" class="menu-link">Подпункт 1.2</a>
</li>
function google_fonts() {
$query_args = array(
'family' => 'Open+Sans:400,700|Oswald:700'
'subset' => 'latin,latin-ext',
);
wp_register_style( 'google_fonts', add_query_arg( $query_args, "//fonts.googleapis.com/css" ), array(), null );
}
add_action('wp_enqueue_scripts', 'google_fonts');
@Costosis
Costosis / 06.png
Created November 24, 2021 18:24 — forked from mfd/06.png
Gilroy font
06.png
@Costosis
Costosis / reset.css
Created August 25, 2021 17:48 — forked from DavidWells/reset.css
CSS reset. Follow me on the twitters for more tips: https://twitter.com/davidwells
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@Costosis
Costosis / crb_page_main.php
Created August 20, 2021 07:14
СЛАЙДЕРЫ CARBON FIELDS
<?php
->add_tab('Слайдер', array(
Field::make( 'complex', 'crb_slider', 'Слайдер' )
->set_layout( 'tabbed-horizontal' )
->add_fields( array(
Field::make( 'image', 'image', __( 'Слайд') ),
Field::make( 'text', 'title', 'Заголовок'),
Field::make( 'text', 'subtitle_1', 'Подзаголовок 1')->set_width( 70 ),
Field::make( 'text', 'icon_1', 'Иконка подзаголовка 1 fontawesome')->set_width( 30 )->set_default_value('fa fa-bus'),
@Costosis
Costosis / wmp.php
Created August 20, 2021 06:38
Получение и вывод полей CARBON FIELDS
<!-------------------------------- ПОЛУЧЕНИЕ ---------------------------------->
<?php
// settings_common
$wmp_phone_1 = carbon_get_theme_option( 'wmp_phone_1', $type = null );
$wmp_phone_2 = carbon_get_theme_option( 'wmp_phone_2', $type = null );
$wmp_phone_3 = carbon_get_theme_option( 'wmp_phone_3', $type = null );
$wmp_email = carbon_get_theme_option( 'wmp_email', $type = null );
$wmp_map = carbon_get_theme_option( 'wmp_map', $type = null );
$wmp_address = carbon_get_theme_option( 'wmp_address', $type = null );
$wmp_time = carbon_get_theme_option( 'wmp_time', $type = null );
/**
* navigation.js
*
* Handles toggling the navigation menu for small screens and enabling tab support for dropdown menus.
*/
( function() {
var container, button, menu, links;
container = document.getElementById( 'site-navigation' );
if ( ! container )