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
// Social Media Buttons | |
function lc_social_media_buttons( $atts, $content = null ){ | |
// get attributes | |
extract(shortcode_atts(array( | |
'align' => 'left', | |
'twitter' => '', | |
'facebook' => '', | |
'googleplus' => '', | |
'linkedin' => '', | |
'pinterest' => '', |
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
module.exports = function(grunt) { | |
// 1. All configuration goes here | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
// 2. The plugin configuration | |
uglify: { | |
my_target: { | |
files: { |
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
global $wpdb; | |
$transient_name = 'lc-latest-10-posts'; | |
$post_ids = get_transient( $transient_name ); | |
if ( $post_ids == FALSE ){ | |
$sql = "SELECT post.ID | |
FROM $wpdb->posts post | |
WHERE | |
post.post_type = 'post' | |
AND post.post_status = 'publish' | |
ORDER BY post.post_date |
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
# [ EMAIL ALERTS ] | |
## | |
# The default email alert toggle | |
# [0 = disabled, 1 = enabled] | |
email_alert=1 | |
# The subject line for email alerts | |
email_subj="maldet alert from $(hostname)" | |
# The destination addresses for email alerts |
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
function lc_new_mail_from( $email ) { | |
$email = 'hello@mydomain.com'; | |
return $email; | |
} | |
add_filter( 'wp_mail_from', 'lc_new_mail_from' ); | |
function lc_new_mail_from_name( $name ) { | |
$name = 'My Business Website'; |
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
// Load our jQuery script | |
function lc_load_jquery(){ | |
wp_enqueue_script('lcjquerytest', get_stylesheet_directory_uri() . '/js/lc-jquery.js', array('jquery'), '1.0', true); | |
global $post; | |
$data = array( 'somestring' => 'pooky', 'post_id' => $post->ID, 'post_title' => $post->post_title ) | |
wp_localize_script( 'lcjquerytest', 'lc_jqpost_info', $data ); | |
} | |
add_action( 'wp_enqueue_scripts', 'lc_load_jquery' ); |
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
[ text* your-name 58/ ] | |
[ email* your-email 58/ ] | |
[ checkbox mailchimp-optin default:1 use_label_element "Subscribe to our newsletter" ] |
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
// Filter video output | |
add_filter('oembed_result','lc_oembed_result', 10, 3); | |
function lc_oembed_result($html, $url, $args) { | |
// $args includes custom argument | |
$newargs = $args; | |
// get rid of discover=true argument | |
array_pop( $newargs ); |
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
if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) { | |
require_once( WP_CONTENT_DIR . '/maintenance.php' ); | |
die(); | |
} |
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
/** | |
* The Infinite Blog Footer | |
* | |
* @uses self::get_settings, self::set_last_post_time, self::archive_supports_infinity, __, wp_get_theme, get_current_theme, apply_filters, home_url, esc_attr, get_bloginfo, bloginfo | |
* @return string or null | |
*/ | |
function footer() { | |
// Bail if theme requested footer not show | |
if ( false == self::get_settings()->footer ) | |
return; |
OlderNewer