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 checkPasswordMatch() { | |
var password = $("#txtNewPassword").val(); | |
var confirmPassword = $("#txtConfirmPassword").val(); | |
if (password != confirmPassword) | |
$("#divCheckPasswordMatch").html("Passwords do not match!"); | |
else | |
$("#divCheckPasswordMatch").html("Passwords match."); | |
} |
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 | |
/* Template Background Settings | |
* | |
* Add this to your landing page template config.php file | |
* to have standard background options for your template. | |
* | |
*/ | |
// Select Background Type Setting | |
$options = array('fullscreen'=>'Fullscreen Image', 'tile'=>'Tile Background Image', 'color' => 'Solid Color', 'repeat-x' => 'Repeat Image Horizontally', 'repeat-y' => 'Repeat Image Vertically', 'custom' => 'Custom CSS'); |
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
// http://stevenbenner.com/2010/03/javascript-regex-trick-parse-a-query-string-into-an-object/ | |
// JavaScript regex trick: Parse a query string into an object | |
var queryString = {}; | |
anchor.href.replace( | |
new RegExp("([^?=&]+)(=([^&]*))?", "g"), | |
function($0, $1, $2, $3) { queryString[$1] = $3; } | |
); | |
// Usage |
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 | |
/* Add Options to Your Default Landing Page Template */ | |
$plugins = get_option('active_plugins'); | |
$required_plugin = 'landing-pages/landing-pages.php'; | |
// Check if landing page plugin is active | |
if ( in_array( $required_plugin , $plugins ) ) { | |
// Check if in the admin section | |
if ( is_admin() ) { | |
// Add options to default lander | |
$options = array('widget'=>'Use Sidebar Widget','right'=>'Float Right', 'left'=>'Float Left','bottom'=>'Below Content','top'=>'Above Content'); |
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 | |
/* | |
Plugin Name: Homepage Settings for BigBang | |
Plugin URI: http://www.inboundnow.com/ | |
Description: Adds additional functionality to the big bang theme. | |
Author: David Wells | |
Author URI: http://www.inboundnow.com | |
*/ | |
// Specify Hooks/Filters |
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 | |
// Get All Pages and List | |
$pages = get_pages(); | |
foreach ( $pages as $page ): ?> | |
<li> | |
<a href="<?php echo get_page_link( $page->ID ) ?>" title=""><?php echo $page->post_title ?></a> | |
</li> | |
<?php endforeach; ?> |
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
var hue = 'rgb(' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ')'; | |
$('body').css("background",hue); |
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
$(document).on("click", ".awesome-button", function(event) { | |
// do awesome and blow your mind | |
}); |
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
add_action('admin_enqueue_scripts','wpleads_admin_enqueue'); | |
function wpleads_admin_enqueue($hook) | |
{ | |
global $post; | |
//Admin enqueue - Landing Page CPT only | |
if ( isset($post) && 'wp-lead' == $post->post_type ) | |
{ | |
wp_enqueue_script('wp-lead-js', WPL_URL . 'js/admin.post-edit.js'); |
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 all global fields for post | |
global $wpdb; | |
$data = array(); | |
$wpdb->query(" | |
SELECT `meta_key`, `meta_value` | |
FROM $wpdb->postmeta | |
WHERE `post_id` = ".$_GET['post']." | |
"); | |
foreach($wpdb->last_result as $k => $v){ |