• hello

    I have a little problem with my home-made themes.

    when I check in with the theme of the check turns out there is a function that must be repaired although it can be used. below is the function that is considered less fit.

    INFO: includes/theme-widgets.php The theme appears to use include or require. If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead.
    Line 20: require_once($jseo_widgets_dir . $jseo_widgets_file);

    <?php
    
    /*------------------------------------------------------*/
    /* Loads all the .php files found in /includes/widgets/ directory */
    /*------------------------------------------------------*/
    
    	$preview_template = _preview_theme_template_filter();
    
    	if(!empty($preview_template)){
    		$jseo_widgets_dir = WP_CONTENT_DIR . "/themes/".$preview_template."/includes/widgets/";
    	} else {
        	$jseo_widgets_dir = WP_CONTENT_DIR . "/themes/".get_option('template')."/includes/widgets/";
        }
    
        if (@is_dir($jseo_widgets_dir)) {
    		$jseo_widgets_dh = opendir($jseo_widgets_dir);
    		while (($jseo_widgets_file = readdir($jseo_widgets_dh)) !== false) {
    
    			if(strpos($jseo_widgets_file,'.php') && $jseo_widgets_file != "widget-blank.php") {
    				require_once($jseo_widgets_dir . $jseo_widgets_file);
    
    			}
    		}
    		closedir($jseo_widgets_dh);
    	}
    
    ?>

    I hope there are provide clues…

    Tanks you brother.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Change Function themes’ is closed to new replies.