Skip to content

Instantly share code, notes, and snippets.

View Fanckler's full-sized avatar

Serhii Fanckler

View GitHub Profile
@Fanckler
Fanckler / functions.php
Created February 8, 2018 20:30
customizer2.php
if ( ! class_exists( 'WP_Customize_Control' ) )
return NULL;
/**
* Class to create a custom tags control
*/
class Text_Editor_Custom_Control1 extends WP_Customize_Control
{
/**
* Render the content on the theme customizer page
*/
@Fanckler
Fanckler / customizer.php
Last active February 8, 2018 21:23
Wordpress customizer editor
<?php
//support
add_theme_support( 'post-thumbnails' );
function invio_scripts() {
wp_enqueue_style('style-css', get_stylesheet_uri() );
wp_enqueue_style('style-ft', get_stylesheet_directory_uri().'/libs/font-awesome-4.7.0/css/font-awesome.css' );
wp_enqueue_style('style-main', get_stylesheet_directory_uri().'/css/style.css');
wp_enqueue_style('style-media', get_stylesheet_directory_uri().'/css/media.css' );
@Fanckler
Fanckler / gsap.js
Last active February 7, 2018 15:41
GSAP (draggable-Rotation) с подвязкой слайдера
var wheel = Draggable.create('#nerdwheel-svg', {
type: "rotation",
bounds:{minRotation:0, maxRotation:360},
throwProps: true,
edgeResistance: 1,
onDrag: nextHandler
// function() {
// calcPercent(this.rotation);