Skip to content

Instantly share code, notes, and snippets.

@josesayago
josesayago / nlposts-pagination.js
Created September 30, 2014 17:32
This is a quick fix for the AJAX pagination function in Network Latest Posts. After loading content, it scrolls view to the top of posts.
jQuery(".nlp-instance-'.$instance.' .nlposts-wrapper").fadeOut("slow",function(){
jQuery(".nlp-instance-'.$instance.' .nlposts-wrapper").load(link+" .nlp-instance-'.$instance.' .nlposts-wrapper > *").fadeIn(3000, function(){
var nlpOffset = jQuery( ".nlposts-container" ).offset().top;
jQuery("body, html").animate({
scrollTop: nlpOffset-100
}, 200);
});
});
@josesayago
josesayago / nlp-jakub.css
Last active August 29, 2015 14:06
Custom Network Latest Posts for Phantom Geek Kultura
/**
* Network Latest Posts v3.0
*
* Copyright 2012 L'Elite
* Licensed under the GPL v2.0
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Great and ugly things aren't as good
* as great and beautiful things ;)
*
@josesayago
josesayago / nlposts-arrayReturn.php
Created August 18, 2014 13:48
Custom Network Latest Posts main function, modified to return an array.
function network_latest_posts( $parameters ) {
// Global variables
global $wpdb;
//global $nlp_time_frame;
// Default values
$defaults = array(
'title' => NULL, // Widget title
'number_posts' => 10, // Number of posts to be displayed
'time_frame' => 0, // Time frame to look for posts in days
'title_only' => TRUE, // Display the post title only
@josesayago
josesayago / slposts-postTitle_medium.css
Created May 20, 2014 22:29
Set Posts Titles <h3></h3> tags to medium size.
/*
* Single Latest Posts v1.0
*
* Copyright 2007 - 2013 L'Elite
* Licensed under the GPL v2.0
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Great and ugly things aren't as good
* as great and beautiful things ;)
*/
/*
* Single Latest Posts v1.0
*
* Copyright 2007 - 2014 L'Elite
* Licensed under the GPL v2.0
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Great and ugly things aren't as good
* as great and beautiful things ;)
*/
@josesayago
josesayago / api-clase.php
Created January 20, 2014 04:03
Grupo de Snippets parte del Artículo: "Crea tu Propio Repositorio de Extensiones Pagas para WordPress" ubicado en http://es.8elite.com/2012/11/05/crea-tu-propio-repositorio-de-extensiones-pagas-para-wordpress/
<?php
/**
* Autor: L'Elite de José SAYAGO
* URL: http://laelitenetwork.com
* Licencia: GNU General Public License 2.0 (GPL) http://www.gnu.org/licenses/gpl.html
* Fichero: mi-extension-wordpress-api.php
* Clase para la API de actualización de la extensión
*/
class api_actualizacion {
// Versión actual
@josesayago
josesayago / gallery-class.js
Created January 19, 2014 18:28
Code snippets for "jQuery Tricks for Dummies" article, published on http://en.8elite.com/2012/09/13/jquery-tricks-for-dummies/
@josesayago
josesayago / network-latest-posts.php
Last active December 31, 2015 01:18
Network Latest Posts 3.5.5 patch including two additional parameters not yet released: use_pub_date and honor_sticky.
<?php
/*
Plugin Name: Network Latest Posts
Plugin URI: http://en.8elite.com/network-latest-posts
Description: Display the latest posts from the blogs in your network using it as a function, shortcode or widget.
Version: 3.5.5
Author: L'Elite
Author URI: http://laelite.info/
*/
/**
@josesayago
josesayago / facebook_tweaks.css
Created December 3, 2013 23:55
Some Facebook CSS classes tweaked.
#blueBar {
background: rgba(254,254,254,.5);
border-bottom: 1px solid rgba(200,200,200,1);
}
#blueBarHolder #blueBar:after {
background-image: none;
}
.navLink.bigPadding {
@josesayago
josesayago / slposts-tanayainfra.css
Created November 15, 2013 02:45
Single Latest Posts Lite CSS Stylesheet adapted for tanayainfra.com
/*
* Single Latest Posts v1.0
*
* Copyright 2007 - 2013 L'Elite
* Licensed under the GPL v2.0
* http://www.gnu.org/licenses/gpl-2.0.html
*
* Great and ugly things aren't as good
* as great and beautiful things ;)
*/