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: Custom Functions for Beaver Builder | |
| Plugin URI: https://nathaningram.com | |
| Description: Extend and Customize Beaver Builder | |
| Version: 2023.11 | |
| Author: Nathan Ingram | |
| Author URI: https://nathaningram.com | |
| License: GPL2 | |
| */ |
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: Custom Gravity Forms Fuctions | |
| Plugin URI: https://nathaningram.com | |
| Description: Customize Gravity Forms Default Behavior | |
| Version: 2023.11 | |
| Author: Nathan Ingram | |
| Author URI: https://nathaningram.com | |
| License: GPL2 | |
| */ |
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: Custom Core Functions | |
| Plugin URI: https://nathaningram.com | |
| Description: Customize the WP Core | |
| Version: 2023.11 | |
| Author: Nathan Ingram | |
| Author URI: https://nathaningram.com | |
| License: GPL2 | |
| */ |
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: Custom Dashboard Functions | |
| Plugin URI: https://nathaningram.com | |
| Description: Customize the WP Admin | |
| Version: 2023.11 | |
| Author: Nathan Ingram | |
| Author URI: https://nathaningram.com | |
| License: GPL2 | |
| */ |
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 | |
| /* Debug Options */ | |
| define( 'WP_DEBUG', false ); | |
| define( 'WP_DEBUG_LOG', false ); | |
| /* MySQL Settings */ | |
| define( 'DB_NAME', 'database_name_here' ); | |
| define( 'DB_USER', 'username_here' ); |
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
| /* Add Border to Images with PLACEHOLDER in filename */ | |
| img[src*="PLACEHOLDER"] { | |
| border:10px #FF0000 solid !important; | |
| } |
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
| // Removes Gridbuilder icon from TinyMCE | |
| add_filter( | |
| 'mce_buttons', | |
| function( $buttons ) { | |
| $key = array_search( 'wpgb', $buttons, true ); | |
| unset( $buttons[ $key ] ); | |
| return $buttons; | |
| }, 99 | |
| ); |
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
| // Set "Upcoming" as Default Tax for Events (this applies on publish) | |
| // Source: https://gist.github.com/mayeenulislam/f208b4fd408fd4742c06 | |
| function ni_set_default_object_terms( $post_id, $post ) { | |
| if ( 'publish' === $post->post_status ) { | |
| $defaults = array( | |
| 'post_tag' => array( 'event' ), | |
| 'event-status' => array( 'upcoming' ), | |
| ); | |
| $taxonomies = get_object_taxonomies( $post->post_type ); |
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
| // Change Placeholder Text in Title for CPT | |
| function ni_change_cpt_title_text( $title ){ | |
| $screen = get_current_screen(); | |
| if ( 'team' == $screen->post_type ) { | |
| $title = 'Enter Team Member Name '; | |
| } | |
| if ( 'service' == $screen->post_type ) { | |
| $title = 'Enter Service Name '; | |
| } //continue replicating these if statements for as many CPTs as you like |
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
| // Enable SVG Uploads in Beaver Builder Modules | |
| add_filter( 'fl_module_upload_regex', function( $regex, $type, $ext, $file ) { | |
| $regex['photo'] = '#(jpe?g|png|gif|bmp|tiff?|svg)#i'; | |
| return $regex; | |
| }, 10, 4 ); |