dsa45664 2011-08-01 07:14
浏览 39
已采纳

合并/合并两个php函数

I need to combine/merge two php functions, but I can't get the syntax right.

The first one (WordPress function) displays a link, with the text 'Next CD in Category', to the next post in my category:

<?php next_post_link('%link', 'Next CD in Category', TRUE) ?>

The second one is used to display the link text in my site's different languages:

<?php echo SPEC($GLOBALS['_LANG']['Next CD in Category']) ?>

How do I combine these so that the 'Next CD in Category' link to uses the language function to display the link in different languages?

  • 写回答

2条回答 默认 最新

  • dougouqin0763 2011-08-01 07:16
    关注
    <?php
        next_post_link(
            '%link',
            SPEC($GLOBALS['_LANG']['Next CD in Category']),
            TRUE
        );
    ?>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部