Skip to content

Instantly share code, notes, and snippets.

View sxidsvit's full-sized avatar

Sergiy Antonyuk sxidsvit

View GitHub Profile
@sxidsvit
sxidsvit / button.sass
Created March 28, 2017 04:26 — forked from agragregra/button.sass
Button Sass Styles (Universal Starter)
.button
display: inline-block
border: none
color: #fff
text-decoration: none
background-color: $accent
padding: 15px 45px
font-size: 13px
text-transform: uppercase
font-weight: 600
<?php
Redux::setSection( $opt_name, array(
'title' => __( 'Text Area', 'redux-framework-demo' ),
'desc' => __( 'For full documentation on this field, visit: ', 'redux-framework-demo' ) . '<a href="http://docs.reduxframework.com/core/fields/textarea/" target="_blank">http://docs.reduxframework.com/core/fields/textarea/</a>',
'id' => 'opt-textarea-subsection',
'subsection' => true,
'fields' => array(
array(
'id' => 'background-parallax',
@sxidsvit
sxidsvit / contform.php
Created February 23, 2018 22:23 — forked from campusboy87/contform.php
Форма обратной связи с загрузкой файла в WordPress на основе плагина Ajax Simply.
<?php
/**
* Работает на основе плагина Ajax Simply (без него работать не будет).
* Документация Ajax Simply - https://goo.gl/iFeLsZ
*/
// HTML верстка формы и стили
add_shortcode( 'form', 'contact_form_html' );
function contact_form_html() {
@sxidsvit
sxidsvit / Браузерное кеширование
Created February 28, 2018 18:27 — forked from artikus11/.htaccess
Заготовка для подключения браузерного кеширования
Включение кеша браузера
Вариант 1
<ifModule mod_headers.c>
<FilesMatch "\.(js|css|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
<FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png)$">
Header set Cache-Control "max-age=2592000"
@sxidsvit
sxidsvit / wp_security_setting
Created March 3, 2018 23:07 — forked from artikus11/wp_security_setting
Настройки для плагина All In One WP Security
{"aiowps_enable_debug":"","aiowps_remove_wp_generator_meta_info":"1","aiowps_prevent_hotlinking":"1","aiowps_enable_login_lockdown":"1","aiowps_allow_unlock_requests":"","aiowps_max_login_attempts":3,"aiowps_retry_time_period":5,"aiowps_lockout_time_length":60,"aiowps_set_generic_login_msg":"","aiowps_enable_email_notify":"","aiowps_email_address":"9698114@mail.ru","aiowps_enable_forced_logout":"","aiowps_logout_time_period":"60","aiowps_enable_invalid_username_lockdown":"","aiowps_instantly_lockout_specific_usernames":[],"aiowps_unlock_request_secret_key":"9boae3otjbi5x7b7q6kf","aiowps_enable_whitelisting":"","aiowps_allowed_ip_addresses":"","aiowps_enable_login_captcha":"","aiowps_enable_custom_login_captcha":"","aiowps_captcha_secret_key":"y9t13745ja38h0dirf5q","aiowps_enable_manual_registration_approval":"","aiowps_enable_registration_page_captcha":"","aiowps_enable_random_prefix":"","aiowps_enable_automated_backups":"1","aiowps_db_backup_frequency":2,"aiowps_db_backup_interval":"2","aiowps_backup_files_s
@sxidsvit
sxidsvit / gulpfile_bootstrap4.js
Last active April 23, 2018 00:12 — forked from Insayt/gulpfile.js
D.Valak - gulpfile for Bootstrap 4
'use strict';
var gulp = require('gulp'),
watch = require('gulp-watch'),
prefixer = require('gulp-autoprefixer'),
uglify = require('gulp-uglify'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
rigger = require('gulp-rigger'),
cssmin = require('gulp-minify-css'),
@sxidsvit
sxidsvit / amimation_blocks_plugin
Created June 22, 2018 11:41 — forked from Scretch-1/amimation_blocks_plugin
Анимация блоков при скролле страницы
//Для начала подключаем animate_plugin
//Далее подключаем плагин waypoints https://github.com/imakewebthings/waypoints
//Далее на странице подключаем "animate" стили в
<head>
<link rel="stylesheet" href="libs/animate-plugin/animate.min.css">
</head>
//После в самом низу тега
<body>
<script type="text/javascript" src="libs/animate-plugin/animate-css.js"></script>
<script type="text/javascript" src="libs/animate-plugin/jquery.waypoints.min.js"></script>
@sxidsvit
sxidsvit / wp-comment-callback
Created June 30, 2018 12:30 — forked from georgiecel/wp-comment-callback
Custom callback for HTML5 friendly WordPress comment. Also includes schema.org microdata. To use, insert the following into comments.php: <?php wp_list_comments('callback=better_comment&end-callback=better_comment_close'); ?>
// awesome semantic comment
function better_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
extract($args, EXTR_SKIP);
if ( 'article' == $args['style'] ) {
$tag = 'article';
$add_below = 'comment';
} else {
@sxidsvit
sxidsvit / code_editor_for_contact_form_7.php
Created July 17, 2018 19:51 — forked from campusboy87/code_editor_for_contact_form_7.php
Code Editor for Contact Form 7 (WordPress / CodeMirror).
<?php
/**
* Plugin Name: Code Editor for Contact Form 7
* Plugin URI: https://gist.github.com/campusboy87/2daad24e45116721759991549b626977
* Author: Campusboy (wp-plus)
* Author URI: https://www.youtube.com/wp-plus
*/
add_action( 'admin_print_styles-toplevel_page_wpcf7', function () {
@sxidsvit
sxidsvit / wpcf-redirect-NEW.php
Created August 28, 2018 01:36 — forked from campusboy87/wpcf-redirect-NEW.php
Contact Form 7 Redirect
<?php
/**
* Plugin Name: WPCF Redirect
*/
add_filter( 'shortcode_atts_wpcf7', 'shortcode_atts_wpcf7' );
add_filter( 'wpcf7_editor_panels', 'wpcf7_add_redirect_panels' );
add_action( 'wpcf7_after_save', 'wpcf7_redirect_save_field' );
add_action( 'wp_footer', 'wpcf7_redirect_enqueue_assets' );