Skip to content

Instantly share code, notes, and snippets.

@purethemes
purethemes / FontAwesome.php
Created August 21, 2016 16:12
Font Awesome PHP Array
<?php
// Font Awesome v. 4.6.
function purethemes_get_font_icons() {
return array('fa-glass'=>'Glass','fa-music'=>'Music','fa-search'=>'Search','fa-envelope-o'=>'Envelope O','fa-heart'=>'Heart','fa-star'=>'Star','fa-star-o'=>'Star O','fa-user'=>'User','fa-film'=>'Film','fa-th-large'=>'Th Large','fa-th'=>'Th','fa-th-list'=>'Th List','fa-check'=>'Check','fa-times'=>'Times','fa-search-plus'=>'Search Plus','fa-search-minus'=>'Search Minus','fa-power-off'=>'Power Off','fa-signal'=>'Signal','fa-cog'=>'Cog','fa-trash-o'=>'Trash O','fa-home'=>'Home','fa-file-o'=>'File O','fa-clock-o'=>'Clock O','fa-road'=>'Road','fa-download'=>'Download','fa-arrow-circle-o-down'=>'Arrow Circle O Down','fa-arrow-circle-o-up'=>'Arrow Circle O Up','fa-inbox'=>'Inbox','fa-play-circle-o'=>'Play Circle O','fa-repeat'=>'Repeat','fa-refresh'=>'Refresh','fa-list-alt'=>'List Alt','fa-lock'=>'Lock','fa-flag'=>'Flag','fa-headphones'=>'Headphones','fa-volume-off'=>'Volume Off','fa-volume-down'=>'Volume Down','fa-volume-up'=>'Volume Up','fa-
body.woocommerce-checkout .woocommerce-shipping-fields { display: none; }
.woocommerce-checkout .col2-set { float: left; width: 48% !important; }
.woocommerce-checkout-review-order { float: right; width: 48%; }
.woocommerce-page .checkout .col-1, .woocommerce-page .checkout .col-2 { width: 100% !important; }
@media only screen and (max-width: 768px) {
[column width="1" place="none" ][headline]Our Clients[/headline][clients]
<ul>
<li><a title="Cubico" href="#"><img class="alignnone size-full wp-image-15" src="http://vasterad.com/themes/centum/images/logo-01.png" alt="" width="235" height="100" /></a></li>
<li><a title="King" href="#"><img class="alignnone size-full wp-image-15" src="http://vasterad.com/themes/centum/images/logo-02.png" alt="" width="235" height="100" /></a></li>
<li><a title="Hexagon" href="#"><img class="alignnone size-full wp-image-15" src="http://vasterad.com/themes/centum/images/logo-03.png" alt=" width="235" height="100" /></a></li>
<li><a title="Coffee" href="#"><img class="alignnone size-full wp-image-15" src="http://vasterad.com/themes/centum/images/logo-04.png" alt="" width="235" height="100" /></a></li>
<li><a title="Social Mates" href="#"><img class="alignnone size-full wp-image-15" src="http://vasterad.com/themes/centum/images/logo-05.png" alt="" width="235" height="100" /></a></li>
</ul>
[/clients][/column]
@purethemes
purethemes / functions.php
Created June 10, 2016 07:53
Make Location required in WP Job Manager submit fields
<?php
add_filter( 'submit_job_form_fields', 'required_location_submit_job_form_fields' );
function required_location_submit_job_form_fields( $fields ) {
$fields['job']['job_location']['required'] = true; // And return the modified fields
return $fields;
}
?>
function has_active_job_package_capability_check( $allcaps, $cap, $args ) {
// Only interested in has_active_job_package
if ( empty( $cap[0] ) || $cap[0] !== 'has_active_job_package' || ! function_exists( 'wc_paid_listings_get_user_packages' ) ) {
return $allcaps;
}
$user_id = $args[1];
$packages = wc_paid_listings_get_user_packages( $user_id, 'resume' );
<li>
<i class="fa fa-calendar"></i>
<div>
<strong><?php esc_html_e('Expiration date','workscout'); ?>:</strong>
<span><?php echo date_i18n( get_option( 'date_format' ), strtotime( get_post_meta( $post->ID, '_job_expires', true ) ) ) ?></span>
</div>
</li>
[headline]Popular Categories[/headline][box_job_categories browse_link="http://workscout.purethe.me/browse-categories/"][column width="eleven" place="first"] [headline]Recent Jobs[/headline] [jobs show_filters="false" show_description="false" per_page="4"] [/column] [column width="five" place="last"] [spotlight_jobs featured="null" categories="automotive-jobs"][/column][testimonials_wide background="http://workscout.in/wp-content/uploads/2015/11/testimonials-bg.jpg"][actionbox buttontext="Get started" ] [headline]Recent Posts[/headline] [latest_from_blog]
<?php
/* add a custom tab to show user pages */
add_filter('um_profile_tabs', 'chow_recipes_pages_tab', 1000 );
function chow_recipes_pages_tab( $tabs ) {
$tabs['recipes'] = array(
'name' => 'Favourite Recipes',
'icon' => 'fa fa-heart-o',
'custom' => true
);
return $tabs;
$("#cart").hoverIntent({
sensitivity: 3,
interval: 60,
over: function () {
$('.cart-list', this).fadeIn(200);
$('.cart-btn a.button', this).addClass('hovered');
},
timeout: 220,
out: function () {
$('.cart-list', this).fadeOut(100);
<?php
/**
* The header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package Chow
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>