替换受保护的私人岗位

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了替换受保护的私人岗位相关的知识,希望对你有一定的参考价值。

WP Functions.
  1. /* REPLACE PROTECTED-PRIVATE POSTS */
  2.  
  3. function the_title_trim($title) {
  4. // Might aswell make use of this function to escape attributes
  5. $title = attribute_escape($title);
  6. // What to find in the title
  7. $findthese = array(
  8. '#Protected:#', // # is just the delimeter
  9. '#Private:#'
  10. );
  11. // What to replace it with
  12. $replacewith = array(
  13. 'a', // What to replace protected with
  14. 'b' // What to replace private with
  15. );
  16. // Items replace by array key
  17. $title = preg_replace($findthese, $replacewith, $title);
  18. return $title;
  19. }
  20. add_filter('the_title', 'the_title_trim');

以上是关于替换受保护的私人岗位的主要内容,如果未能解决你的问题,请参考以下文章

财产公共和私人但不受保护?

我使用“受保护”而不是“私人”,因为有一天我可能需要扩展我的课程,这很糟糕吗?

ruby 公共与私人与受保护

私人和受保护财产的获取者和设置者

Java:访问修饰符比“受保护”更严格,比“私人”限制更少?

iOS 私人目录