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 dlm_ninja_forms_redirect_to_download() { | |
if ( isset( $_POST['_download_id'] ) ) { | |
global $ninja_forms_processing; | |
$ninja_forms_processing->update_form_setting( 'landing_page', site_url( '/download/' . $_POST['_download_id'] . '/' ) ); | |
} | |
} | |
add_action( 'ninja_forms_post_process', 'dlm_ninja_forms_redirect_to_download', 1, 2 ); |
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_only_parent_posts( $args ) { | |
$args['post_parent'] = 0; | |
return $args; | |
} | |
add_filter( 'pc_manual_link_post_query_args', 'pc_only_parent_posts' ); |
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
<script> | |
var dlm_has_access = 1; | |
<?php if ( ! apply_filters( 'dlm_can_download', true, $download, $version ) ) : ?> | |
dlm_has_access = 0; | |
<?php endif ?> | |
_gscq = window._gscq || []; | |
_gscq.push(['targeting','dlm_has_access', dlm_has_access]); | |
</script> |
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 | |
global $wp_query, $dlm_download, $dlm_page_addon; | |
echo apply_filters( 'dlm_widget_downloads_list_start', '<ul class="dlm-downloads">' ); | |
if ( count( $downloads ) ) { | |
foreach ( $downloads as $download ) { | |
$dlm_download = new DLM_Download( $download->ID ); | |
echo apply_filters( 'dlm_widget_downloads_list_item_start', '<li>' ); |
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 dlm_only_top_categories( $args ) { | |
$args[ 'parent' ] = 0; | |
return $args; | |
} | |
add_filter( 'dlm_page_addon_get_category_args', 'dlm_only_top_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
<?php | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} // Exit if accessed directly | |
?> | |
<a class="download-link" title="<?php if ( $dlm_download->has_version_number() ) { | |
printf( __( 'Version %s', 'download-monitor' ), $dlm_download->get_the_version_number() ); | |
} ?>" href="<?php $dlm_download->the_download_link(); ?>" rel="nofollow"> | |
<?php $dlm_download->the_title(); ?> |
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 ) { | |
$my_label = 'What Download?'; // set this to the exact label of your download select field | |
// fetch download ID from select | |
$selected_download = 0; | |
if ( isset( $form['fields'] ) && is_array( $form['fields'] ) && count( $form ) > 0 ) { | |
foreach ( $form['fields'] as $field ) { |
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
.wpcm-contact a { | |
color: #fff; | |
font-weight: bold; | |
box-sizing: border-box; | |
} |
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( 'wpcm_currencies', function( $currencies ) { | |
$currencies[ 'LKR' ] = 'Sri Lankan Rupee'; | |
return $currencies; | |
}, 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
@media (max-width: 750px) { | |
.rp4wp-related-posts .rp4wp-posts-list .rp4wp-col .rp4wp_component_wrapper { | |
padding: 0; | |
margin: 0; | |
} | |
.rp4wp-related-posts .rp4wp-posts-list .rp4wp-col .rp4wp_component_wrapper_left { | |
width: 35%; | |
} |