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 | |
/** Do NOT include the opening php tag */ | |
add_action( 'init', 'btc_tweak_remove_integration' ); | |
/** | |
* Plugin: Builder Template Categories - Remove one or more integrations. | |
* | |
* @author David Decker - DECKERWEB | |
* @link https://gist.github.com/deckerweb/07416fe610ed992650cbadfb77c5ee74 |
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 | |
/** Do NOT include the opening php tag */ | |
add_filter( 'btc/filter/capability/submenu', 'btc_custom_capability_submenu' ); | |
/** | |
* Plugin: Builder Template Categories - Custom capability. | |
* | |
* @author David Decker - DECKERWEB | |
* @link https://gist.github.com/deckerweb/89f5f8d2b8d31073401a80ef6d0f10dc |
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 | |
/** Do NOT include the opening php tag */ | |
add_filter( 'btc/filter/integrations/all', 'btc_register_custom_integration' ); | |
/** | |
* Plugin: Builder Template Categories - Register custom integration. | |
* | |
* @author David Decker - DECKERWEB | |
* @link https://gist.github.com/deckerweb/cae6d2703400601e2e78be3a27e93cfb |
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 | |
echo get_post_field('post_content', $post_id); // retrieve content | |
echo get_post_field('post_name', $post_id); // retrieve the slug | |
?> |
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 | |
/** | |
* Style pagination to look like Genesis. | |
* | |
* @version 1.0.0 | |
* | |
* @author Mike Hemberger @JiveDig | |
* | |
* @link https://halfelf.org/2017/facetwp-genesis-pagination/ |
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
//The following section is an add-on to this tutorial - https://tri.be/gravity-forms-events-calendar-submissions/ | |
//Shout to CreativeSlice.com for their initial work | |
/* Before Starting: | |
- Make sure you have these three plugins installed | |
- Gravity Forms | |
- The Events Calendar | |
- Gravity Forms + Custom Post Types | |
- Once Gravity Forms is installed, create a form with these fields | |
- Single Line Text (Event Title) | |
- Paragraph Text (Event Description) |
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 | |
/** Do NOT include the opening php tag */ | |
/** | |
* Do not load a list of Google Fonts in Astra | |
* | |
* @link https://gist.github.com/deckerweb/528e9f64f09b15ed4d6729b77d87dc78 | |
* @author David Decker - DECKERWEB | |
*/ |
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 | |
/** | |
* Plugin Name: Automatic Dark Mode | |
* Plugin URI: https://github.com/danieltj27/Dark-Mode/ | |
* Description: Lets your users make the WordPress admin dashboard darker. | |
* Author: Daniel James | |
* Author URI: https://www.danieltj.co.uk/ | |
* Text Domain: auto-dark-mode | |
* Version: 1.0 |
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 | |
//* Call the First Image in a Post (Used in the Open Graph Call Below) | |
function catch_first_image() { | |
global $post, $posts; | |
$first_img = ''; | |
ob_start(); | |
ob_end_clean(); | |
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); | |
$first_img = $matches [1] [0]; |