New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow sites to change the "this article first appeared" text #74
Comments
@MirandaEcho Do we need to make this line editable, or just replaceable? If we're just adding a text field that allows them to replace that text, I don't think we need to go through the hassle of all of the tags. |
How would we allow them to replace the text of the line without also requiring them to edit the HTML of the two |
I may be a little confused, but here's how I imagined it (forgive the pseudo code)
That way they're not editing the statement, they're just replacing the entire thing with their own custom statement. |
They'll lose the ability to link to the original article which is being shared, unless we wrap the whole thing as a link to the article being shared. Doing so removes the need for educating people about merge tags, and removes the need to validate them. if ( ! empty( get_field( 'repub_attribution_statement' ) ) ) {
$attribution_statement = sprintf(
esc_html( '<a target="_blank" href=%1$s">%2$s</a>' ),
get_permalin( $post ),
get_field( 'repub_attribution_statement' )
);
} else {
$attribution_statement = sprintf(
// translators: %1$s is a URL, %2$s is the site home URL, and %3$s is the site title.
esc_html__( 'This <a target="_blank" href="%1$s">article</a> first appeared on <a target="_blank" href="%2$s">%3$s</a> and is republished here under a Creative Commons license.', 'republication-tracker-tool' ),
get_permalink( $post ),
home_url(),
esc_html( get_bloginfo() )
);
} |
Hi! I see this issue is more than 3 years old. Just wanted to check if there's any active development on this or if the attribution line language can be changed somewhere? |
Requested in https://secure.helpscout.net/conversation/1016863827/4711/ :
Can we make this line (with all its
%2$s
es and HTML) editable by the site owner?https://github.com/INN/republication-tracker-tool/blob/d256d725bded14cf4f9c8ec2fc6658ef977621fe/includes/shareable-content.php#L75-L81
The present text is:
where:
We'll need to:
%1$s
merge tag and maybe 2 and 3The text was updated successfully, but these errors were encountered: