Skip to content
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
eec0192
refactor: remove return values, as `autonomie_save_post` is hooked in…
apermo Apr 5, 2025
ba9cf2f
refactor: simplify unset calls for query variables in compat.php
apermo Apr 5, 2025
3aeee73
refactor: fix phpdoc return types for post format functions in feed.p…
apermo Apr 5, 2025
976f1cb
refactor: reorder condition for post format feed discovery in feed.php
apermo Apr 5, 2025
5daf2a4
refactor: update comments for clarity in customizer.php and featured-…
apermo Apr 5, 2025
6bf8f11
refactor: update phpdoc for parameters and return types in compat.php
apermo Apr 5, 2025
8b49e3c
refactor: improve code clarity and consistency in semantics.php
apermo Apr 5, 2025
fbe89be
refactor: improve comment clarity in featured-image.php
apermo Apr 5, 2025
c8b735e
chore: update PHP version requirement to 7.4 and configure plugin all…
apermo Apr 5, 2025
979168a
refactor: enhance code clarity and consistency in template-functions.php
apermo Apr 5, 2025
2306e22
refactor: improve phpdoc clarity for parameters and return type in we…
apermo Apr 5, 2025
459456e
refactor: streamline require statements and improve function formatti…
apermo Apr 5, 2025
bfb4ce5
refactor: improve phpdoc clarity and consistency in activitypub.php
apermo Apr 5, 2025
d079ed4
refactor: improve phpdoc clarity and consistency in post-kinds.php
apermo Apr 5, 2025
70cf320
refactor: improve code formatting and consistency in syndication-link…
apermo Apr 5, 2025
9fd738f
refactor: fix attribute name from 'width' to 'with' in indie-action e…
apermo Apr 5, 2025
7c23915
refactor: improve code formatting and readability in entry-header.php
apermo Apr 5, 2025
c7b2805
refactor: improve code formatting and consistency in entry-nav.php
apermo Apr 5, 2025
0c457dd
refactor: Removed unsupported attribute `type="text"` from `textarea`…
apermo Apr 5, 2025
4b52d98
refactor: Removed unsupported attribute `type="text"` from `textarea`…
apermo Apr 5, 2025
d5cc65d
refactor: fix indentation in page-banner.php
apermo Apr 5, 2025
7af6a78
chore: phpcbf changes in /templates/
apermo Apr 5, 2025
b5d0bbd
refactor: phpcbf, improve code formatting and consistency in multiple…
apermo Apr 5, 2025
cbce161
refactor: improve translator comments for clarity in comments.php
apermo Apr 5, 2025
0eb808a
chore: update tested version and PHP requirements in readme.md
apermo Apr 5, 2025
534a4e0
refactor: phpcbf - improve code readability and formatting in multipl…
apermo Apr 5, 2025
0fc955d
fix: update profile links to use HTTPS for improved security
apermo Apr 5, 2025
167b835
refactor: phpcbf and added missing `echo` to functions.php
apermo Apr 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ function autonomie_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<article id="comment-<?php comment_ID(); ?>" class="comment <?php $comment->comment_type; ?>" itemprop="comment" itemscope itemtype="https://schema.org/Comment">
<article id="comment-<?php comment_ID(); ?>" class="comment <?php echo $comment->comment_type; ?>" itemprop="comment" itemscope itemtype="https://schema.org/Comment">
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pfefferle Review here, this echo was missing before, please verify that this has no sideeffects, alternatively we can remove the output.

Copy link

Copilot AI Aug 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The $comment->comment_type output should be escaped with esc_attr() since it's being used in a class attribute to prevent potential XSS vulnerabilities.

Suggested change
<article id="comment-<?php comment_ID(); ?>" class="comment <?php echo $comment->comment_type; ?>" itemprop="comment" itemscope itemtype="https://schema.org/Comment">
<article id="comment-<?php comment_ID(); ?>" class="comment <?php echo esc_attr( $comment->comment_type ); ?>" itemprop="comment" itemscope itemtype="https://schema.org/Comment">

Copilot uses AI. Check for mistakes.
<div class="edit-link"><?php edit_comment_link( __( 'Edit', 'autonomie' ), ' ' ); ?></div>
<footer class="comment-meta commentmetadata">
<address class="comment-author p-author author vcard hcard h-card" itemprop="creator" itemscope itemtype="https://schema.org/Person">
Expand Down Expand Up @@ -513,42 +513,42 @@ function autonomie_comment( $comment, $args, $depth ) {
/**
* All template functions
*/
require( get_template_directory() . '/includes/template-functions.php' );
require get_template_directory() . '/includes/template-functions.php';

/**
* Widget handling
*/
require( get_template_directory() . '/includes/widgets.php' );
require get_template_directory() . '/includes/widgets.php';

/**
* Adds the featured image functionality
*/
require( get_template_directory() . '/includes/featured-image.php' );
require get_template_directory() . '/includes/featured-image.php';

/**
* All customizer functions
*/
require( get_template_directory() . '/includes/customizer.php' );
require get_template_directory() . '/includes/customizer.php';

/**
* Adds some awesome websemantics like microformats(2) and microdata
*/
require( get_template_directory() . '/includes/semantics.php' );
require get_template_directory() . '/includes/semantics.php';

/**
* Add Webactions support
*/
require( get_template_directory() . '/includes/webactions.php' );
require get_template_directory() . '/includes/webactions.php';

/**
* Adds back compat handling for older WP versions
*/
require( get_template_directory() . '/includes/compat.php' );
require get_template_directory() . '/includes/compat.php';

/**
* Feed extensions
*/
require( get_template_directory() . '/includes/feed.php' );
require get_template_directory() . '/includes/feed.php';

/**
* Compatibility with other plugins, mostly IndieWeb related
Expand All @@ -559,15 +559,15 @@ function autonomie_comment( $comment, $args, $depth ) {
* Adds Indieweb Syndcation Links
* if github.com/dshanske/syndication-links is activated
*/
require( get_template_directory() . '/integrations/syndication-links.php' );
require get_template_directory() . '/integrations/syndication-links.php';
}

if ( class_exists( 'Post_Kinds_Plugin' ) ) {
require( get_template_directory() . '/integrations/post-kinds.php' );
require get_template_directory() . '/integrations/post-kinds.php';
}

if ( class_exists( '\Activitypub\Activitypub' ) ) {
require( get_template_directory() . '/integrations/activitypub.php' );
require get_template_directory() . '/integrations/activitypub.php';
}

/**
Expand Down