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: Test | |
*/ | |
class My_Like_Button { | |
function __construct() | |
{ | |
$this->hooks(); | |
} |
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 $shortcode_tags; | |
echo "<pre>"; print_r($shortcode_tags); echo "</pre>"; | |
?> |
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 dummy_wp_get_attachment_url( $url, $post_id ){ | |
return 'http://dummy/image/URL'; | |
} | |
add_filter( 'wp_get_attachment_url' , 'dummy_wp_get_attachment_url' , 10 , 2 ); |
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
.slider-container { | |
width: 600px; | |
height: 200px; | |
overflow: hidden; | |
position: relative; | |
} | |
.slider ul, .slider li { | |
margin: 0; | |
padding: 0; | |
list-style: none; |
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
// | |
// Mostrar sólo las Publicaciones, Comentarios y Multimedia que sean Propios | |
// Más info en > PC-SERVEIS, Diseño Web - http://www.pc-serveis.es | |
// | |
// Show only posts and media related to logged in author | |
add_action('pre_get_posts', 'query_set_only_author' ); | |
function query_set_only_author( $wp_query ) { | |
global $current_user; | |
if( is_admin() && !current_user_can('edit_others_posts') ) { |
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
body *[class] { | |
position:relative; | |
border:1px dashed #ccc; | |
} | |
body *[class]::before { | |
content:attr(class); | |
line-height:10px; | |
color:#fff; | |
font-size:9px; | |
font-family:sans-serif; |
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
/* | |
$sections[] = array( | |
'icon' => RADIUM_OPTIONS_URL.'assets/images/icons/icon-social.png', | |
'title' => __('Social Media Links', 'radium'), | |
'desc' => __('<p class="description">Enter social account urls here.</p>', 'radium'), | |
'fields' => array( | |
array( | |
'id' => 'facebook_url', | |
'type' => 'text', | |
'title' => __('Facebook Account Url', 'radium'), |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style> | |
ul { float:left; margin-right:20px; } | |
body { color:white; font-family:Helvetica, sans-serif; text-shadow:1px 1px 1px rgba(0,0,0,0.2); } | |
ul { width:512px; overflow:hidden; border-radius:6px; } |
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_filter("the_content", "the_content_filter"); | |
function the_content_filter($content) { | |
// array of custom shortcodes requiring the fix | |
$block = join("|",array("col","shortcode2","shortcode3")); | |
// opening tag |
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 | |
/* | |
* Resize images dynamically using wp built in functions | |
* Victor Teixeira | |
* | |
* php 5.2+ | |
* | |
* Exemplo de uso: | |
* | |
* <?php |
OlderNewer