Skip to content

Instantly share code, notes, and snippets.

View viruthagiri's full-sized avatar

Viruthagiri Thirumavalavan viruthagiri

  • Bangalore, India
View GitHub Profile
@viruthagiri
viruthagiri / class-gsa-for-wp-ms.php
Created February 7, 2012 18:31 — forked from simonwheatley/class-gsa-for-wp-ms.php
GSA for WordPress Multisite
<?php
/**
* Handles most of the work.
*
* @package GSA for WordPress Multisite
* @author Simon Wheatley
**/
class GSAForWPMS extends GSAForWPMS_Plugin {
@viruthagiri
viruthagiri / wordpress-multisite-lighttpd.conf
Created February 7, 2012 18:31 — forked from ahmednuaman/wordpress-multisite-lighttpd.conf
A nice little rewrite directive for WordPress Multi-site and Lighttpd
url.rewrite-once = (
"^/(.*/)?files/$" => "/index.php",
"^/(.*/)?files/(.*)" => "/wp-content/blogs.php?file=$2",
"^(/wp-admin/.*)" => "$1",
"^/([_0-9a-zA-Z-]+/)?(wp-.*)" => "/$2",
"^/([_0-9a-zA-Z-]+/)?(.*\.php)" => "/$2",
"^/(.*)/?$" => "/index.php"
)
@viruthagiri
viruthagiri / tc.framwork.base.php
Created February 7, 2012 18:35 — forked from amereservant/tc.framwork.base.php
WordPress Options Framework
<?php
/**
* TC Framework Base
*
* This is an abstract class that creates a standard base for all TC projects.
*
* All options are stored under two WordPress options, one for the standard options
* and another for the multisite options (if the theme/plugin has need for these).
*
* @author Amereservant <[email protected]>
@viruthagiri
viruthagiri / functions.php
Created February 15, 2012 18:29
Editing WordPress profiles with Gravity Forms
<?php
// add the following to your functions file or similar
define( 'FUBLO_GF_PROFILE', 1 ); // define the ID number of your profile form.
// ============================================================= PROFILE EDITING
/**
* These are the user metadata fields, with their names and the data about them.
@viruthagiri
viruthagiri / hidden_comment_form.php
Created February 15, 2012 18:32 — forked from beastaugh/hidden_comment_form.php
Plugin to hide the WordPress comment form until the user clicks a link to reveal it.
<?php
/*
Plugin Name: Hidden Comment Form
Plugin URI: http://tarskitheme.com/help/hooks/example-plugins/
Description: Hide the comment form until the user clicks a link to reveal it.
Author: Benedict Eastaugh
Version: 1.1
Author URI: http://extralogical.net/
*/
@viruthagiri
viruthagiri / wp-front-end-post-submit.php
Created February 15, 2012 18:48 — forked from jhaus/wp-front-end-post-submit.php
basic wordpress template for front end posting via wordpress.stackexchange.com
<?php
$postTitle = $_POST['post_title'];
$post = $_POST['post'];
$submit = $_POST['submit'];
if(isset($submit)){
global $user_ID;
$new_post = array(
@viruthagiri
viruthagiri / sample_plugin.php
Created February 15, 2012 18:53 — forked from sbressler/sample_plugin.php
Sample plugin to demonstrate the basics of WordPress actions and filters, as well as storing plugin settings
<?php
/*
Plugin Name: Sample Plugin
Plugin URI: http://www.scottbressler.com/blog/plugins/
Description: Sample plugin to demonstrate the basics of WordPress actions and filters, as well as storing plugin settings. This plugin adds content to the end of posts. This can be achieved when publishing the post or each time the post is displayed, as specified by the plugin's settings. The text appended is also specified in the settings.
Version: 1.1
Author: Scott Bressler
Author URI: http://www.scottbressler.com/blog/
License: GPL2
*/
@viruthagiri
viruthagiri / post-process.php
Created February 15, 2012 18:54 — forked from bueltge/post-process.php
WordPress Custom Post Type: Insert post via Frontend
<?php
/**
* post-process.php
* make sure to include post-process.php in your functions.php. Use this in functions.php:
*
* get_template_part('post-process');
*
*/
function do_insert() {
if( 'POST' == $_SERVER['REQUEST_METHOD']
@viruthagiri
viruthagiri / functions.php
Created February 15, 2012 18:57
My super duper WordPress functions.php
<?php
/**
* Base functions.php for WordPress themes
*
* @package WordPress 3.3
* @author Andres Hermosilla
*/
/**
@viruthagiri
viruthagiri / get_ram_in_footer.php
Created February 16, 2012 21:32 — forked from bueltge/get_ram_in_footer.php
WordPress Plugin to list used and standing ready RAM and SQL Queries in Admin-Footer