This file contains hidden or 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 | |
// From wp-admin/nav-menus.php | |
break; | |
case 'locations': | |
check_admin_referer( 'save-menu-locations', 'save-menu-locations-nonce', false ); | |
// Get existing menu locations assignments | |
$locations = get_registered_nav_menus(); | |
$menu_locations = get_nav_menu_locations(); |
This file contains hidden or 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 | |
add_meta_box( 'nav-menu-theme-locations', __( 'Theme Locations' ), 'wp_nav_menu_locations_meta_box' , 'nav-menus', 'side', 'default' ); |
This file contains hidden or 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 | |
if ( is_tax() ) | |
$title = get_taxonomy( get_queried_object()->taxonomy )->labels->singular_name; | |
elseif ( something else ) | |
vs | |
if ( is_tax() ) { | |
$term = get_queried_object(); | |
$tax = get_taxonomy( $term->taxonomy ); |
This file contains hidden or 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 | |
// Just require() this class via your theme's functions.php file. | |
/* Then instantiate this at the top of your 404.php file with: | |
if ( class_exists( 'Clean_404_Email' ) ) | |
new Clean_404_Email; | |
*/ | |
class Clean_404_Email { | |
var $time, $request, $blog, $email, $theme, $theme_data, $site, $referer, $string, $address, $remote, $agent, $message; |
This file contains hidden or 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 | |
if ( is_array( $menu_locations ) ) { | |
foreach ( $menu_locations as $key => $value ) { | |
if ( ! is_string( $key ) ) | |
unset( $menu_locations[$key] ); | |
} | |
} | |
set_theme_mod( 'nav_menu_locations', $menu_locations ); |
This file contains hidden or 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/sh | |
# A script that leverages Trac XML-RPC (I know, I know) to upload patches. | |
# | |
# This script is written specifically for the Mac, in that it reads from | |
# your keychain to derive your SVN password. You can change the SVN_PASS | |
# line below if you wanted to pull from ~/.svn/ or what not. | |
# | |
# Basic usage: `trac-attach.sh 12345` uploads a patch to ticket #12345, | |
# using the name 12345.diff. If there exists a 12345.diff, the patch is |
This file contains hidden or 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
diff --git a/functions.php b/functions.php | |
index 6855695..84634d8 100644 | |
--- a/functions.php | |
+++ b/functions.php | |
@@ -50,47 +50,28 @@ if ( ! function_exists( 'optionsframework_init' ) ) { | |
* Load up all of the other goodies from the /inc directory | |
*/ | |
-// a list of recommended plugins | |
-require_once( get_template_directory() . '/inc/largo-plugin-init.php' ); |
This file contains hidden or 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 | |
/** | |
* Example format #1 | |
*/ | |
$example_string = '<p>' . __( 'This is some help text' ) . '</p>' . | |
'<p>' . __( 'This is some more help text' ) . '</p>'; | |
get_current_screen()->add_help_tab( array( | |
'id' => 'example', |
This file contains hidden or 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
Drew@machine:~/Sites/mutrunk$ ack -i -Q 'action="<?php echo' | |
wp-activate.php | |
62: <form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>"> | |
wp-admin/includes/dashboard.php | |
441: <form action="<?php echo network_admin_url('users.php'); ?>" method="get"> | |
448: <form action="<?php echo network_admin_url('sites.php'); ?>" method="get"> | |
wp-admin/includes/file.php | |
982:<form action="<?php echo $form_post ?>" method="post"> |