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 enqueue_select2_jquery() { | |
wp_register_style( 'select2css', '//cdnjs.cloudflare.com/ajax/libs/select2/3.4.8/select2.css', false, '1.0', 'all' ); | |
wp_register_script( 'select2', '//cdnjs.cloudflare.com/ajax/libs/select2/3.4.8/select2.js', array( 'jquery' ), '1.0', true ); | |
wp_enqueue_style( 'select2css' ); | |
wp_enqueue_script( 'select2' ); | |
} | |
add_action( 'admin_enqueue_scripts', 'enqueue_select2_jquery' ); |
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 | |
/* | |
Plugin Name: Homepage Settings for BigBang | |
Plugin URI: http://www.inboundnow.com/ | |
Description: Adds additional functionality to the big bang theme. | |
Author: David Wells | |
Author URI: http://www.inboundnow.com | |
*/ | |
// Specify Hooks/Filters |
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 | |
// show featured images in dashboard | |
add_image_size( 'haizdesign-admin-post-featured-image', 120, 120, false ); | |
// Add the posts and pages columns filter. They both use the same function. | |
add_filter('manage_posts_columns', 'haizdesign_add_post_admin_thumbnail_column', 2); | |
add_filter('manage_pages_columns', 'haizdesign_add_post_admin_thumbnail_column', 2); | |
// Add the column |
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
#!/bin/bash | |
# Script will output dumps for all databases using seperate files | |
# Derived from this post: http://www.cyberciti.biz/faq/ubuntu-linux-mysql-nas-ftp-backup-script/ | |
USER="root" | |
PASSWORD="SnM1073k" | |
HOST="localhost" | |
MYSQL="$(which mysql)" | |
MYSQLDUMP="$(which mysqldump)" | |
OUTPUT_DIR="/backups/files" |
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 | |
/** | |
* Home Slider | |
* | |
* Uses the Genesis Responsive slider combined with Advanaced Custom Fields | |
* setting in Dashboard - Instellingen website | |
*/ | |
function rrwd_home_slider() { | |
global $wpdb; |
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 | |
/** | |
* Custom Body Classes | |
* @link http://www.billerickson.net/wordpress-class-body-tag/ | |
* @author Bill Erickson | |
* | |
* @param array $classes existing body classes | |
* @return array modified body classes | |
*/ |
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 //* You can do without this opening tag | |
//* Courtesy of http://www.engagewp.com/set-default-conditional-featured-images-wordpress/ | |
/** | |
* This snippet requires the Deafult Featured Image plugin to be installed | |
* https://wordpress.org/plugins/default-featured-image/ | |
* It replaces the image you selected as your default with one of your choosing | |
* Should be added to the Functionality Plugin | |
*/ |
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
/** | |
* Change the Featured Image Box and upload link Labels for Custom Post Type | |
* @link https://wordpress.org/support/topic/relabel-featured-image-on-custom-type | |
*/ | |
/*This section changes the label of the image box*/ | |
add_action('do_meta_boxes', 'change_image_box'); | |
function change_image_box() | |
{ | |
remove_meta_box( 'postimagediv', 'staff', 'side' ); /*Alter the word "Staff" to match the name of your CPT */ |
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
/** | |
* Change the Excerpt text and description | |
*/ | |
function change_excerpt_name( $translated_text, $text, $domain ) { | |
if ( $_GET['post_type'] == 'staff' ) { | |
switch ( $translated_text ) { | |
case 'Excerpt' : | |
$translated_text = 'Staff Role/Position'; | |
break; | |
case 'Excerpts are optional hand-crafted summaries of your content that can be used in your theme. <a href="http://codex.wordpress.org/Excerpt" target="_blank">Learn more about manual excerpts.</a>' : |
NewerOlder