diff --git a/template-class.php b/template-class.php
index 392f6d7..49c3516 100644
--- a/template-class.php
+++ b/template-class.php
@@ -77,12 +77,8 @@ class Purchasing_Template_Plugin {
// Grab the translations for the plugin
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
-
- // Add a filter to the page attributes metabox to inject our template into the page template cache.
- add_filter('page_attributes_dropdown_pages_args', array( $this, 'register_project_templates' ) );
-
- // Add a filter to the save post in order to inject out template into the page cache
- add_filter('wp_insert_post_data', array( $this, 'register_project_templates' ) );
+
+ add_filter('theme_page_templates', array( $this, 'add_page_templates'));
// Add a filter to the template include in order to determine if the page has our template assigned and return it's path
add_filter('template_include', array( $this, 'view_project_template') );
@@ -127,31 +123,11 @@ class Purchasing_Template_Plugin {
* @verison 1.0.0
* @since 1.0.0
*/
- public function register_project_templates( $atts ) {
-
- // Create the key used for the themes cache
- $cache_key = 'page_templates-' . md5( get_theme_root() . '/' . get_stylesheet() );
-
- // Retrieve the cache list. If it doesn't exist, or it's empty prepare an array
- $templates = wp_cache_get( $cache_key, 'themes' );
- if ( empty( $templates ) ) {
- $templates = array();
- } // end if
-
- // Since we've updated the cache, we need to delete the old cache
- wp_cache_delete( $cache_key , 'themes');
-
- // Now add our template to the list of templates by merging our templates
- // with the existing templates array from the cache.
+
+ public function add_page_templates($templates){
$templates = array_merge( $templates, $this->templates );
-
- // Add the modified cache to allow WordPress to pick it up for listing
- // available templates
- wp_cache_add( $cache_key, $templates, 'themes', 1800 );
-
- return $atts;
-
- } // end register_project_templates
+ return $templates;
+ }
/**
* Checks if the template is assigned to the page
diff --git a/templates/_notes/dwsync.xml b/templates/_notes/dwsync.xml
deleted file mode 100644
index 52c55e5..0000000
--- a/templates/_notes/dwsync.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-