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
<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 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 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_filter( 'post_class', 'uikit_article_class' ); | |
function my_article_class($classes) { | |
if (!is_admin()) { | |
$classes[] = 'my-class'; | |
return $classes; |
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
// получаем URL параметры | |
// var allVars = $.getUrlVars(); | |
// получаем значение параметра по его имени | |
// var byName = $.getUrlVar('name'); | |
$.extend({ | |
getUrlVars: function(){ | |
var vars = [], hash; |
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
add_action('admin_footer','posts_status_color'); | |
function posts_status_color() { ?> | |
<style> | |
.status-draft{background: #FCE3F2 !important;} | |
.status-pending{background: #87C5D6 !important;} | |
.status-publish{/* no background keep wp alternating colors */} | |
.status-future{background: #C6EBF5 !important;} |
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 themename_html_head_alter(&$head_elements) { | |
foreach ($head_elements as $key => $element) { | |
if (isset($element['#attributes']['rel']) && $element['#attributes']['rel'] == 'shortlink') { | |
unset($head_elements[$key]); | |
} | |
if (isset($element['#attributes']['rel']) && $element['#attributes']['rel'] == 'alternate') { | |
unset($head_elements[$key]); | |
} | |
} | |
unset($head_elements['system_meta_generator']); |
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
$(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 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 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. |
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 | |
/** | |
* Output Post Format icons | |
* | |
* Outputs an icon for each post format. Set up to use Fontawesome, | |
* but can be used with anything, or you can just use CSS. | |
* | |
* @return string | |
*/ | |
function post_format_icon() { |