This file contains 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 | |
# Turn on Caching | |
#define('WP_CACHE', true); | |
# Set the Memory Limit | |
#define('WP_MEMORY_LIMIT', '64M'); | |
# Development Table prefix | |
#$table_prefix = 'dev_'; |
This file contains 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 | |
/** | |
* JSON Response | |
* Get json data from url and decode. | |
*/ | |
# Get the WordPress json parser | |
if ( ! function_exists( 'json_parser' ) ) : | |
This file contains 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
/** | |
* Responsive WordPress Core Theme Styles | |
* http://jeffsebring.com/responsive-wordpress-images/ | |
--------------------------------------------------- */ | |
.sticky, | |
.bypostauthor, | |
.gallery-caption { | |
display: normal; | |
} |
This file contains 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
.sticky, | |
.bypostauthor, | |
.gallery-caption | |
display: normal | |
.alignright | |
float: right | |
display: block | |
.alignleft |
This file contains 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/bash | |
########################## | |
## Check if run as root ## | |
########################## | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
This file contains 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 | |
// Remove `publish_pulled_post` hook from `syn_pre_pull_posts` filter during cron | |
add_filter( 'syn_pre_pull_posts', 'tenup_dont_publish_pulled_post' ), 100 ); | |
function tenup_dont_publish_pulled_post( $posts ) { | |
// Remove auto publish action | |
if ( class_exists( 'Syndication_WP_XML_Client' ) ) | |
remove_action( 'syn_post_pull_new_post', array( 'Syndication_WP_XML_Client' , 'publish_pulled_post' ), 10, 5 ); |
This file contains 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 | |
/** | |
* Logged in Home Page Redirect | |
**/ | |
add_action( 'template_redirect', 'pu01_logged_in_homepage' ); | |
// Redirect logged in users from home page to admin | |
function pu01_logged_in_homepage() { | |
This file contains 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
jQuery( document ).ready( function() { | |
function pu01_show_image() { | |
var pu01_image_1 = jQuery( '#pu01_image_1' ).val(), | |
pu01_image_2 = jQuery( '#pu01_image_2' ).val(), | |
pu01_image_3 = jQuery( '#pu01_image_3' ).val(); | |
jQuery( '#pu01_image_1_preview' ).after( '<div id="pu01_image_1_preview_image"><img width="300" height="140" src="' + pu01_image_1 + '" /></div>' ); | |
jQuery( '#pu01_image_2_preview' ).after( '<div id="pu01_image_2_preview_image"><img width="300" height="140" src="' + pu01_image_2 + '" /></div>' ); |
This file contains 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
<script> | |
var file_frame; | |
var wp_media_post_id = wp.media.model.settings.post.id; | |
var set_to_post_id = <?php echo get_the_ID(); ?>; | |
jQuery('.upload_image_button').on('click', function( event ){ | |
event.preventDefault(); |
This file contains 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
/** | |
* Print Selected Thumbnail Images | |
* @return string|bool thumbnail html or false | |
*/ | |
function pU01_thumbnail_img( $size = 'secondary_image', $attr = array() ) { | |
// Fallback to featured image | |
if ( ! $thumbnail_id = get_post_meta( get_the_ID(), get_post_type() . "_{$size}_thumbnail_id", true ) ) { | |
if ( ! $thumbnail_id = get_post_meta( get_the_ID(), "_thumbnail_id", true ) ) |
NewerOlder