This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('wp-load.php'); | |
is_user_logged_in() || auth_redirect(); | |
$upload_dir = wp_upload_dir(); | |
//Set your path below I am using /gravity_forms/ | |
$basedir = $upload_dir['basedir'] . '/gravity_forms/'; | |
$file = rtrim($basedir, '/') . '/' . str_replace('..', '', isset($_GET['file']) ? $_GET['file'] : ''); | |
if (!$basedir || !is_file($file)) { | |
status_header(404); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function global_css() { | |
wp_register_style( 'parent_main', get_template_directory_uri() . '/css/main.css' , filemtime( get_template_directory() . '/css/main.css' ), null, 'screen' ); | |
wp_register_style( 'child_main', get_stylesheet_directory_uri() . '/style.css' , filemtime( get_stylesheet_directory() . '/style.css' ), null, 'screen' ); | |
if ( ! is_admin() ) : | |
wp_enqueue_style( 'parent_main' ); | |
endif; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function global_css() { | |
wp_register_style( 'parent_main', get_template_directory_uri() . '/css/main.css', false, null, 'screen' ); | |
wp_register_style( 'child_main', get_stylesheet_directory_uri() . '/style.css', false, null, 'screen' ); | |
if ( ! is_admin() ) : | |
wp_enqueue_style( 'parent_main' ); | |
endif; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Github Details | |
$github_org = 'organisation'; //Github Organisation Name | |
$github_repo = 'repository'; //Github Repository Name | |
$github_user = 'username'; //Github Username | |
$github_password = 'password'; //Github Password | |
// Get from Github | |
$issues_url = "https://$github_user:[email protected]/repos/$github_org/$github_repo/issues?state=closed?per_page=100"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Remove Stupid 10xp from around the Caption Images | |
class fixImageMargins{ | |
public $xs = 0; //change this to change the amount of extra spacing | |
public function __construct(){ | |
add_filter('img_caption_shortcode', array(&$this, 'fixme'), 10, 3); | |
} | |
public function fixme($x=null, $attr, $content){ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function custom_gravatar ( $avatar_defaults ) { | |
$mytavatar = get_theme_directory_uri . '/images/avatar.jpg'; // Make Sure you change this depending on your image name and location | |
$avatar_defaults[ $mytavatar ] = 'My Custom Gravatar'; // This is what is displayed in the Admin settings when Picking your Default Avatar | |
return $avatar_defaults; | |
} | |
add_filter( 'avatar_defaults', 'custom_gravatar' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Monokai Bright WordPress</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('wp-load.php'); | |
is_user_logged_in() || auth_redirect(); | |
$upload_dir = wp_upload_dir(); | |
//Set your path below I am using /gravity_forms/ | |
$basedir = $upload_dir[ 'basedir' ] . '/gravity_forms/'; | |
$file = rtrim( $basedir, '/' ) . '/' . str_replace( '..', '', isset( $_GET[ 'file' ] ) ? $_GET[ 'file' ] : '' ); | |
if ( ! $basedir || ! is_file( $file ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Numerous always-ignore extensions | |
*.diff | |
*.err | |
*.orig | |
*.log | |
*.rej | |
*.swo | |
*.swp | |
*.vi | |
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$users_list = array(); | |
$users = get_users(); | |
if ( !empty( $users ) ) | |
$users_list = array_combine( wp_list_pluck( $users, 'ID' ), wp_list_pluck( $users, 'display_name' ) ); | |
$meta_box = array( | |
'title' => 'Project Information', | |
'pages' => array( 'project' ), |
NewerOlder