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
| pragma solidity ^0.5.0; | |
| contract mortal { | |
| /* Define variable owner of the type address */ | |
| address owner; | |
| /* This function is executed at initialisation and sets the owner of the contract */ | |
| constructor() public { owner = msg.sender; } | |
| /* Function to recover the funds of the contract */ |
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 | |
| /* | |
| * Select one or more of the options below to your wp-config.php file to have WordPress updates run automatically. | |
| */ | |
| // Apply Major WordPress Updates Automatically | |
| define( 'WP_AUTO_UPDATE_CORE', true ); | |
| // Apply Minor WordPress Updates Automatically |
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 | |
| // Cheatsheet for customising the WordPress Login page | |
| function my_custom_login() { | |
| echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('stylesheet_directory') . '/login/ENTER_URL.css" />'; | |
| } | |
| add_action('login_head', 'my_custom_login'); | |
| function my_login_logo_url() { | |
| return get_bloginfo( 'url' ); |
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 | |
| // Send Gravity Form notifications in plain text when Notification is called `Plain Text Notification` | |
| add_filter( 'gform_notification', 'change_notification_format', 10, 3 ); | |
| function change_notification_format( $notification, $form, $entry ) { | |
| GFCommon::log_debug( 'gform_notification: change_notification_format() running.' ); | |
| // Do the thing only for a notification with the name `Plain Text Notification` | |
| if ( $notification['name'] == 'Plain Text Notification' ) { | |
| GFCommon::log_debug( 'gform_notification: format changed to text.' ); | |
| // Change notification format to text from the default html |
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 | |
| // Delete Gravity Form Entries for form ID 1 after submission. | |
| // Switch action to `gform_after_submission` to target all forms. | |
| add_action( 'gform_after_submission_1', 'remove_form_entry' ); | |
| function remove_form_entry( $entry ) { | |
| GFAPI::delete_entry( $entry['id'] ); | |
| } |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Response> | |
| <Dial callerId="+TWILIO_NUMBER">{{#e164}}{{To}}{{/e164}}</Dial> | |
| </Response> |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Response> | |
| <Dial> | |
| <Sip> | |
| USERNAME@SIP_DOMAIN.sip.us1.twilio.com | |
| </Sip> | |
| </Dial> | |
| </Response> |
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 Archive Settings for multiple Custom Post Types via Genesis | |
| $types = array('custom-post-type-1', 'custom-post-type-2'); | |
| foreach ( $types as $type ) { | |
| add_post_type_support( $type, 'genesis-cpt-archives-settings' ); | |
| } |
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 | |
| /** | |
| * Register Theme Support for Gutenberg Wide Images | |
| */ | |
| function enable_wide_images() { | |
| add_theme_support( 'align-wide' ); | |
| } | |
| add_action( 'after_setup_theme', 'enable_wide_images' ); |
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 Portfolio Headlines to WordPress Categories */ | |
| function addPortfolioHeadlineFieldsToCat(){ | |
| $portfolio_headline = get_term_meta($_GET['tag_ID'], '_portfolio_headline', true); | |
| $portfolio_sub_headline = get_term_meta($_GET['tag_ID'], '_portfolio_sub_headline', true); | |
| ?> | |
| <h2><?php _e('Portfolio Headline Settings'); ?></h2> | |
| <table class="form-table"> | |
| <tbody> |