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
// js/editor_plugin.js | |
/** | |
* an example tinyMCE Plugin | |
*/ | |
tinymce.create( | |
'tinymce.plugins.myPlugin', | |
{ | |
/** | |
* @param tinymce.Editor editor | |
* @param string url |
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
// preload images | |
function preloadImages() { | |
var items = [], current = 0, errors = [], timer; | |
var resetTimer = function() { | |
stopTimer(); | |
startTimer(); | |
}; |
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> | |
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<title>Plupload - Queue widget example</title> | |
<link rel="stylesheet" href="../../js/jquery.plupload.queue/css/jquery.plupload.queue.css" type="text/css" media="screen" /> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> | |
<script type="text/javascript" src="../../js/plupload.full.min.js"></script> |
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 f__manage_posts_columns($cols) | |
{ | |
global $typenow; | |
if ($typenow != 'price_table') | |
return $cols; | |
$cols = array( | |
'cb' => $cols['cb'], | |
'title' => $cols['title'], | |
'template' => "Template", |
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 wp_nav_menu(array( | |
'theme_location' => "top", | |
'container' => false, | |
'menu_id' => 'menu-top' | |
)); ?> |
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
# ignore specific path (/administrator/ - in this case) | |
RewriteCond %{REQUEST_URI} ^/?administrator($|\/|\/.*) [NC] | |
RewriteRule ^.*$ - [NC,L] | |
# redirect non-www to www | |
RewriteCond %{HTTP_HOST} ^yoursite\.com [NC] | |
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L] |
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 truncate($text, $length, $more = '...') | |
{ | |
$text = strip_shortcodes( $text ); | |
//$text = apply_filters('the_content', $text); | |
$text = str_replace(']]>', ']]>', $text); | |
$text = strip_tags($text); | |
$words = explode(' ', $text, $length + 1); | |
if (count($words) > $length) { | |
array_pop($words); |
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 hex_darker($hex, $factor = 30) | |
{ | |
$new_hex = ''; | |
$base['R'] = hexdec($hex{0}.$hex{1}); | |
$base['G'] = hexdec($hex{2}.$hex{3}); | |
$base['B'] = hexdec($hex{4}.$hex{5}); | |
foreach ($base as $k => $v) | |
{ |
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
language: php | |
php: | |
- 5.3 | |
- 5.4 | |
before_script: | |
- sudo apt-get install apache2 | |
- sudo a2enmod actions | |
- sudo a2enmod rewrite |
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
language: php | |
php: | |
- 5.3 | |
- 5.4 | |
before_script: | |
- sudo apt-get install apache2 | |
- sudo a2enmod actions | |
- sudo a2enmod rewrite |
OlderNewer