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 | |
function my_copyright_meta() { | |
if(is_singular()){ | |
echo "<meta name="copyright" content="© Me, 2011">"; | |
} | |
} | |
add_action("wp_head", "my_copyright_meta"); | |
?> |
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 | |
/** | |
* Zend View Helper Convert Date | |
* | |
* @author Niels Lange <info@semanticsamsterdam.nl> | |
* @copyright semantics <info@semanticsamsterdam.nl> | |
*/ | |
class Zend_View_Helper_ConvertDate extends Zend_View_Helper_Abstract | |
{ | |
/** |
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 | |
function wpr_snap($atts, $content = null) { | |
extract(shortcode_atts(array( | |
"snap" => 'http://s.wordpress.com/mshots/v1/', | |
"url" => 'http://www.escolawp.com', | |
"alt" => 'My image', | |
"w" => '400', // width | |
"h" => '300' // height | |
), $atts)); |
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 | |
function cwc_donate_shortcode( $atts ) { | |
extract(shortcode_atts(array( | |
'text' => 'Make a donation', | |
'account' => 'REPLACE ME', | |
'for' => '', | |
), $atts)); | |
global $post; |
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 | |
function cwc_mail_shortcode( $atts , $content=null ) { | |
for ($i = 0; $i < strlen($content); $i++) $encodedmail .= "&#" . ord($content[$i]) . ';'; | |
return '<a href="mailto:'.$encodedmail.'">'.$encodedmail.'</a>'; | |
} | |
add_shortcode('mailto', 'cwc_mail_shortcode'); | |
?> | |
<?php | |
[mailto]email@yourdomain.com[/mailto] |
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 | |
function cwc_viewpdf($attr, $url) { | |
return '<iframe src="http://docs.google.com/viewer?url=' . $url . '&embedded=true" style="width:' .$attr['width']. '; height:' .$attr['height']. ';" frameborder="0">Your browser should support iFrame to view this PDF document</iframe>'; | |
} | |
add_shortcode('embedpdf', 'cwc_viewpdf'); | |
?> | |
<?php | |
[embedpdf width="600px" height="500px"]http://infolab.stanford.edu/pub/papers/google.pdf[/embedpdf] | |
?> |
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 | |
function cwc_youtube($atts) { | |
extract(shortcode_atts(array( | |
"value" => 'http://', | |
"width" => '475', | |
"height" => '350', | |
"name"=> 'movie', | |
"allowFullScreen" => 'true', | |
"allowScriptAccess"=>'always', | |
), $atts)); |
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
# Ligar developer toolbar | |
http://MAGENTOROOT/developertoolbar/index/hints/enabled/1/ | |
# Desligar developer toolbar | |
http://MAGENTOROOT/developertoolbar/index/hints/enabled/0/ |