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 //* Mind this opening PHP tag | |
/* | |
* Removes the standard WordPress profile settings for Twitter, Google+ and Facebook | |
* Adds custom fields for Twitter, Facebook, LinkedIn and Google+ | |
* Removing and adding Twitter, Google+ and Facebook is not completely necessay | |
* I did this so I knew exactly what these fields were doing | |
*/ | |
//* Add custom meta fields |
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 //* Mind this opening PHP tag | |
/** | |
* This snippet requires the Deafult Featured Image plugin to be installed | |
* https://wordpress.org/plugins/default-featured-image/ | |
* It replaces the image you selected as your default with one of your choosing | |
*/ | |
//* Set default post thumbnail | |
add_filter( 'dfi_thumbnail_id', 'rv_conditional_default_thumbnails' ); |
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 //* Mind this opening PHP tag | |
/** | |
* Source: http://www.gravityhelp.com/documentation/page/Delete_Entry_Data_After_Post_Submission | |
*/ | |
//* Automatically remove entry from database; remove _(FORMID) for all forms | |
add_action('gform_post_submission_1', 'remove_form_entry', 10, 2); | |
function remove_form_entry($entry, $form){ | |
global $wpdb; |
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 //* Mind this opening PHP tag | |
/** | |
* Register Invoice Type | |
* | |
* @author Ren Ventura | |
* @link http://www.engagewp.com/create-invoices-gravty-forms-wordpress | |
*/ | |
add_action( 'init', 'rv_invoice_cpt' ); |
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
[ | |
{ | |
"key": "group_54765e908ee2b", | |
"title": "Invoice Fields", | |
"fields": [ | |
{ | |
"key": "field_54765eb0666bb", | |
"label": "Client Name", | |
"name": "invoice_client_name", | |
"prefix": "", |
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 //* Mind this opening PHP tag | |
/** | |
* Single invoice template | |
* | |
* @author Ren Ventura | |
* @link http://www.engagewp.com/create-invoices-gravty-forms-wordpress | |
*/ | |
//* Define running total global variable |
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 //* Mind this opening PHP tag | |
/** | |
* Send an email to the invoice_client_email custom field in the Invoice post type | |
* The acf/save_post hook is specific to the Advanced Custom Fields plugin | |
* | |
* @author Ren Ventura | |
* @link http://www.engagewp.com/create-invoices-gravty-forms-wordpress | |
*/ |
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 //* Mind this opening PHP tag | |
//* Attaches an external PHP script to a post excerpt | |
add_filter( 'the_excerpt', 'my_custom_excerpt' ); | |
function my_custom_excerpt( $output ) { | |
global $post; | |
ob_start(); | |
include 'myscript.php'; |
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 //* Mind this opening PHP tag | |
/** | |
* This function adds an unordered list of child pages right before the post content in Genesis | |
* The list is BEFORE the page content - change to a lower priority to show AFTER (i.e. 999) | |
* | |
* @global object $post The current post object. | |
*/ | |
add_action( 'genesis_entry_content', 'rv_list_child_pages_with_thumbnails', 5 ); | |
function rv_list_child_pages_with_thumbnails() { |