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 type="text/javascript"> | |
// let's make call to the global gwrf variable visible after enabling Gravity Forms | |
window.gwrf; | |
(function ($) { | |
gwrf = function (args) { | |
// prototype arguments, created when we instantiate it | |
this.formId = args.formId; | |
this.spinnerUrl = args.spinnerUrl; |
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
/********Link-Klasse****/ | |
a.download-button { | |
color: #fff !important; | |
background: #c8504b; | |
padding: 10px 20px; | |
border-radius: 2px; | |
margin: 5px; | |
} | |
/****** angewendeter Code auf alle Links, die nicht .fy-button als Klasse haben ***/ |
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 | |
// Automatically convert permalinks to PDFs in search results to the PDF itself, not the Attachment page | |
add_filter( 'the_permalink', function( $permalink ) { | |
global $post; | |
if ( is_search() && 'application/pdf' == get_post_mime_type( $post->ID ) ) { | |
// if the result is a PDF, link directly to the file not the attachment page | |
$permalink = wp_get_attachment_url( $post->ID ); | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |