get_post_meta( get_the_ID(), '_llms_num_reviews', true ), // phpcs:ignore WPThemeReview.CoreFunctionality.PostsPerPage.posts_per_page_posts_per_page, WordPress.WP.PostsPerPage.posts_per_page_posts_per_page
'post_type' => 'llms_review',
'post_status' => 'publish',
'post_parent' => get_the_ID(),
'suppress_filters' => true, // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.SuppressFiltersTrue -- Required for the query to work properly.
);
/** @psalm-suppress ArgumentTypeCoercion */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort
$posts_array = get_posts( $args );
/** @psalm-suppress ArgumentTypeCoercion */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort
$styles = array(
'background-color' => '#EFEFEF',
'title-color' => 'inherit',
'text-color' => 'inherit',
'custom-css' => '',
);
if ( has_filter( 'llms_review_custom_styles' ) ) {
$styles = apply_filters( 'llms_review_custom_styles', $styles ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
}
foreach ( $posts_array as $post ) {
echo $styles['custom-css']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
ID ) ); ?>
ID ) ) ) ); ?>
ID ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
1,
'post_type' => 'llms_review',
'post_status' => 'publish',
'post_parent' => get_the_ID(),
'author' => get_current_user_id(),
'suppress_filters' => true, // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.SuppressFiltersTrue -- Required for the query to work properly.
);
$posts_array = get_posts( $args );
/**
* Check to see if we are allowed to write more than one review.
* If we are not, check to see if we have written a review already.
*/
if ( get_post_meta( get_the_ID(), '_llms_multiple_reviews_disabled', true ) && $posts_array ) {
?>