Skip to content

Instantly share code, notes, and snippets.

@3GA
3GA / sanfrancisco-font.css
Created December 7, 2016 19:40
San Francisco Web Font
/**
* http://applemusic.tumblr.com/
* https://jsfiddle.net/xq56dmrh/
*/
/** Ultra Light */
@font-face {
font-family: "San Francisco";
font-weight: 100;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff");
@3GA
3GA / functions.php
Created September 21, 2016 11:20 — forked from WebEndevSnippets/functions.php
Add Login / Logout Links To The Custom Menu Area
add_filter( 'wp_nav_menu_items', 'we_add_loginout_link', 10, 2 );
/**
* Add login/logout and registration links to header menu
*
* @author Bruce Munson, WebEndev
*
*/
function we_add_loginout_link( $items, $args ) {
if (is_user_logged_in() && $args->theme_location == 'header') {
$items .= '<li class="menu-item"><a href="'. wp_logout_url() .'">Log Out</a></li>';
@3GA
3GA / functions.php
Created September 21, 2016 11:14 — forked from WebEndevSnippets/functions.php
Gravity Forms: Auto login to site after GF User Registration Form Submittal
add_action( 'gform_user_registered','we_autologin_gfregistration', 10, 4 );
/**
* Auto login to site after GF User Registration Form Submittal
*
*/
function we_autologin_gfregistration( $user_id, $config, $entry, $password ) {
wp_set_auth_cookie( $user_id, false, '' );
}
@3GA
3GA / new_gist_file.css
Created August 5, 2016 11:43 — forked from spigists/new_gist_file.css
Bootstrap 3 styles for Gravity Forms, make sure that in Forms > Settings you have Output CSS set to No and Output HTML5 set to Yes
.gform_wrapper ul {
padding-left: 0;
list-style: none; }
.gform_wrapper li {
margin-bottom: 15px; }
.gform_wrapper form {
margin-bottom: 0; }
@3GA
3GA / Gravity Forms Get Credit Card Details
Created August 3, 2016 11:00 — forked from DeveloperWil/Gravity Forms Get Credit Card Details
Enables the credit card fields for Gravity Forms and provides a function to get the credit card details which are not available through the filter $form or $entry
//Turn on our credit card field for admin and front end
add_action("gform_enable_credit_card_field", "enable_creditcard");
function enable_creditcard($is_enabled){
return true;
}
//Email encoded card details when the form is submitted.
add_action('gform_after_submission', 'email_encoded_cc', 10, 2);
function email_encoded_cc($entry, $form) {
function get_creditcard_field($form){
$fields = GFCommon::get_fields_by_type($form, array("creditcard"));
@3GA
3GA / parallax-image-with-text.html
Created April 20, 2016 09:07 — forked from pascalmaddin/parallax-image-with-text.html
An Image with parallax-effect and with some text, which is fading out while scrolling
<div id="banner">
<div class="wrap-center">
<div class="banner-centered" id="banner-text">
<h2>Hello <strong>We Are Company-Name</strong>, Glad To See You. :-)</h2>
</div>
</div>
</div>