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 // Copy and Paste snippet below into child-theme functions or custom plugin -- DELETE THIS LINE | |
// Conditional Load WPCF7 assets - use this if globally disabling them first | |
if ( function_exists( 'wpcf7_enqueue_scripts' ) ) { | |
wpcf7_enqueue_scripts(); | |
} | |
if ( function_exists( 'wpcf7_enqueue_styles' ) ) { | |
wpcf7_enqueue_styles(); | |
} |
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 // Copy and Paste snippet below into child-theme functions or custom plugin -- DELETE THIS LINE | |
// Globally disables WPCF7 JS & CSS | |
add_filter( 'wpcf7_load_js', '__return_false' ); | |
add_filter( 'wpcf7_load_css', '__return_false' ); |
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 // Copy and Paste snippet below into child-theme functions or custom plugin -- DELETE THIS LINE | |
// Remove X-Pingback from Header | |
add_action('wp', function() { | |
header_remove('X-Pingback'); | |
}, 1000); |
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 // Copy and Paste snippet below into child-theme functions -- DELETE THIS LINE | |
add_action( 'wp_enqueue_scripts', 'skf_custom_scripts', 100 ); | |
function skf_custom_scripts() | |
{ | |
// Stylesheets | |
wp_dequeue_style( 'bootstrap' ); | |
wp_deregister_style( 'bootstrap' ); |
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 // Copy and Paste snippet below into child-theme functions or custom plugin -- DELETE THIS LINE | |
// Remove Visual Composer Meta Data from source code | |
add_action('init', 'skf_remove_vc_metadata', 100); | |
function skf_remove_vc_metadata() { | |
remove_action('wp_head', array(visual_composer(), 'addMetaData')); | |
} |
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 // Copy and Paste snippet below into child-theme functions or custom plugin -- DELETE THIS LINE | |
// Disable WordPress JSON-REST API | |
function disable_json_api () { | |
// Remove the REST API lines from the HTML Header | |
remove_action( 'wp_head', 'rest_output_link_wp_head', 10 ); | |
remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 ); | |
// Filters for WP-API version 1.x |
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 | |
/** | |
* The base configuration for WordPress | |
* | |
* The wp-config.php creation script uses this file during the | |
* installation. You don't have to use the web site, you can | |
* copy this file to "wp-config.php" and fill in the values. | |
* | |
* This file contains the following configurations: | |
* |
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
// Public Function (Replace lines 39-58 of wppb.io's default class-your-custom-post-type.php) | |
public function __construct ( $post_type = '', $plural = '', $single = '', $description = '', $menu_position = '', $menu_icon = '', $slug = '' ) { | |
if ( ! $post_type || ! $plural || ! $single ) return; | |
// Post type name and labels | |
$this->post_type = $post_type; | |
$this->plural = $plural; | |
$this->single = $single; |
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
/** | |
* Register Custom Post Types | |
* | |
* How this works: Paste the line below in your plugin's main cpts.php file | |
* | |
* Your_Plugin_CPTS()->register_post_type( 'SAMPLE_POST_TYPE', __( 'SAMPLE_PLURAL_NAME', 'your-plugin-name-cpts' ), __( 'SAMPLE_DESCRIPTION Page', 'your-plugin-name-cpts' ), __( 'SAMPLE_MENU_POSITION', 'your-plugin-name-cpts' ), __( 'SAMPLE_DASHICON', 'your-plugin-name-cpts' ), __( 'SAMPLE_SLUG', 'your-plugin-name-cpts' ) );Your_Plugin_CPTS()->register_post_type('SAMPLEPOSTTYPE', __) | |
* | |
* Replace all "SAMPLE_BLAH_BLAH" with desired options. | |
*/ | |