WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Make PDF Newspaper] adding author by line to post

[Plugin: Make PDF Newspaper] adding author by line to post

  • Any suggestions on how to modify this code so we can get the author byline in the post? It would be great to have that for a newspaper with many authors!

    public function addItem($title, $content, $date=0, $author)
    	{
    		$cancel_add = false;
    		$html = '<div class="heading-div" style="page-break-inside: avoid;"><h1 style="line-height: 1.2;">'.$title.'</h1>';
    		$html .= '<tcpdf method="clearEmptyLnSpace" />';
    		if ((int)$date != 0) {
    			$html .= '<p>'.date_i18n(get_option('date_format').' '.get_option('time_format'), $date).'</p>';
    		}
    		$html .= '</div>';
    			$html .= '<p>'get_author().'</p>';
    		//if (preg_match('/The ska and dub/i', $content)) { die($content); }
    		$html .= $content;
  • The topic ‘[Plugin: Make PDF Newspaper] adding author by line to post’ is closed to new replies.