< >
ID) );
$parent_id = wp_get_post_parent_id( $post->ID );
$args = array( 'post_mime_type' => 'application/pdf',
'post_type' => 'attachment',
'numberposts' => 1,
'post_status' => 'publish',
'post_parent' => $parent_id );
$direct_link = esc_url( wp_get_attachment_url( $post->ID ) );
$attachments = get_posts($args);
?>
'. $pdf_title.'';
?>
post_parent > 0 ) {
?>
post_parent > 0 ) {
$parent = get_post( $post->post_parent );
if ( 'ja' == get_locale() && preg_match('!%[0-9A-Z][0-9A-Z]+!', the_title('','',false) ) ) {
$post_content = str_replace( the_title('','',false), $pdf_title, $parent->post_content );
} else {
$post_content = $parent->post_content;
}
$parent = strip_shortcodes( $post_content );
$parent_excerpt_length = raindrops_warehouse_clone( 'raindrops_excerpt_length' );
$more = '...';
$parent_excerpt = wp_html_excerpt( $parent, $parent_excerpt_length, $more );
if( ! empty( $parent_excerpt ) ) {
?>
ID );
$pdf_screenshots = '';
if( isset( $meta_datas_pdf['sizes'] ) ) {
foreach( $meta_datas_pdf['sizes'] as $key => $pdf_screenshot ) {
if( file_exists( $upload_dir['path'] . '/'.$pdf_screenshot['file'] ) ) {
$pdf_screenshots .= '
'. esc_html( $key ).'
'. absint( $pdf_screenshot['width'] ) .'
'. absint( $pdf_screenshot['height']).'';
if( 'large' == $key ) {
$attchment_preview = '
';
}
}
}
}
if( ! empty( $pdf_screenshots ) && ! empty( $attchment_preview ) ) {
$raindrops_display_pdf_image_list = apply_filters('raindrops_display_pdf_image_list', true );
if ( true == $raindrops_display_pdf_image_list ) {
printf( '%2$s
', $pdf_screenshots, $attchment_preview , esc_html__('PDF Images', 'raindrops')
);
} else {
echo $attchment_preview;
}
} else {
?>
ID ), '
', '' );
raindrops_delete_post_link( esc_html__( 'Trash', 'raindrops' ) . raindrops_link_unique( 'Post', $post->ID ), '
', '' );
?>
>