This file contains 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 custom_dkpdf_pdf_filename( $filename ) { | |
$current_user = wp_get_current_user(); | |
$filename = $current_user->display_name.' '.get_the_title(); | |
return $filename; | |
} | |
add_filter( 'dkpdf_pdf_filename', 'custom_dkpdf_pdf_filename' ); |
This file contains 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 | |
/** | |
* Plugin Name: MultilingualPress REST API Extension | |
* Description: Adds REST endpoints that allow users to get translations for a specific post or term. | |
* Version: 0.1 | |
*/ | |
class MLP_REST_API_Extension { | |
public function __construct() { |
This file contains 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
// once you’ve dkpdfg-index.php template copied to the root of your theme inside a dkpdfg folder, in line 72 you’ve to replace this: | |
<h1><?php the_title();?></h1> | |
<?php the_content();?> | |
// for this: | |
<h1><?php the_title();?></h1> | |
<?php if( has_post_thumbnail() ) { | |
the_post_thumbnail(); | |
} ?> | |
<?php the_content();?> |
This file contains 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
<i style="font-size:50px;color:orange;" class="fa"></i> |
This file contains 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
[ | |
{ | |
"id": 1, | |
... | |
"link": "http://wp-test.dev/hello-world/", | |
"title": { | |
"rendered": "Hello world!" | |
}, | |
... | |
}, |
This file contains 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 | |
$content = get_the_content(); | |
$content = str_replace("https", "http", $content); | |
echo $content; | |
?> |
This file contains 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 | |
/** | |
* dkpdfg-index.php | |
* This template is used to display the content in the PDF | |
* | |
* Do not edit this template directly, | |
* copy this template and paste in your theme (or child theme) inside a directory named dkpdfg | |
*/ | |
?> |
This file contains 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 | |
$location = get_field('post_map'); | |
if( !empty($location) ): ?> | |
<img style="margin-top:25px;" width="1500" height="250" src="http://maps.googleapis.com/maps/api/staticmap?center=<?php echo $location['lat'];?>,<?php echo $location['lng'];?>&zoom=15&size=1500x250&sensor=false&markers=color:red%7Clabel:%7C<?php echo $location['lat'];?>,<?php echo $location['lng'];?>"> | |
<?php endif; ?> |
This file contains 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 | |
// add your stuff here | |
the_content(); | |
?> |