' . $msg . ''; } endif; add_filter( 'locale_stylesheet_uri', 'chld_thm_cfg_locale_css' ); // END ENQUEUE PARENT ACTION // Add filter to stop lazy load 13 Dec 2021 add_filter( 'wp_lazy_loading_enabled', '__return_false' ); // REMOVE WEBSITE IN COMMENTS FORM added test Jun 8 2021 function prefix_disable_comment_url($fields) { unset($fields['url']); return $fields; } add_filter('comment_form_default_fields','prefix_disable_comment_url'); // ADDED NOTES TO COMMENTS FORM FOR USERS add_filter('comment_form_defaults', 'ocean_custom_comment_title', 20); function ocean_custom_comment_title( $defaults ){ $defaults['title_reply'] = __('Please leave a Comment or a Reply', 'customizr-child'); return $defaults; } /** part 1 **/ /** For removed Website URL portion -- $fields['url'] = ''; --see attached .txt file 8 June 21 **/ function my_update_comment_fields( $fields ) { $commenter = wp_get_current_commenter(); $req = get_option( 'require_name_email' ); $label = $req ? '*' : ' ' . __( '(optional)', 'text-domain' ); $aria_req = $req ? "aria-required='true'" : ''; $fields['author'] = '

'; $fields['email'] = '

'; $fields['url'] = ''; return $fields; } add_filter( 'comment_form_default_fields', 'my_update_comment_fields' ); /** part 2 **/ function my_update_comment_field( $comment_field ) { $comment_field = '

'; return $comment_field; } add_filter( 'comment_form_field_comment', 'my_update_comment_field' ); /** limit comment length **/ add_filter( 'preprocess_comment', 'wpb_preprocess_comment' ); function wpb_preprocess_comment($comment) { if ( strlen( $comment['comment_content'] ) > 1500 ) { wp_die('You Comment/Reply is too long. Please keep your comment under 1500 characters.'); } if ( strlen( $comment['comment_content'] ) < 4 ) { wp_die('Comment/Reply is too short. Please use at least 4 characters.'); } return $comment; } /** Change Cache Enabler for breadcrumbs **/ add_action( 'save_post', 'cache_enabler_clear_previous_post_cache' ); add_action( 'wp_trash_post', 'cache_enabler_clear_previous_post_cache' ); // clear page cache of previous post when any published 'post' post type has been created, updated, or about to be trashed function cache_enabler_clear_previous_post_cache( $post_id ) { $post_status = get_post_status( $post_id ); $post_type = get_post_type( $post_id ); if ( $post_status !== 'publish' || $post_type !== 'post' ) { return; } global $post; $global_post = $post; $post = get_post( $post_id ); $prev_post = get_previous_post();