Skip to content

Instantly share code, notes, and snippets.

View JohnBunka's full-sized avatar
🎯
Focusing

John Bunka JohnBunka

🎯
Focusing
View GitHub Profile
@JohnBunka
JohnBunka / gist:42480519592ab65e59f9
Created May 1, 2014 15:18
Enter in your Gist Link
Enter in your Gist Link
@JohnBunka
JohnBunka / gist:f58858ccb3e9204b8117
Created May 1, 2014 14:42
Remove WordPress Admin Links Menu
//* NOTE: Add to functions.php or to a functionality plugin
//* Remove Links Menu
add_action( 'admin_menu', 'my_remove_menu_pages' );
function my_remove_menu_pages() {
remove_menu_page('link-manager.php');
}
@JohnBunka
JohnBunka / functions.php
Last active August 29, 2015 13:58
WordPress: Remove Admin Bar For Subscribers
//* NOTE: Add to functions.php or to a functionality plugin
//*Remove Admin Bar For Subscribers
add_action('after_setup_theme', 'remove_admin_bar');
function remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()) {
show_admin_bar(false);
}
}
@JohnBunka
JohnBunka / function.php
Last active August 29, 2015 13:57
Add a Dropdown Indicator to a Genesis Navigation Menu Automatically with Font Awesome
//* Make Font Awesome available
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css' );
}
@JohnBunka
JohnBunka / iframe.php
Created August 22, 2013 18:37
Force the iframe webpage to not break out
<iframe src="url" sandbox="allow-forms allow-scripts"></iframe>
@JohnBunka
JohnBunka / embed-pdf-google-viewer.php
Created August 16, 2013 21:10
Embed PDFs with Google PDF viewer
<iframe src="http://docs.google.com/gview?url=http://example.com/mypdf.pdf&embedded=true" style="width:100%; height:1000px;" frameborder="0"></iframe>
<?php
/*
Plugin Name: Default Author
Plugin URI: http://pmg.co
Description: Set a default author for all posts and pages
Version: 1.0
Text Domain: default-author
Author: Christopher Davis
Author URI: http://christopherdavis.me
License: GPL2
@JohnBunka
JohnBunka / function.php
Created February 5, 2013 23:01
Remove admin management elements of your site using the Genesis Framework.
<?php
// Remove Genesis in-post SEO Settings
remove_action( 'admin_menu', 'genesis_add_inpost_seo_box' );
// Remove Genesis Layout Settings
remove_theme_support( 'genesis-inpost-layouts' );
// Remove Genesis menu link
remove_theme_support( 'genesis-admin-menu' );