Skip to content

Instantly share code, notes, and snippets.

View manchumahara's full-sized avatar
🎯
Focusing

Sabuj Kundu manchumahara

🎯
Focusing
View GitHub Profile
@manchumahara
manchumahara / gist:10569985
Last active August 29, 2015 13:59
for style use this ul.plainyearbasedtimelinelist{ border-left: 4px solid #E5E5E5 !important; margin-left: 20px; padding-left: 30px; }
<?php
$last_changed = wp_cache_get( 'last_changed', 'posts' );
if ( ! $last_changed ) {
$last_changed = microtime();
wp_cache_set( 'last_changed', $last_changed, 'posts' );
}
global $wpdb;
@iamMonzurul
iamMonzurul / font-awesome-icons-array-4-3-0.php
Last active August 29, 2015 14:16
Font Awesome Icons Array which could be used in wordpress theme or plugin options
<?php
/**
* Font Awesome Icons Array (4.3.0)
* @author Monzurul Haque
* @author_uri https://github.com/farukham
**/
$icons_arr = array(
__("None", "fifothemes") => "none",
__("Adjust", "fifothemes") => "fa-adjust",
@necenzurat
necenzurat / googleplus.php
Last active September 27, 2015 20:57
Get Google Plus Followers and Following, yea is messy but it does the job done :)
<?php
/*
* © WTFPL
* by necenzurat
* Updated: 19 May 2013
*/
$id = @$_GET["id"];
//$id = "108520002754793822340";
@trepmal
trepmal / gist:2831344
Created May 29, 2012 23:07
Stand-alone WordPress.org plugin api access
<?php
// Stand-alone WordPress.org plugin api access
$url = 'http://api.wordpress.org/plugins/info/1.0/';
$fields = array(
'action' => 'query_plugins',
'request' => serialize( (object) array(
'author' => 'trepmal',
//'search' => 'howdy',
@LeaVerou
LeaVerou / dabblet.css
Last active December 9, 2017 13:40
Pure CSS, accessible like button (inspired by Medium)
/**
* Pure CSS, accessible like button (inspired by Medium)
*/
.like {
position: absolute;
clip: rect(0,0,0,0);
}
.like + label {
@brasofilo
brasofilo / comments-2-excel.php
Last active April 1, 2018 06:54
Export WordPress Comments as Excel file. Uses PHPExcel, http://phpexcel.codeplex.com/. Place this file in the root of the WordPress installation. TODO: convert to plugin.
<?php
# Load slim WP
define( 'WP_USE_THEMES', false );
require( './wp-load.php' );
# http://phpexcel.codeplex.com/
require_once dirname(__FILE__) . '/Classes/PHPExcel.php';
global $wpdb;
$query = "SELECT * FROM $wpdb->comments
@zachbrowne
zachbrowne / auto-post.php
Created August 9, 2012 06:45
Auto post status updates to Google+
<?php
// REQUIRED PARAMETERS
$status = 'http://www.mylink.com';
$email = 'your@email.com';
$pass = 'yourpassw0rd';
@jcemer
jcemer / gist:3130835
Created July 17, 2012 17:55
Less gradient mixins
#gradient {
.vertical(@startColor: #555, @endColor: #333, @colorStop: 100%) {
background-color: mix(@startColor, @endColor, 60%);
background-image: -moz-linear-gradient(top, @startColor, @endColor @colorStop); // FF 3.6+
background-image: -ms-linear-gradient(top, @startColor, @endColor @colorStop); // IE10
background-image: -webkit-gradient(linear, 0 0, 0 @colorStop, from(@startColor), to(@endColor)); // Android 2.3, Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(top, @startColor, @endColor @colorStop); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(top, @startColor, @endColor @colorStop); // Opera 11.10
background-image: linear-gradient(top, @startColor, @endColor @colorStop); // The standard
}
@netconstructor
netconstructor / custom-post-type-flush-rewrite-rules.php
Created January 23, 2012 10:46 — forked from jeremyboggs/custom-post-type-flush-rewrite-rules.php
Pseudo-elegant way to flush rewrite rules after creating a custom post type.
<?php
/**
* Example for writing a WP plugin that adds a custom post type and flushes
* rewrite rules only once on initialization.
*/
/**
* On activation, we'll set an option called 'my_plugin_name_flush' to true,
* so our plugin knows, on initialization, to flush the rewrite rules.
*/