A Pen by Mike Sozanski on CodePen.
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 namespace Vralle\Plugin\Shortcode\Img; | |
/*------------------------------------------------------------------- | |
* Register UI | |
*-----------------------------------------------------------------*/ | |
function editor_ui() { | |
global $_wp_additional_image_sizes; | |
$default_sizes = [ |
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 namespace Vralle\Plugin\Shortcode\Img; | |
/*------------------------------------------------------------------- | |
* Convert images to Shortcode | |
*-----------------------------------------------------------------*/ | |
function html_to_shortcode( $content ) { | |
// Returns, if content is empty | |
if( empty( $content ) ) return $content; | |
if( 'content_save_pre' === current_filter() ) |
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 myTest() { | |
// Save default function | |
var defaultSend = wp.media.editor.send.attachment; | |
// new send function | |
wp.media.editor.send.attachment = function( props, attachment) { | |
// If not image, return default function | |
if ( 'image' !== attachment.type ) | |
return defaultSend( props, attachment) |
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 | |
// Remove Akismet js | |
function vralle_remove_akismet_script () { | |
remove_action( 'comment_form', array( 'Akismet', 'load_form_js' ) ); | |
} | |
if ( ! is_admin() && ( defined( 'AKISMET_VERSION' ) || function_exists( 'akismet_http_post' ) ) ) { | |
add_action( 'wp_enqueue_scripts', 'vralle_remove_akismet_script' ); | |
} |
A Pen by Vitaliy Ralle on CodePen.
#offcanvas.js
##Usage
The offcanvas plugin toggles your hidden content on demand, via data attributes or JavaScript. It also adds .offcanvas-open
to the <body>
to override default scrolling behavior and generates a .offcanvas-backdrop
to provide a click area for dismissing shown offcanvas when clicking outside the offcanvas.
<!-- Button trigger offcanvas -->
<button class="btn btn-primary" data-toggle="offcanvas" data-target="#myOffcanvas" data-fade="false">
Launch offcanvas
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
require "compass" | |
# Require any additional compass plugins here. | |
require "autoprefixer-rails" | |
require "csso" | |
# Set this to the root of your project when deployed: | |
http_path = "../" | |
css_dir = "css" | |
sass_dir = "_sass" | |
images_dir = "images" |
NewerOlder