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
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 / 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 / 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 / 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)) {
<?php
//Original
function zeo_final_title(){
// Use object to avoid namespace collisions
$zeo_rewrite_title = new zeo_rewrite_title();
// We want to act when the page is 99% complete
add_action('wp_footer', array(&$zeo_rewrite_title, 'wpzeo_footer'));
<?php
/*
Plugin Name: Nextend Social Login - Username length
*/
add_filter('nsl_validate_username', function ($isValid, $username, $errors) {
if (strlen($username) < 6) {
$errors->add('invalid_username', '<strong>' . __('ERROR') . '</strong>:' . __('Sorry, username must contain at least 6 characters.'));
$isValid = false;
}