douyunjiaok300404 2019-04-03 02:55
浏览 26

MailPoet访问articles.php中的浏览器链接中的视图

I am trying to update the "Read More" link from directing to the post to directing to the "View in browser" URL. I have the "Read More" defined in /helpers/articles.php and have tried $data_email(['view_in_browser_link'], $viewinbrowser, just [view_in_browser_link], and a bunch of other combinations.

This is the original code (the one I want to change), that gets the permalink for the post and sets the href value

$content .= ' <a href="'.get_permalink($post['ID']).'" target="_blank">'.stripslashes($params['readmore']).'</a><p>'.$post['post_content'].'</p>';

I've been trying various combinations using those above three values, plus others, below is one attempt:

$content .= ' <a href="'.$view_in_browser_link.'" target="_blank" style="color:green;" id="bLink">'.stripslashes($params['readmore']).'</a><p>'.$post['post_content'].'</p>';

But they all return empty. I also tried building the VIB URL but can't get the email_id value either. The below is the function I tried (based on the one in /helpers/email.php

function setNewVIB($data_email_b){
if (!empty($_REQUEST['email_id'])) 
      $this->email_id = (int) $_REQUEST['email_id']; 

            if (!is_array($data_email_b) && is_object($data_email_b))
            $data_email_b = (array) $data_email_b;

            $paramsurl=array(
            'wysija-page'=>1,
            'controller'=>'email',
            'action'=>'view',
            'email_id'=>$email_id //NEEDS TO FIND EMAIL_ID
            );
            $modelConf=WYSIJA::get('config','model');
            return WYSIJA::get_permalink($modelConf->getValue('confirm_email_link'),$paramsurl);
        }

I've also tried various values for 'email_id' to no avail.

Does anyone know how to get that "view in browser link" so that I can have all of these "read more" links direct to the browser view?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥170 如图所示配置eNSP
    • ¥20 docker里部署springboot项目,访问不到扬声器
    • ¥15 netty整合springboot之后自动重连失效
    • ¥15 悬赏!微信开发者工具报错,求帮改
    • ¥20 wireshark抓不到vlan
    • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
    • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
    • ¥15 stata安慰剂检验作图但是真实值不出现在图上
    • ¥15 c程序不知道为什么得不到结果
    • ¥15 键盘指令混乱情况下的启动盘系统重装