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
| #!/bin/bash | |
| # Syncronize a local Wordpress installation with a remote one. | |
| # | |
| # | |
| # Requires wp-cli.phar installed somewhere. | |
| WP_CLI=/usr/local/bin/wp | |
| # Remote settings |
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
| import { select, subscribe } from '@wordpress/data' | |
| export function whenEditorIsReady() { | |
| return new Promise((resolve) => { | |
| const unsubscribe = subscribe(() => { | |
| // This will trigger after the initial render blocking, before the window load event | |
| // This seems currently more reliable than using __unstableIsEditorReady | |
| if (select('core/editor').isCleanNewPost() || select('core/block-editor').getBlockCount() > 0) { | |
| unsubscribe() | |
| resolve() |
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.onload = function() { | |
| // Parse the URL | |
| function getParameterByName(name) { | |
| var name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); | |
| var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"); | |
| var results = regex.exec(location.search); | |
| return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); | |
| } | |
| // Give the URL parameters variable names | |
| var source = getParameterByName('utm_source'); |
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 | |
| $args = array( | |
| 'label' => '', // Text in Label | |
| 'class' => '', | |
| 'style' => '', | |
| 'wrapper_class' => '', | |
| 'value' => '', // if empty, retrieved from post meta where id is the meta_key | |
| 'id' => '', // required | |
| 'name' => '', //name will set from id if empty |
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
| /* -------------------------------------------------------------------------- */ | |
| // All Bootstrap 4 Sass Mixins [Cheat sheet] | |
| // Updated to Bootstrap v4.5.x | |
| // @author https://anschaef.de | |
| // @see https://github.com/twbs/bootstrap/tree/master/scss/mixins | |
| /* -------------------------------------------------------------------------- */ | |
| // Grid variables | |
| $grid-columns: 12; | |
| $grid-gutter-width: 30px; |
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
| var path = document.querySelector('path'); | |
| var length = path.getTotalLength(); | |
| // Clear any previous transition | |
| path.style.transition = path.style.WebkitTransition = | |
| 'none'; | |
| // Set up the starting positions | |
| path.style.strokeDasharray = length + ' ' + length; | |
| path.style.strokeDashoffset = length; | |
| // Trigger a layout so styles are calculated & the browser | |
| // picks up the starting position before animating |
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
| SASS: | |
| .mfp-ready .mfp-figure | |
| opacity: 0 | |
| .mfp-zoom-in | |
| .mfp-figure, .mfp-iframe-holder .mfp-iframe-scaler | |
| opacity: 0 | |
| transition: all 0.3s ease-out | |
| transform: scale(0.95) | |
| &.mfp-bg, .mfp-preloader | |
| opacity: 0 |
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
| $(".scroll-next").click(function() { | |
| var cls = $(this).closest(".section").next().offset().top; | |
| $("html, body").animate({scrollTop: cls}, "slow"); | |
| }); |
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
| var | |
| // global | |
| gulp = require('gulp'), | |
| watch = require('gulp-watch'), | |
| browserSync = require("browser-sync"), | |
| reload = browserSync.reload, | |
| sass = require('gulp-sass'), | |
| prefixer = require('gulp-autoprefixer'), | |
| cssnano = require('gulp-cssnano'), |
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
| $(".tab_item").not(":first").hide(); | |
| $(".wrapper .tab").show().click(function() { | |
| var ind = $(this).index(); | |
| $(".wrapper .tab").removeClass("active").eq(ind).addClass("active"); | |
| $(".tab_item").hide().eq(ind).fadeIn() | |
| }).eq(0).addClass("active"); | |
| <div class="wrapper"> | |
| <div class="tabs"> | |
| <span class="tab">Вкладка 1</span> |
NewerOlder