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 | |
$user_query = get_users($args = array('orderby' => 'first_name','order' => 'ASC' )); | |
$i = 0; | |
foreach ($user_query as $user) { | |
if (substr($user_query[$i - 1]->first_name, 0, 1) != substr($user->first_name, 0, 1)) { | |
echo '<span class="lettering">'.substr($user->first_name, 0, 1).'</span>'; | |
} | |
} | |
?> |
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 | |
//OLD WAY | |
function array_sort($array, $on, $order=SORT_ASC) | |
{ | |
$new_array = array(); | |
$sortable_array = array(); | |
if (count($array) > 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
<div class="modal"> | |
<div class="container"> | |
<button class="close" data-dismiss="modal">×</button> | |
<div class="row"> | |
<div class="text-center"> | |
<h2>Python Engineer</h2> | |
<hr/> | |
<p class="description">Senior Python Developer that will participate in all aspects of architecting and developing new innovative applications as well as expanding existing applications code bases. This person will also mentor other developers and have a passionate and entrepreneurial personality to create clean and innovative products that solve business needs.</p> | |
</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 | |
function get_c1() { | |
if (isset($_REQUEST['c1'])) { | |
$c1 = $_REQUEST['c1']; | |
return $c1; | |
} | |
} | |
function get_c2() { |
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 get_random_post_link() { | |
$args = array( | |
'orderby' => 'rand', | |
'posts_per_page' => '1', | |
); | |
$wp_query = new WP_Query( $args ); | |
if ( $wp_query->have_posts() ) : while ( $wp_query->have_posts() ) : $wp_query->the_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 | |
static class MailChimp | |
{ | |
private $api_key; | |
private $api_endpoint = 'https://<dc>.api.mailchimp.com/2.0'; | |
private $verify_ssl = false; | |
/** | |
* Create a new instance |