Skip to content

Instantly share code, notes, and snippets.

@josesayago
josesayago / slposts_templateFunction.php
Created June 7, 2013 01:09
This is an example of embedding Single Latest Posts into a WordPress Template file
<?php
// Check if the plugin has been activated
if( function_exists( 'single_latest_posts' ) ) {
/**
* Custom parameters
* Set only those you want to use
*/
$parameters = array(
'title' => 'Luxury',
'title_only' => 'false',
@josesayago
josesayago / nlposts_templateFunction.php
Created June 7, 2013 19:31
This is an example of embedding Network Latest Posts into a WordPress Template file
<?php
// Check if the plugin has been activated
if( function_exists( 'network_latest_posts' ) ) {
/**
* Custom Parameters
* Set only those you want to use
*/
$parameters = array(
'title' => 'Recent Articles'
'title_only' => 'false',
@josesayago
josesayago / slposts_threeColumns.css
Created June 8, 2013 07:41
Single Latest Posts Lite v1.2.5 style type three columns block with centered thumbnails
/*
* Single Latest Posts Lite v1.2.5
*
* 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 ;)
*/
@josesayago
josesayago / slposts_cptTemplate.php
Last active December 18, 2015 06:59
Example of use of Single Latest Posts embedded into a template file. This one includes parameters not yet made publicly available.
<?php
/*
Template Name: SLPosts
*/
/* Include header */
get_header();
?>
<!-- Template sub-parent wrapper -->
<div class="inner-page">
<!-- Template content wrapper -->
@josesayago
josesayago / network-latest-posts.php
Created June 14, 2013 17:12
Network Latest Posts v3.5.4 including tweak to unload default and custom styles. This patch has not been pushed to the official version yet.
<?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.4
Author: L'Elite
Author URI: http://laelite.info/
*/
/* Copyright 2012 L'Elite (email : opensource@laelite.info)
@josesayago
josesayago / slp_widgets.css
Created June 17, 2013 12:31
CSS stylesheet for Single Latest Posts Lite v1.3 floating thumbnails to the right for widgets.
/*
* Single Latest Posts Lite v1.3
*
* 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 ;)
*/
@josesayago
josesayago / url.php
Created June 23, 2013 14:55
GlotPress gp-includes/url.php file used to deal with URL manipulation & generation. This file includes a custom route for Register page.
<?php
/**
* Functions, which deal with URLs: manipulation, generation
*/
/**
* Gives the path of an URL
*
* @param string $url Optional. The default is the GlotPress URL
*/
@josesayago
josesayago / gp-settings.php
Created June 23, 2013 14:56
GlotPress gp-settings.php custom file, it includes routing for Register page.
<?php
/**
* Loads needed libraries and does the preliminary work. You should not have to
* edit this file. Everything should be configurable from the outside. Starts the
* routing logic in the end.
*/
if ( defined( 'GP_DEBUG' ) && GP_DEBUG ) {
if ( defined( 'E_DEPRECATED' ) )
error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT );
@josesayago
josesayago / register.php
Created June 23, 2013 15:03
GlotPress custom route for Register page, gp-includes/routes/register.php.
<?php
/**
* Registration Class
*
* Allow users to create new accounts
*/
class GP_Route_Register extends GP_Route_Main {
// GET variables
function register_get() {
// If user is already logged in
@josesayago
josesayago / register.php
Last active December 18, 2015 21:09
GlotPress Register form template, gp-templates/register.php.
<?php
gp_title( sprintf( __('%s &lt; GlotPress'), __('Login') ) );
gp_breadcrumb( array(
__('Become a Translator'),
) );
gp_tmpl_header();
?>
<h2><?php _e('Become a Translator'); ?></h2>
<script type="text/javascript">
var RecaptchaOptions = {