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 get_general_users(){ | |
// WP_User_Query arguments | |
$args = array ( | |
'orderby' => 'id', | |
'meta_key' => 'trainer_id', | |
'meta_value' => '', | |
'meta_compare' => '!=', | |
'order' => 'DESC' | |
); |
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
$blogusers = get_general_users(); | |
$arr = array(); | |
foreach ( $blogusers as $user ) { | |
$meta = get_user_meta($user->ID); | |
$link = get_edit_user_link( $user->ID); | |
$editUserLink = '<a href=' .$link. '>Edit User Profile</a>'; | |
$profileArray =array( | |
"Display Name" => $user->display_name, | |
"Email Address" => $user->user_email, |
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 rss_blog(){ ?> | |
<h2><?php _e( 'PTRC via Yahoo Finanace:', 'my-text-domain' ); ?></h2> | |
<?php // Get RSS Feed(s) | |
include_once( ABSPATH . WPINC . '/feed.php' ); | |
// Get a SimplePie feed object from the specified feed source. | |
$rss = fetch_feed( 'http://feeds.finance.yahoo.com/rss/2.0/headline?s=PTRC®ion=US&lang=en-US' ); | |
if ( ! is_wp_error( $rss ) ) : // Checks that the object is created correctly |
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
Page Template | |
<?php | |
/** | |
* Template Name: Press By Year | |
*/ | |
get_header(); ?> | |
<div id="content-full" class="grid col-940"> |
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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script> | |
(function($) { | |
function getStock(opts, type, complete) { | |
var defs = { | |
desc: false, | |
baseURL: 'http://query.yahooapis.com/v1/public/yql?q=', | |
query: { | |
quotes: 'select * from yahoo.finance.quotes where symbol = "{stock}" | sort(field="{sortBy}", descending="{desc}")', | |
historicaldata: 'select * from yahoo.finance.historicaldata where symbol = "{stock}" and startDate = "{startDate}" and endDate = "{endDate}"' |
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
#include <linux/init.h> | |
#include <linux/kernel.h> | |
#include <linux/module.h> | |
/* This function is called when the module is loaded. */ | |
int simple init(void){ | |
printk(KERN INFO "Loading Module\n"); return 0; | |
} | |
/* This function is called when the module is removed. */ |
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 | |
// This file assumes that you have included the nav walker from https://github.com/twittem/wp-bootstrap-navwalker | |
// somewhere in your theme. | |
?> | |
<header class="banner navbar navbar-default navbar-static-top material-static-top" role="banner"> | |
<div class="container"> | |
<div class="navbar-header material-header"> | |
<link href='https://fonts.googleapis.com/css?family=Roboto:400,900,700,300' rel='stylesheet' type='text/css'> | |
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> | |
<span class="sr-only"><?= __('Toggle navigation', 'sage'); ?></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
#!/bin/bash | |
DARKGRAY='\033[1;30m' | |
RED='\033[0;31m' | |
LIGHTRED='\033[1;31m' | |
GREEN='\033[0;32m' | |
YELLOW='\033[1;33m' | |
BLUE='\033[0;34m' | |
PURPLE='\033[0;35m' | |
LIGHTPURPLE='\033[1;35m' |
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('pre_get_posts', 'filter_categories_homepage'); | |
function filter_categories_homepage($query) { | |
if ($query->is_main_query() && is_home()) { | |
$query->set('category_name','tutorials'); | |
} | |
} | |
?> |