Skip to content

Instantly share code, notes, and snippets.

@pmgllc
pmgllc / pmg_footer_scripts
Created April 13, 2012 23:58
Genesis Sharing Buttons - Footer Scripts
@pmgllc
pmgllc / pmg_add_customcss
Created April 13, 2012 23:59
Genesis Custom CSS via functions.php
// Add custom.css file in <head>
add_action('wp_head', 'pmg_add_customcss');
function pmg_add_customcss( ) {
$pmg_css_link = '<link rel="stylesheet" type="text/css" media="screen" href="'.get_bloginfo( 'stylesheet_directory' ).'/custom.css" />';
echo $pmg_css_link;
}
@pmgllc
pmgllc / pmg_comment_form_args
Created April 17, 2012 21:02
Genesis - Reword Speak Your Mind
// Modify the speak your mind text
add_filter( 'genesis_comment_form_args', 'pmg_comment_form_args' );
function pmg_comment_form_args($args) {
$args['title_reply'] = 'Leave a Comment';
return $args;
}
@pmgllc
pmgllc / gist:5059139
Created February 28, 2013 18:53
Genesis reposition code not working?
// Reposition the footer
remove_action('genesis_footer', 'genesis_footer_markup_open', 5);
remove_action('genesis_footer', 'genesis_do_footer');
remove_action('genesis_footer', 'genesis_footer_markup_close', 15);
add_action('genesis_after', 'genesis_footer_markup_open', 5);
add_action('genesis_after', 'genesis_do_footer');
add_action('genesis_after', 'genesis_footer_markup_close', 15);

Developer Contract

Revised date: 01/19/2013

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@pmgllc
pmgllc / gist:5391530
Created April 15, 2013 21:47
plugin settings link??
// Add settings link on plugin page
add_filter( "plugin_action_links_stealth-login-page", 'slp_plugin_settings_link' );
function slp_plugin_settings_link($links) {
$settings_link = '<a href="'. admin_url('options-general.php?page=stealth-login-page') .'">' . __('Settings') . '</a>';
array_unshift($links, $settings_link);
return $links;
}
@pmgllc
pmgllc / gist:5453550
Last active December 16, 2015 15:09
Trying to add a "settings" link to my plugin. This is after looking at 5-10 plugins with a simple method that didn't work to now using what is in YOURLS and bbPress-Members Only: http://plugins.svn.wordpress.org/bbpress-members-only/trunk/init.php Still no link appears and die('foo'); at any point along here does show the function is being read.
<?php
// Start up the engine
final class SLPCreator {
static $instance;
function __construct() {
self::$instance =& $this;
// Actions
add_action( 'init', 'slp_load_plugin_translations', 1 );
@pmgllc
pmgllc / partial-plugin.php
Last active December 18, 2015 01:39
Stealth Login Page code snippet to add URL filter to logout/password reset. This will need to be added each time the plugin updates - add to plugin.php.
// After all network activate/deactivate sections, before Global Variables
/**
* Edit the logout/login/lost_password URLs to the new custom URL
*
* @since 2.1.0
* @param $old
* @param $new
* @param $url
* @return array
@pmgllc
pmgllc / secureGoogle
Created June 20, 2013 17:14
Change Chrome default search to encrypted Google search
Go to the Settings page and click "Manage search engines" under the Search heading.
Scroll down below "Other search engines" to add a new search engine. Enter the following:
secureGoogle
https://encrypted.google.com
https://encrypted.google.com/search?hl=en&as_q=%s
Scroll up to find it in your list if you have a huge list and click "Make default" to make it appear in the top box and bolded.
Ideally, you'd be in Incognito mode for complete anti-cookie tracking on your system, but it's better than nothing.