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 | |
ignore_user_abort(1); | |
set_time_limit(0); | |
@ini_set('max_execution_time', 0); | |
include(ABSPATH . "wp-blog-header.php"); | |
$fotos = $wpdb->get_results("SELECT * FROM videos ORDER BY id DESC"); | |
foreach( $fotos as $foto ){ |
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 remove_menus () { | |
if (current_user_can( 'edit_themes' )) { | |
global $menu; | |
$restricted = array( | |
//Remova ou comente as linhas a seguir para exibir os itens. | |
__('Dashboard'), | |
__('Posts'), | |
__('Media'), | |
__('Links'), | |
__('Pages'), |
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 amethyst_gallery_atts( $out, $pairs, $atts ) { | |
$atts = shortcode_atts( array( | |
'columns' => '2', | |
'size' => 'medium', | |
), $atts ); | |
$out['columns'] = $atts['columns']; | |
$out['size'] = $atts['size']; | |
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
$args = array( 'big_number' => 999999999, | |
'base' => str_replace( 999999999, '%#%', get_pagenum_link( 999999999 ) ), | |
'format' => '?paged=%#%', | |
'current' => max( 1, get_query_var( 'paged' ) ), | |
'total' => $wp_query->max_num_pages, | |
'prev_next' => true, | |
'end_size' => 1, | |
'mid_size' => 4, | |
'type' => 'list' | |
); |
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
jQuery.fn.preventDoubleSubmit = function() { | |
jQuery(this).submit(function() { | |
if (this.beenSubmitted) | |
return false; | |
else | |
this.beenSubmitted = true; | |
}); | |
}; | |
jQuery('#my_form').preventDoubleSubmit(); |
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 | |
// Tell me the root folder path. | |
// You can also try this one | |
// $home = $_SERVER['DOCUMENT_ROOT']; | |
// Or this | |
// dirname( __FILE__ ) | |
$home = dirname( __FILE__ ); | |
// Is this a Windows host ? If it is, change this line to $windows = true; | |
$windows = false; |
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 | |
// The ID of the lists you want to add a user to | |
$list_ids = array( 1 ); | |
// User Data without the custom fields | |
$data_subscriber = array( | |
'user' => array( | |
'email' => 'johndoe@email.com', | |
'firstname' => 'John', | |
'lastname' => 'Doe', |
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 | |
$argsThumb = array( | |
'order' => 'ASC', | |
'post_type' => 'attachment', | |
'post_parent' => $post->ID, | |
'post_mime_type' => 'image', | |
'post_status' => null | |
); | |
$attachments = get_posts($argsThumb); | |
if ($attachments) { |
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 | |
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail_size' ); | |
$url = $thumb['0']; | |
?> |
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
<style> | |
*, | |
html, | |
body { | |
margin: 0; | |
padding: 0; | |
} | |
video { display: block; } |