These new issues were observed in 1.0.10 update:
In function custom_breadcrumbs()
the textdomain 'hotel-inn'
is used instead of 'lawyerfirm'
.
In function custom_page_callback()
settings a $_POST
variable messina_blog_free_back_top_top_enable_form
is checked which is defined nowhere and also a PHP Warning: Undefined variable $current_target warning in functions.php on line 526
is caused if the “Layer Firm Free” settings page is opened and also invalid inline script code jQuery('#').click()
is generated.
The Copyright Text default setting in Customizer > Theme Options > Copyright Section is now set to '1'
instead of ''
so a 1 is shown in frontend footer if no text is defined by user in Customizer (you can see that 1 also on your theme demo website and also other problemes with the breadcrumbs which we did not look at because we do not use them).
And another issue which has been there also before 1.0.10, there are two extra closing </div>
in function custom_page_callback()
in lines 484 and 485 which should not be there.
lawyerfirm 1.0.10, WordPress 6.6.2
]]>Theme file functions.php
contains extra trailing crlf
linefeeds after closing PHP tag ?>
which leads to malfunction of plugins which offer e.g. downloads via WordPress ajax etc.
if (get_option('lawyer_firm_dslc_bread_all') == 1 && !isset($already_set)) {
if (function_exists('custom_breadcrumbs')) custom_breadcrumbs();
}
}
}
?>
Suggested fix: Remove the closing PHP tag, see also WordPress PHP Coding Standards:
.. Omitting the closing PHP tag at the end of a file is preferred. If you use the tag, make sure you remove trailing whitespace.
https://developer.www.ads-software.com/coding-standards/wordpress-coding-standards/php/#remove-trailing-spaces
lawyerfirm 1.0.9, WordPress 6.6.2
]]>Theme options styles and scripts are loaded in all admin pages and the bootstrap css/js mess up other admin pages:
add_action('admin_enqueue_scripts', 'load_admin_style');
function load_admin_style()
{
wp_enqueue_script('jquery');
wp_enqueue_style('theme_settings_css', get_template_directory_uri() . '/assets/css/theme-settings.css', false, '1.0.0');
wp_enqueue_style('bootstrap_min_css', get_template_directory_uri() . '/assets/css/latest.bootstrap.css', false, '1.0.0');
wp_enqueue_script('bootstrap_bundle_min_js', get_template_directory_uri() . '/assets/js/bootstrap.bundle.min.js', array('jquery'), '', true);
}
Your custom styles and scripts should only be loaded in theme options admin page, suggested fix:
add_action('admin_enqueue_scripts', 'load_admin_style');
function load_admin_style( $hook )
{
if ( 'toplevel_page_lawyer_firm_free' != $hook ) {
return;
}
wp_enqueue_script('jquery');
...
lawyerfirm 1.0.9, WordPress 6.6.2
]]>Seems there is no code difference at all between 1.0.4 and 1.0.5 even though a new file changelog.txt
says this:
2024 January 25- Version 1.0.5 ??
FIXED: Minor Issues Fixed
Maybe something did go wrong with the release?
]]>Preloader html is added outside of body
tag and causes error in html validation, also visible e.g. in Firefox “view source” Ctrl-u.
Problem is in header.php
<?php wp_head(); ?>
</head>
<?php if($show_preloader){ ?>
<div class="page-loading"> <!-- #site-wrapper -->
<div class="loader"></div>
<span class="text">Loading...</span>
</div> <!-- .page-loading ends -->
<?php } ?>
<body <?php body_class(); ?>>
Suggested fix: Move code inside body
tag.
lawyerfirm 1.0.4, WordPress 6.3.2
]]>