function get_search_result() { $template_loader = new Uou_Atmf_Load_Template(); ob_start(); $template = $template_loader->locate_template('search-result.php'); include $template; }
/** * Checks if the template is assigned to the page * * @version 1.0.0 * @since 1.0.0 */ public function view_project_template($template) { global $post; if (!isset($post)) { return $template; } if (!isset($this->templates[get_post_meta($post->ID, '_wp_page_template', true)])) { return $template; } // end if $template_loader = new Uou_Atmf_Load_Template(); if (is_page_template('atmf-search.php')) { $file = $template_loader->locate_template('atmf-search.php'); } // $file = plugin_dir_path( __FILE__ ) . 'templates/' . get_post_meta( $post->ID, '_wp_page_template', true ); if (file_exists($file)) { return $file; } // end if return $template; }