- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
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
//kill Gutenberg stylesheet | |
function wp_dequeue_gutenberg_styles() { | |
wp_dequeue_style( 'wp-block-library' ); | |
wp_dequeue_style( 'wp-block-library-theme' ); | |
} | |
add_action( 'wp_print_styles', 'wp_dequeue_gutenberg_styles', 100 ); |
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 | |
/** | |
* Template Name: Redirect to child page | |
* Description: Redirects to the top child page | |
* | |
* @package PUT YOUR THEME NAME HERE :D | |
*/ | |
global $post; |
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 | |
add_action( 'after_switch_theme', 'theme_activated' ); | |
add_filter( 'intermediate_image_sizes_advanced', 'remove_default_sizes'); | |
function theme_activated() { | |
// Set thumbnail size in settings > media. | |
update_option( 'thumbnail_size_w', 150 ); | |
update_option( 'thumbnail_size_h', 150 ); | |
update_option( 'thumbnail_crop', 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
<div id="my_container"></div> <!-- Form container --> | |
<!-- JS code from CRM Bitrix24 --> | |
<!-- Added "node" parametr --> | |
<script id="bx24_form_inline" data-skip-moving="true"> | |
(function(w,d,u,b){w['Bitrix24FormObject']=b;w[b] = w[b] || function(){arguments[0].ref=u; | |
(w[b].forms=w[b].forms||[]).push(arguments[0])}; | |
if(w[b]['forms']) return; | |
s=d.createElement('script');r=1*new Date();s.async=1;s.src=u+'?'+r; | |
h=d.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h); | |
})(window,document,'http://cp.silaev.bx/bitrix/js/crm/form_loader.js','b24form'); |
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 | |
/** | |
* Core Post API | |
* | |
* @package WordPress | |
* @subpackage Post | |
*/ | |
// | |
// Post Type Registration |
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
// получаем URL параметры | |
// var allVars = $.getUrlVars(); | |
// получаем значение параметра по его имени | |
// var byName = $.getUrlVar('name'); | |
$.extend({ | |
getUrlVars: function(){ | |
var vars = [], hash; |
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
$(window).load(function() { | |
$('.slides').on('setPosition', function () { | |
$(this).find('.slick-slide').height('auto'); | |
var slickTrack = $(this).find('.slick-track'); | |
var slickTrackHeight = $(slickTrack).height(); | |
$(this).find('.slick-slide').css('height', slickTrackHeight + 'px'); | |
}); | |
}) |
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
/* Based on https://github.com/kenwheeler/slick/issues/187#issuecomment-59123524 */ | |
/* bootstrap hack: fix content width inside hidden tabs */ | |
.tab-content > .tab-pane, | |
.pill-content > .pill-pane { | |
display: block; /* undo display:none */ | |
height: 0; /* height:0 is also invisible */ | |
overflow: hidden; /* no-overflow */ | |
} | |
.tab-content > .active, | |
.pill-content > .active { |
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
# ----------------------------------------------------------------- | |
# .gitignore for WordPress @salcode | |
# ver 20160309 | |
# | |
# From the root of your project run | |
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore | |
# to download this file | |
# | |
# By default all files are ignored. You'll need to whitelist | |
# any mu-plugins, plugins, or themes you want to include in the repo. |