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_filter( 'rp4wp_disable_css', '__return_true' ); |
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
/** | |
* All downloads require visitors to be logged in | |
* | |
* @param $can_download | |
* @param $download | |
* | |
* @return bool | |
*/ | |
function vbmcauwemt_check_access( $can_download, $download ) { |
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
function rp4wp_force_same_category( $sql, $post_id, $post_type ) { | |
global $wpdb; | |
if ( 'post' !== $post_type ) { | |
return $sql; | |
} | |
$sql_replace = " | |
INNER JOIN " . $wpdb->term_relationships . " ON (R.`post_id` = " . $wpdb->term_relationships . ".object_id) | |
INNER JOIN " . $wpdb->term_taxonomy . " ON (" . $wpdb->term_relationships . ".term_taxonomy_id = " . $wpdb->term_taxonomy . ".term_taxonomy_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
function pc_theme_setup() { | |
add_image_size( 'pc_sidebar_image', 300, 100, true ); // width: 300, height: 100 - feel free to change these values | |
} | |
add_action( 'after_setup_theme', 'pc_theme_setup' ); | |
function pc_thumbnail_size( $size ) { | |
return 'pc_sidebar_image'; | |
} |
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
/** | |
* All downloads require visitors to be logged in | |
* | |
* @param $can_download | |
* @param $download | |
* | |
* @return bool | |
*/ | |
function dlm_all_downloads_members_only( $can_download, $download ) { |
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
// WP Car Manager change slug - Add this to your theme's functions.php | |
function wpcm_change_slug( $translated, $text, $context, $domain ) { | |
if ( 'wp-car-manager' == $domain ) { | |
if ( 'vehicle' == $text && 'post type slug' == $context ) { | |
$translated = 'my-cars'; // change slug of vehicle | |
} | |
} | |
return $translated; | |
} |
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
function wpcm_my_listings_vehicle_thumbnail_size( $thumb_size ) { | |
return 'wpcm-my-thumbnail'; | |
} | |
add_filter( 'wpcm_listings_vehicle_thumbnail_size', 'wpcm_my_listings_vehicle_thumbnail_size' ); | |
function wpcm_theme_setup_image_size() { | |
add_image_size( 'wpcm-my-thumbnail', 180, 180, true ); | |
} |
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
function rp4wp_change_heading( $heading ) { | |
$heading = str_ireplace( 'h3>', 'h2>', $heading ); | |
return $heading; | |
} | |
add_filter( 'rp4wp_heading', 'rp4wp_change_heading', 10, 1 ); |
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
// Gravity Forms Dynamic Redirect | |
add_filter( 'gform_confirmation', 'dlm_gf_dynamic_redirect', 10, 4 ); | |
function dlm_gf_dynamic_redirect( $confirmation, $form, $entry, $ajax ) { | |
// DLM GF Handler | |
$dlm_gf_handler = new DLM_GF_Gravity_Forms_Handler(); | |
// fetch download ID dynamically from form | |
$lead_id = $dlm_gf_handler->get_lead_index_of_dlm_field( $form ); |
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
function wpcm_my_large_thumbnail_size( $image_size ) { | |
$image_size = 'my-custom-image-size'; | |
return $image_size; | |
} | |
add_filter( 'wpcm_single_vehicle_large_thumbnail_size', 'wpcm_my_large_thumbnail_size', 10, 1 ); |