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 | |
// Get the connected posts | |
$my_connected_downloads = Post_Connector::API()->get_children( "your-dlm-connection", get_the_id() ); | |
// Check | |
if ( count( $my_connected_downloads ) > 0 ) { | |
// Loop | |
foreach ( $my_connected_downloads as $my_connected_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 dlm_download_headers_remove_robots( $headers ) { | |
unset( $headers['X-Robots-Tag'] ); | |
return $headers; | |
} | |
add_filter( 'dlm_download_headers', 'dlm_download_headers_remove_robots', 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
$plm = new RP4WP_Post_Link_Manager(); | |
wp_send_json( $plm->get_children( $_GET['parent_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 dlm_custom_na_redirect( $url ) { | |
return "https://www.never5.com/"; | |
} | |
add_filter( "dlm_access_denied_redirect", "dlm_custom_na_redirect" ); |
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 | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<style type="text/css"> |
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_gf_custom_max_cookies( $t ) { | |
return 2147483647; | |
} | |
add_filter( 'dlm_gf_cookie_expire_time', 'dlm_gf_custom_max_cookies' ); | |
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_gf_custom_30_day_cookies( $t ) { | |
return time()+60*60*24*30; | |
} | |
add_filter( 'dlm_gf_cookie_expire_time', 'dlm_gf_custom_30_day_cookies' ); |
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 | |
* Taken from /plugins/dlm-page-addon/content-download-pa.single | |
*/ | |
global $dlm_download, $dlm_page_addon; | |
if ( $dlm_download == null ) { | |
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
function dlm_custom_referrer( $refs ) { | |
$refs[] = "https://www.yourchinesedomain.cn"; | |
return $refs; | |
} | |
add_filter( 'dlm_hotlink_allowed_referers', 'dlm_custom_referrer' ); |