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
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 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
ul.dlm-downloads { | |
list-style: none !important; | |
padding: 0 !important; | |
margin: 0 !important; | |
} | |
ul.dlm-downloads li { | |
padding-left: 0 !important; | |
} |
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
add_filter( 'dlm_remove_dashboard_popular_downloads', '__return_true' ); |
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
function rp4wp_thumbnail_size_full( $thumb_size ) { | |
return 'full'; | |
} | |
add_filter( 'rp4wp_thumbnail_size', 'rp4wp_thumbnail_size_full', 10, 1 ); |
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 | |
add_action( 'wpcm_vehicle_content', function ( $vehicle ) { | |
echo "<ul>"; | |
}, 1, 1 ); | |
add_action( 'wpcm_vehicle_content', function ( $vehicle ) { | |
echo "</ul>"; | |
}, 99, 1 ); |
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
add_filter( 'dlm_en_field_my_custom_field', function( $field, $log_item, $download, $version) { | |
$field['label'] = "you label"; | |
$field['value'] = "your value"; | |
} ); |
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
add_filter( 'dlm_widget_downloads_list_start', function ( $return ) { | |
global $wp; | |
$term = get_term_by( 'slug', sanitize_title( $wp->query_vars['download-category'] ), 'dlm_download_category' ); | |
if ( ! is_wp_error( $term ) ) { | |
$return = '<h2>' . $term->name . '</h2>' . $return; | |
} | |
return $return; | |
} ); |
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 | |
/** | |
* Default output for a download via the [download] shortcode | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} // Exit if accessed directly | |
/** @var DLM_Download $dlm_download */ |
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
function custom_wpcm_remove_mileage($fields, $vehicle) { | |
unset($fields['frdate']); | |
return $fields; | |
} | |
add_filter("wpcm_single_vehicle_data_fields", "custom_wpcm_remove_mileage", 10, 2); |
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 | |
/** | |
* Setup some data | |
*/ | |
// get the post type | |
$post_type = get_post_type( get_the_id() ); | |
// The settings object | |
$pt_settings = RP4WP()->settings[ 'general_' . $post_type ]; | |
/** |