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
SELECT email_address, COUNT(email_address) AS occurrences | |
FROM users | |
GROUP BY email_address | |
HAVING occurrences > 1 |
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
<div id="outer"> | |
<div id="inner">Element to be aligned</div> | |
</div> |
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', 'featured_image_in_feed' ); | |
function featured_image_in_feed( $content ) { | |
global $post; | |
if( is_feed() ) { | |
if ( has_post_thumbnail( $post->ID ) ){ | |
$output = get_the_post_thumbnail( $post->ID, 'medium', array( 'style' => 'float:right; margin:0 0 10px 10px;' ) ); | |
$content = $output . $content; | |
} | |
} |
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( 'wp_default_editor', 'set_html_content_editor' ); | |
function set_html_content_editor( $tab ) { | |
$tab = 'html'; | |
return $tab; | |
} | |
?> |
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 random_password( $length = 8 ) { | |
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?"; | |
$password = substr( str_shuffle( $chars ), 0, $length ); | |
return $password; | |
} | |
?> |
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
<div class="container">Lorem ipsum dolor</div> |
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 | |
class Tag_Checklist { | |
private $taxonomy; | |
private $post_type; | |
function __construct( $taxonomy, $post_type ) { | |
$this->taxonomy = $taxonomy; | |
$this->post_type = $post_type; |
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
#billing_email-2_field { float: right; } |
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 | |
$identify = array( | |
'user_id' => $user->user_email, | |
'traits' => apply_filters( 'segment_identify_traits', array( | |
'username' => $user->user_login, | |
'email' => $user->user_email, | |
'name' => $user->display_name, | |
'firstName' => $user->user_firstname, | |
'lastName' => $user->user_lastname, | |
'url' => $user->user_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
<?php | |
function woocommerce_get_order_statuses() { | |
$order_statuses = get_terms( 'shop_order_status', array( 'hide_empty' => false ) ); | |
$statuses = array(); | |
foreach ( $order_statuses as $status ) { | |
$statuses[ $status->slug ] = $status->name; | |
} | |
return $statuses; | |
} | |
?> |