Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ent2ncr example
$comment_text
=
$comment
->comment_content;
if
(
is_comment_feed
(
)
&&
$comment
->comment_parent
)
{
$parent
=
get_comment
(
$comment
->comment_parent
)
;
if
(
$parent
)
{
$parent_link
=
esc_url
(
get_comment_link
(
$parent
)
)
;
$name
=
get_comment_author
(
$parent
)
;
$comment_text
=
sprintf
(
/* translators: %s: Comment link. */
ent2ncr
(
__
(
'In reply to %s.'
)
)
,
'<a href="' .
$parent_link
. '">' .
$name
. '</a>'
)
. "\n\n" .
$comment_text
;
}
}
/** * Filters the text of a comment. * * @since 1.5.0 * * @see Walker_Comment::comment() * * @param string $comment_text Text of the comment. * @param WP_Comment $comment The comment object. * @param array $args An array of arguments. */
do_action
(
'rss2_comments_ns'
)
;
?> > <channel> <title> <?php
if
(
is_singular
(
)
)
{
/* translators: Comments feed title. %s: Post title. */
printf
(
ent2ncr
(
__
(
'Comments on: %s'
)
)
,
get_the_title_rss
(
)
)
;
}
elseif
(
is_search
(
)
)
{
/* translators: Comments feed title. 1: Site title, 2: Search query. */
printf
(
ent2ncr
(
__
(
'Comments for %1$s searching on %2$s'
)
)
,
get_bloginfo_rss
(
'name'
)
,
get_search_query
(
)
)
;
}
else
{
/* translators: Comments feed title. %s: Site title. */
printf
(
ent2ncr
(
__
(
'Comments for %s'
)
)
,
get_wp_title_rss
(
)
)
;
}
?> </title> <atom:link href="<?php
self_link
(
)
; ?>" rel="self" type="application/rss+xml" /> <link><?php
(
is_single
(
)
)
?
the_permalink_rss
(
)
:
bloginfo_rss
(
'url'
)
; ?></link> <description>
do_action
(
'atom_comments_ns'
)
;
?> > <title type="text"> <?php
if
(
is_singular
(
)
)
{
/* translators: Comments feed title. %s: Post title. */
printf
(
ent2ncr
(
__
(
'Comments on %s'
)
)
,
get_the_title_rss
(
)
)
;
}
elseif
(
is_search
(
)
)
{
/* translators: Comments feed title. 1: Site title, 2: Search query. */
printf
(
ent2ncr
(
__
(
'Comments for %1$s searching on %2$s'
)
)
,
get_bloginfo_rss
(
'name'
)
,
get_search_query
(
)
)
;
}
else
{
/* translators: Comments feed title. %s: Site title. */
printf
(
ent2ncr
(
__
(
'Comments for %s'
)
)
,
get_wp_title_rss
(
)
)
;
}
?> </title> <subtitle type="text"><?php
bloginfo_rss
(
'description'
)
; ?></subtitle> <updated>