- Fixed deprecated WP_Widget constructors in all widget files - Changed $this->WP_Widget() to parent::__construct() in: * widget-social.php * widget-fblikebox.php * widget-googleplus.php * widget-tabs.php - Fixed old-style constructor methods to __construct() in: * widget-ad125.php (mts_Ad_Widget -> __construct) * widget-ad300.php (mts_ad_300_Widget -> __construct) - Fixed for loop syntax error in widget-tweets.php (for(i; -> for($i = 1;) - Enabled registration for ad125 and ad300 widgets - Added new 'After First Paragraph' widget area for in-content ads All widgets now compatible with PHP 8.4 and editable in WordPress admin. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
78 lines
2.3 KiB
JavaScript
78 lines
2.3 KiB
JavaScript
jQuery(document).ready(function(){
|
|
|
|
if(jQuery('#last_tab').val() == ''){
|
|
|
|
jQuery('.nhp-opts-group-tab:first').slideDown('fast');
|
|
jQuery('#nhp-opts-group-menu li:first').addClass('active');
|
|
|
|
}else{
|
|
|
|
tabid = jQuery('#last_tab').val();
|
|
jQuery('#'+tabid+'_section_group').slideDown('fast');
|
|
jQuery('#'+tabid+'_section_group_li').addClass('active');
|
|
|
|
}
|
|
|
|
jQuery('.nhp-opts-group-tab-link-a').click(function(){
|
|
relid = jQuery(this).attr('data-rel');
|
|
|
|
jQuery('#last_tab').val(relid);
|
|
|
|
jQuery('.nhp-opts-group-tab').each(function(){
|
|
if(jQuery(this).attr('id') == relid+'_section_group'){
|
|
jQuery(this).delay(140).fadeIn(400);
|
|
}else{
|
|
jQuery(this).fadeOut('fast');
|
|
}
|
|
|
|
});
|
|
|
|
jQuery('.nhp-opts-group-tab-link-li').each(function(){
|
|
if(jQuery(this).attr('id') != relid+'_section_group_li' && jQuery(this).hasClass('active')){
|
|
jQuery(this).removeClass('active');
|
|
}
|
|
if(jQuery(this).attr('id') == relid+'_section_group_li'){
|
|
jQuery(this).addClass('active');
|
|
}
|
|
});
|
|
});
|
|
|
|
if(jQuery('#nhp-opts-save').is(':visible')){
|
|
jQuery('#nhp-opts-save').delay(4000).slideUp('slow');
|
|
}
|
|
|
|
if(jQuery('#nhp-opts-imported').is(':visible')){
|
|
jQuery('#nhp-opts-imported').delay(4000).slideUp('slow');
|
|
}
|
|
|
|
jQuery('input, textarea, select').change(function(){
|
|
jQuery('#nhp-opts-save-warn').slideDown('slow');
|
|
});
|
|
|
|
jQuery('#nhp-opts-import-code-button').click(function(){
|
|
if(jQuery('#nhp-opts-import-link-wrapper').is(':visible')){
|
|
jQuery('#nhp-opts-import-link-wrapper').fadeOut('fast');
|
|
jQuery('#import-link-value').val('');
|
|
}
|
|
jQuery('#nhp-opts-import-code-wrapper').fadeIn('slow');
|
|
});
|
|
|
|
jQuery('#nhp-opts-import-link-button').click(function(){
|
|
if(jQuery('#nhp-opts-import-code-wrapper').is(':visible')){
|
|
jQuery('#nhp-opts-import-code-wrapper').fadeOut('fast');
|
|
jQuery('#import-code-value').val('');
|
|
}
|
|
jQuery('#nhp-opts-import-link-wrapper').fadeIn('slow');
|
|
});
|
|
|
|
jQuery('#nhp-opts-export-code-copy').click(function(){
|
|
if(jQuery('#nhp-opts-export-link-value').is(':visible')){jQuery('#nhp-opts-export-link-value').fadeOut('slow');}
|
|
jQuery('#nhp-opts-export-code').toggle('fade');
|
|
});
|
|
|
|
jQuery('#nhp-opts-export-link').click(function(){
|
|
if(jQuery('#nhp-opts-export-code').is(':visible')){jQuery('#nhp-opts-export-code').fadeOut('slow');}
|
|
jQuery('#nhp-opts-export-link-value').toggle('fade');
|
|
});
|
|
|
|
}); |