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 jquery script for responsive slider | |
This is for use with a child theme! | |
If not use: get_template_directory_uri() instead | |
*/ | |
function fws_add_the_scripts() { | |
wp_enqueue_script( | |
'custom_script', | |
get_stylesheet_directory_uri() . '/js/responsiveslides.min.js', | |
array('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
<h3>Get All WordPress Post Meta</h3> | |
<?php $getPostCustom=get_post_custom(); // Get all the data ?> | |
<?php | |
foreach($getPostCustom as $name=>$value) { | |
echo "<strong>".$name."</strong>"." => "; | |
foreach($value as $nameAr=>$valueAr) { |
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
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<meta name="description" 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 | |
add_action('wp_head', 'debug_styles_queued'); | |
function debug_styles_queued() { | |
global $wp_styles; | |
echo '<!--- Styles QUEUED'."\r\n"; | |
foreach ( $wp_styles->queue as $styles ) { | |
echo "\r\nStyle: ".$styles."\r\n"; | |
} | |
echo "\r\n--->"; |
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).ready(function() { | |
$('head').append('<style type="text/css">.outline-element {outline: 1px solid #c00;}.outline-element-clicked {outline: 1px solid #0c0;}</style>'); | |
$('body').bind('mouseover mouseout click', function(event) { | |
var $tgt = $(event.target); | |
if (!$tgt.closest('.syntax_hilite').length) { | |
$tgt.toggleClass(event.type == 'click' ? 'outline-element-clicked' : 'outline-element'); | |
$('body').removeClass('outline-element-clicked') | |
} | |
}); | |
}); |
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
javascript: var t = document.getElementsByTagName('div'); | |
for (i = 0; i < t.length; i++) { | |
void(t[i].style.padding = '5px;'); | |
b = t[i].id; | |
h = t[i].innerHTML; | |
void(t[i].innerHTML = '<p style=\'color:red;font-weight:bold;\'>' + b + '</p>' + h); | |
void(t[i].style.border = '2px solid red'); | |
} |
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 delay = (function(){ | |
var timer = 0; | |
return function(callback, ms){ | |
clearTimeout (timer); | |
timer = setTimeout(callback, ms); | |
}; | |
})(); | |
$(function() { |
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 | |
// file: image.php | |
// Dynamically Create a clear png for css background opacities | |
header("Content-type: image/png"); | |
$hex_value = $_GET['hex']; | |
// Convert Hex to RGB Value | |
function HexToRGB($hex) { | |
$hex = ereg_replace("#", "", $hex); | |
$color = array(); |
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 additonal edit box: | |
define('WYSIWYG_META_BOX_ID', 'my-editor'); | |
define('WYSIWYG_EDITOR_ID', 'myeditor'); //Important for CSS that this is different | |
define('WYSIWYG_META_KEY', 'extra-content'); | |
add_action('admin_init', 'wysiwyg_register_meta_box'); | |
function wysiwyg_register_meta_box(){ | |
add_meta_box(WYSIWYG_META_BOX_ID, __('Top Box', 'wysiwyg'), 'wysiwyg_render_meta_box', 'post'); | |
add_meta_box(WYSIWYG_META_BOX_ID, __('Top Box', 'wysiwyg'), 'wysiwyg_render_meta_box', 'page', 'normal'); | |
add_meta_box(WYSIWYG_META_BOX_ID, __('Top Box', 'wysiwyg'), 'wysiwyg_render_meta_box', 'services-page', 'normal'); // add to custom post type |
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
$screen = get_current_screen(); | |
echo "<pre>"; | |
print_r($screen); | |
echo "</pre>"; |
OlderNewer