Dinamiko / dk-pdf

WordPress to PDF made easy
https://wordpress.org/plugins/dk-pdf
26 stars 23 forks source link

Add filter to change PDF Filename (dkpdf_pdf_title) #40

Closed alexanderhofstaetter closed 7 years ago

alexanderhofstaetter commented 7 years ago

this filters allows to change the PDF download title.

i did this because the title was realy cracked up with special chars.

my filter example in functions.php:

function changing_dkpdf_pdf_title( $title ) { global $post; $title = get_bloginfo( 'name' ).'-'.$post->post_name.'-SUFFIX'; return ucwords( sanitize_title($title), " -"); } add_filter( 'dkpdf_pdf_title', 'changing_dkpdf_pdf_title' );

alexanderhofstaetter commented 7 years ago

@Dinamiko ?

Dinamiko commented 7 years ago

Hi alexanderhofstaetter, I'm sorry for the late response,

I have not had much time lately but I'm going to look at this ASAP, I hope that this next weekend I'm going to have time to check it out.

Thanks for contributing, I really apreciate it :)

Dinamiko commented 7 years ago

Hi @alexanderhofstaetter,

I'm going to start refactoring the code of the plugin, I'm going to temporary close this PR in order to start clean with the refactoring plan. Once I have decided next steps I may come back to this PR and reopen it.

Thanks, Emili

Dinamiko commented 7 years ago

Temporary closing this PR due to plugin refactoring plan. Once I have next steps decided I may come back to this PR and reopen it or create a new one based on it.