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 | |
function dlm_modify_download_url( $url ) { | |
// todo modify your URL here | |
$url = str_ireplace( "://domain.com/download/", "://domain.com/index.php/download/", $url ); | |
return $url; | |
} | |
add_filter( "dlm_download_get_the_download_link", "dlm_modify_download_url" ); |
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 | |
function dlm_pa_search_prior_results() { | |
if ( ! empty( $_GET['download_search'] ) ) { | |
// template handler | |
$template_handler = new DLM_Template_Handler(); | |
//show search box | |
$template_handler->get_template_part( 'search-downloads', '', plugin_dir_path( DLM_PA_FILE ) . 'templates/' ); | |
} |
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 $excerpt = wp_trim_words( strip_tags( strip_shortcodes( ( ( '' != $related_post->post_excerpt ) ? $related_post->post_excerpt : $related_post->post_content ) ) ), $excerpt_length ); ?> | |
<p><?php | |
global $post; | |
$o_post = $post; | |
$post = $related_post; | |
echo apply_filters( 'rp4wp_post_excerpt', $excerpt, $related_post->ID ); | |
$post = $o_post; | |
?></p> |
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_exclude_category( $sql, $post_id, $post_type ) { | |
global $wpdb; | |
if ( 'post' !== $post_type ) { | |
return $sql; | |
} | |
// get term with slug 'past-events' | |
$term = get_term_by( 'slug', 'past-events', 'category' ); | |
$term2 = get_term_by( 'slug', 'uncategoried', 'category' ); |
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 | |
/** | |
* Default output for a download via the [download] shortcode | |
*/ | |
global $dlm_download, $dlm_page_addon; | |
?> | |
<a class="download-link" href="<?php echo $dlm_page_addon->get_download_info_link( $dlm_download ); ?>" rel="nofollow"> | |
<?php $dlm_download->the_title(); ?> | |
</a> |
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_disable_rposts_on_certain_categories( $display ) { | |
global $post; | |
// ID's of categories you wish to exclude of displaying posts | |
$excluded_categories = array( 96, 100 ); | |
$terms = wp_get_object_terms( $post->ID, 'category' ); | |
if ( ! empty( $terms ) ) { | |
foreach ( $terms as $term ) { | |
if ( in_array( $term->term_id, $excluded_categories ) ) { |
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_wp_job_manager_use_normal_template( $located, $template_name, $args, $template_path, $default_path ) { | |
if ( 'related-post-default.php' === $template_name && 'job_listing' === $args['related_post']->post_type ) { | |
$manager_template = new RP4WP_Manager_Template(); | |
$located = $manager_template->locate_template( 'related-post-default.php', $template_path, $default_path ); | |
} | |
return $located; | |
} |
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
remove_action( 'wpcm_vehicle_content', 'wpcm_template_single_features', 30 ); | |
add_action( 'wpcm_vehicle_content', 'wpcm_template_single_features', 5 ); |