开发者

How to get the page in a variable which is going to be displayed in Wordpress?

I want to get the c开发者_如何学Pythonontent which are displayed by a particular page in WordPress back-end.

Say, for [ROOT]/wp-admin/profile.php

I want to remove the First Name and Last Name fields from this page. So, I can run a str_replace() to remove the lines.

In this case, I have $search and $replace ... but I need $subject [Ref - http://php.net/manual/en/function.str-replace.php]

How to get the $subject ?

OR, anybody know any other way to do this?


you could use the output buffer, to construct your page?

ob_start();
require_once(ABSPATH. 'wp-admin/profile.php');
$subject = ob_get_clean();

and then do a search and replace against that?

hope this helps :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜