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_include_category( $sql, $post_id, $post_type ) { | |
global $wpdb; | |
if ( 'post' !== $post_type ) { | |
return $sql; | |
} | |
$sql_replace = sprintf( " | |
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
import Promise from 'promise-polyfill'; | |
// To add to window | |
if (!window.Promise) { | |
window.Promise = Promise; | |
} |
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_csv_export_custom_meta( $data ) { | |
$data[] = 'my_custom_download_meta_field'; | |
$data[] = 'my_custom_download_meta_field_2'; | |
return $data; | |
} | |
add_filter( 'dlm_ce_extra_fields_download_meta', 'dlm_csv_export_custom_meta' ); |
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 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} // Exit if accessed directly | |
?> |
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
<div id="download-page-tags" class="download_group"> | |
<h3><?php _e( 'Tags', 'dlm_page_addon' ); ?></h3> | |
<div class="download_tags"> | |
<?php echo wp_generate_tag_cloud( $tags, array( 'orderby' => 'count', 'order' => 'DESC' ) ); ?> | |
</div> | |
</div> |
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
.rp4wp-posts-list { margin: 0; padding: 0; } | |
.rp4wp-posts-list li.rp4wp-col { padding: 0 2% !important; border: 1px solid #ddd; } | |
.rp4wp-posts-list li.rp4wp-col .rp4wp_component_image { border: 1px solid #ddd; border-bottom: 0;} | |
.rp4wp-posts-list li.rp4wp-col .rp4wp_component_title { text-align: center; border: 1px solid #ddd; border-top: 0; } |
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_add_custom_seconds_to_downloading_page( $seconds ) { | |
return 500; | |
} | |
add_filter( 'dlm_dp_automated_start_seconds', 'dlm_add_custom_seconds_to_downloading_page' ); |
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_custom_update_version_filesize( $version_id, $file_path ) { | |
$file_manager = new DLM_File_Manager(); | |
$filesize = $file_manager->get_file_size( $file_path ); | |
$hashes = $file_manager->get_file_hashes( $file_path ); | |
update_post_meta( $version_id, '_filesize', $filesize ); | |
update_post_meta( $version_id, '_md5', $hashes['md5'] ); |
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-images>a img:last-child { | |
display: none; | |
} |
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
define( 'DLM_S3_KEY', 'aaaaaaaaaa' ); | |
define( 'DLM_S3_SECRET', 'bbbbbbbbb' ); |