Skip to content

Instantly share code, notes, and snippets.

@nextend
nextend / Homelink-RX-Multi.txt
Last active October 27, 2022 08:40
How to pair homelink with RX Multi
@nextend
nextend / block.php
Created November 9, 2018 08:15
Gutenberg block.php Smart Slider 3
<?php
defined('ABSPATH') || exit;
class NextendSmartSlider3Gutenberg {
public function __construct() {
add_action('enqueue_block_editor_assets', array(
$this,
'enqueue_block_editor_assets'
@nextend
nextend / block.js
Created November 9, 2018 08:17
Gutenberg block.js Smart Slider 3
(function (blocks, editor, i18n, element, components, _) {
var el = element.createElement;
blocks.registerBlockType('nextend/smartslider3', {
title: 'Smart Slider 3',
icon: 'welcome-learn-more',
category: 'common',
attributes: {
slider: {
type: 'string'
@nextend
nextend / NextendMultiLineShortcode.php
Created May 10, 2016 13:08
WordPress multiline shortcode with wpautop support
class NextendMultiLineShortcode{
static $multiline_shortcode_storage = array();
static $multiline_shortcodes = array();
public static function init(){
add_filter('the_content', 'NextendMultiLineShortcode::do_multiline_shortcode', 9); // before wpautop()
add_shortcode('multiline_shortcode', 'NextendMultiLineShortcode::multiline_shortcode');
}
public static function do_multiline_shortcode($content, $ignore_html = false) {
jQuery(window).on("message", function(e) {
if(e.originalEvent.origin === 'https://e.infogram.com'){
var data = e.originalEvent.data;
if(typeof data === 'string' && data.substr(0, 12) === 'iframeHeight'){
setTimeout(function(){
jQuery(window).trigger('SliderContentResize');
}, 200);
}
}
});
@nextend
nextend / test.php
Last active June 15, 2018 11:38
Curl verbose Facebook api test
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://graph.facebook.com/v2.12/oauth/access_token");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "postvar1=value1&postvar2=value2&postvar3=value3");
curl_setopt($ch, CURLOPT_VERBOSE, true);
@nextend
nextend / fix-insert-php-code-snippet.php
Last active June 8, 2018 06:06
Fix for Insert PHP Code Snippet output buffer issue
<?php
/*
Plugin Name: Fix: Insert PHP Code Snippet output buffer issue
Author: nextendweb
Version: 1.0.0
Requires at least: 4.1
Tested up to: 4.9
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
@nextend
nextend / fix.php
Created June 8, 2018 05:46
Fix for
<?php
add_action('plugins_loaded', 'fix_insert_php_code_snippet');
function fix_insert_php_code_snippet() {
add_shortcode('xyz-ips', 'mod_xyz_ips_display_content');
}
function mod_xyz_ips_display_content($xyz_snippet_name) {
global $wpdb;
if (is_array($xyz_snippet_name)) {
@nextend
nextend / nsl-default-buttons-with-container.html
Created February 15, 2018 09:55
Nextend Social Login - HTML markup of the buttons and container
<div class="nsl-container nsl-container-block nsl-container-login-layout-below-separator" style="display: block;">
<a href="***?loginSocial=facebook" rel="nofollow" aria-label="Continue with <b>Facebook</b>" data-plugin="nsl" data-action="connect" data-provider="facebook">
<span class="nsl-button nsl-button-default nsl-button-facebook" style="background-color:#4267b2;">
<svg xmlns="http://www.w3.org/2000/svg">
<path fill="#fff"></path>
</svg>
<span>Continue with <b>Facebook</b></span>
</span>
</a>
<a href="***?loginSocial=google" rel="nofollow" aria-label="Continue with <b>Google</b>" data-plugin="nsl" data-action="connect" data-provider="google">