This file contains hidden or 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 | |
| /** | |
| * Remove the default Sell Media action. | |
| * We'll replace it with our own custom action hook below. | |
| */ | |
| remove_action( 'sell_media_before_content', 'sell_media_append_media' ); | |
| /** | |
| * Add our new action hook to alter the media (featured image, etc) before the_content in Sell Media |
This file contains hidden or 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 | |
| /** | |
| * Filter for prints text | |
| */ | |
| function sell_media_print_text_filter(){ | |
| return 'books'; | |
| } | |
| add_filter( 'sell_media_print_text', 'sell_media_print_text_filter' ); |
This file contains hidden or 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 | |
| /** | |
| * Plugin Name: Sell Media Image Size Filter | |
| * Plugin URI: https://graphpaperpress.com/plugins/sell-media/ | |
| * Description: Filter to Sell Media that adds a new image size for a new image aspect ratio used in Sell Media archives and shortcodes | |
| * Version: 1.0.0 | |
| * Author: Thad Allender | |
| * Author URI: https://graphpaperpress.com | |
| * Author Email: support@graphpaperpress.com | |
| * Text Domain: sell_media |
This file contains hidden or 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
| jQuery( document ).ready( function( $ ) { | |
| // This is where we apply opacity to the intro overlay | |
| $( window ).scroll( function() { | |
| // Hide the overlay if user has scrolled past 1px from top | |
| if ( $( window ).scrollTop() >= 1 ) { | |
| $( '.vanishing-message' ).removeClass('has-overlay'); | |
| $( '.vanishing-message .text' ).css( 'opacity', 0 ); | |
| } |
This file contains hidden or 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="vanishing-message"> | |
| <img src="https://images.graphpaperpress.com.s3.amazonaws.com/sky-2400x1200.jpeg" /> | |
| <div class="text"> | |
| <span class="prelude">Commercial / Editorial / Advertising</span> | |
| <span class="desc">Photography by Grant Smith</span> | |
| </div> | |
| </div> |
This file contains hidden or 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
| .vanishing-message { | |
| position: relative; | |
| } | |
| .vanishing-message img { | |
| width: 100%; | |
| height: auto; | |
| display: block; | |
| } |
This file contains hidden or 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 | |
| /** Enable my local themes and plugins repository FFS!!! */ | |
| function allow_my_custom_host( $allow, $host, $url ) { | |
| if ( $host == 'put-your-repository-domain-here.com' ) | |
| $allow = true; | |
| return $allow; | |
| } | |
| add_filter( 'http_request_host_is_external', 'allow_my_custom_host', 10, 3 ); |
This file contains hidden or 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 the following function to your own functionality plugin | |
| * or add it to your theme's functions.php file. | |
| * Change any of the text inside the return value. | |
| */ | |
| function my_sell_media_tos_label() { | |
| return 'Hey this is my custom text. Please agree to our <a href="javascript:void(0);" class="sell-media-empty-dialog-trigger">terms of service</a>.'; | |
| } |
This file contains hidden or 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 | |
| /** | |
| * Plugin Name: My Sell Media Shortcode | |
| * Plugin URI: http://graphpaperpress.com/plugins/sell-media/ | |
| * Description: An example shortcode plugin for Sell Media. | |
| * Version: 1.0 | |
| * Author: Graph Paper Press | |
| * Author URI: http://graphpaperpress.com | |
| * Author Email: support@graphpaperpress.com | |
| * Text Domain: sell_media |
This file contains hidden or 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 | |
| /** | |
| * Filter the "Manual Purchase" text shown on the Checkout page | |
| */ | |
| function sell_media_manual_purchases_filter_text(){ | |
| return 'Cash/Check'; | |
| } | |
| add_filter( 'sell_media_manual_purchases_text', 'sell_media_manual_purchases_filter_text' ); |