Skip to content

Instantly share code, notes, and snippets.

Bruce Munson WebEndevSnippets

Block or report user

Report or block WebEndevSnippets

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@WebEndevSnippets
WebEndevSnippets / functions.php
Created Jan 30, 2014
WordPress: Require a featured image before you can publish post
View functions.php
//* From http://wpsnipp.com/index.php/functions-php/require-featured-image-can-publish-post/?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+wpsnipp+%28wpsnipp+-+wordpress+code+snippets%29
add_action('save_post', 'wpds_check_thumbnail');
add_action('admin_notices', 'wpds_thumbnail_error');
function wpds_check_thumbnail($post_id) {
// change to any custom post type
if(get_post_type($post_id) != 'post')
return;
if ( !has_post_thumbnail( $post_id ) ) {
// set a transient to show the users an admin message
set_transient( "has_post_thumbnail", "no" );
@WebEndevSnippets
WebEndevSnippets / functions.php
Created Mar 18, 2014
Gravity Forms: Assign unique ID to form
View functions.php
add_action('gform_after_submission_3', 'we_add_submission_id', 10, 2);
/**
* Assign unique ID to the Service & Support form, for Request Number
*/
function we_add_submission_id($entry, $form) {
global $wpdb;
$field_number = 14;
$SubmissionID = 'S-' . $entry['id'];
$wpdb->insert("{$wpdb->prefix}rg_lead_detail", array(
@WebEndevSnippets
WebEndevSnippets / functions.php
Created Mar 19, 2014
Soliloquy: Remove Soliloquy Settings panel from post types
View functions.php
add_filter( 'soliloquy_skipped_posttypes', 'we_remove_soliloquy_setting_panel' );
/**
* Remove Soliloquy Settings panel from post types
*
*/
function we_remove_soliloquy_setting_panel() {
return array( 'attachment', 'revision', 'nav_menu_item', 'envira', 'soliloquy', 'foobar' );
}
@WebEndevSnippets
WebEndevSnippets / functions.php
Created Mar 19, 2014
Soliloquy: White label Soliloquy slider
View functions.php
add_filter( 'gettext', 'tgm_soliloquy_whitelabel', 10, 3 );
/**
* White label Soliloquy slider
* Change all instances of Soliloquy to 'Slider'
*/
function tgm_soliloquy_whitelabel( $translated_text, $source_text, $domain ) {
// If not in the admin, return the default string.
if ( ! is_admin() ) {
return $translated_text;
@WebEndevSnippets
WebEndevSnippets / functions.php
Created Mar 21, 2014
Genesis: Filter H1 post title output
View functions.php
add_filter( 'genesis_post_title_output', 'we_post_title_output', 15 );
/**
* Filter H1 post title to add Font Awesome Styling
*
*/
function we_post_title_output( $title ) {
if ( is_page( 22 ) )
$title = sprintf( '<h1 class="entry-title"><i class="fa fa-cog"></i> %s</h1>', apply_filters( 'genesis_post_title_text', get_the_title() ) );
@WebEndevSnippets
WebEndevSnippets / functions.php
Created Mar 24, 2014
Genesis: Display featured image on pages after title
View functions.php
add_action( 'genesis_entry_header', 'we_page_featured_image', 15 );
/**
* Display featured image on pages, after title
*/
function we_page_featured_image() {
if ( ! is_singular( 'page' ) )
return;
@WebEndevSnippets
WebEndevSnippets / 0_reuse_code.js
Created May 29, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@WebEndevSnippets
WebEndevSnippets / functions.php
Created Jun 7, 2014
Gravity Forms: Remove Submit Button on Gravity Form
View functions.php
// Remove Submit Button on Gravity Form
add_filter( 'gform_submit_button_12', '__return_false' );
View gist:825bab879026e88f97e5
/**
* Displays the Single Activity Post Meta Details
*
* Sets a site transient to make this simple and display quickly.
*
* @uses genesis_grid_loop() Generates the Grid Loop
*/
function ssz_single_activities_post_meta() {
global $post;
View gist:388cebbc52208915ade4

/** Procedure for Site Transfer from WPE to Other Host */

  1. Download latest ZIP from WPE (Backup Points) + last 29 zips

  2. Download uploads folder (and all other custom/non-WordPress folders)

  3. Upload WPE ZIP to new server

  4. Extract/unzip WPE ZIP file on new server

You can’t perform that action at this time.