Esempio n. 1
0
 /**
  * Checks all templates overridden by the user to see if they need an update
  *
  * @param $dirs_to_scan The directories to scan
  *
  * @return array An array containing all the outdated template files found
  */
 public function check_templates($dirs_to_scan)
 {
     $outdated_templates = array();
     foreach ($dirs_to_scan as $dir => $title) {
         $template_finder = new CUAR_TemplateFinder($this);
         $template_finder->scan_directory($dir);
         $tmp = $template_finder->get_outdated_templates();
         if (!empty($tmp)) {
             $outdated_templates[$title] = $tmp;
         }
         unset($template_finder);
     }
     return $outdated_templates;
 }
</em></p>
	
	<pre><code>&lt;?php /** Template version: 1.0.0 */ ?&gt;</code></pre>

	
<?php 
}
?>
	
	<ol>	 
<?php 
$dirs_to_scan = apply_filters('cuar/core/status/directories-to-scan', array(CUAR_PLUGIN_DIR => __('WP Customer Area', 'cuar')));
foreach ($dirs_to_scan as $dir => $title) {
    $template_finder = new CUAR_TemplateFinder($this->plugin->get_template_engine());
    $template_finder->scan_directory($dir);
    $outdated = $template_finder->get_outdated_templates();
    if (empty($outdated)) {
        continue;
    }
    ?>
		<li>
			<h4><?php 
    echo $title;
    ?>
</h4>
			<ul>
<?php 
    foreach ($outdated as $name => $t) {
        ?>
				<li><code><?php 
        echo $name;