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 | |
/** | |
* This script forces download on the specified file-types. | |
* It was been slightly modified to provide more security from | |
* unauthorized files such as those with a .php extension being | |
* downloaded, or force-download.php itself being exposed. | |
* | |
* http://creativecommons.org/licenses/by/3.0/ | |
* | |
* Original Author: Louai Munajim |
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 | |
$query = get_transient( 'video_query' ); | |
if ( false == $query ) { | |
$query = new WP_Query( $args ); | |
set_transient( 'video_query', $query, HOUR_IN_SECONDS ); | |
} | |
if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); |
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
function hide_my_old_shortcode( $attr, $content ) { | |
return; | |
} | |
add_shortcode( 'my_old_shortcode', 'hide_my_old_shortcode' ); |
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
## 3.6 Proposed Points from <devchat> | |
# Autosave | |
- We should never lose anything EVER. | |
- Seriously. EVER. | |
- Details TBD. | |
# Distraction-Free Writing | |
- Smoother transitions. It feels like a separate screen | |
- More easily discoverable |
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 | |
function get_a_users_settings() { | |
// Change 1 to the user's ID | |
// Or do $user = wp_get_current_user() and change $user_id in get_user_option to $user->ID | |
$user_id = 1; | |
$option = get_user_option( 'user-settings', $user_id ); | |
if ( $option && is_string( $option ) ) { | |
parse_str( $option, $array ); | |
echo '<pre>'; | |
var_dump( $array ); |
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 | |
function lol( $content ) { | |
return str_replace( ', ', ', LOL ', $content, 0 ); | |
} | |
add_filter( 'the_content', 'lol' ); | |
?> |
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"> |
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
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' ); |