Changeset 2050579
- Timestamp:
- 03/14/2019 03:27:49 PM (7 years ago)
- Location:
- xo-for-angular
- Files:
-
- 4 edited
- 17 copied
-
tags/1.0.3 (copied) (copied from xo-for-angular/trunk)
-
tags/1.0.3/Includes/Api/Abstract/Objects/Menu.class.php (copied) (copied from xo-for-angular/trunk/Includes/Api/Abstract/Objects/Menu.class.php)
-
tags/1.0.3/Includes/Api/Controllers/PostsController.class.php (copied) (copied from xo-for-angular/trunk/Includes/Api/Controllers/PostsController.class.php)
-
tags/1.0.3/Includes/Options/Options.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Options.class.php)
-
tags/1.0.3/Includes/Options/Tabs/General/AcfTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/General/AcfTab.class.php)
-
tags/1.0.3/Includes/Options/Tabs/General/ApiTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/General/ApiTab.class.php)
-
tags/1.0.3/Includes/Options/Tabs/General/IndexTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/General/IndexTab.class.php)
-
tags/1.0.3/Includes/Options/Tabs/General/PostsTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/General/PostsTab.class.php)
-
tags/1.0.3/Includes/Options/Tabs/General/RoutingTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/General/RoutingTab.class.php)
-
tags/1.0.3/Includes/Options/Tabs/General/TemplatesTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/General/TemplatesTab.class.php)
-
tags/1.0.3/Includes/Options/Tabs/Tools/ExportTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/Tools/ExportTab.class.php)
-
tags/1.0.3/Includes/Options/Tabs/Tools/ProfileTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/Tools/ProfileTab.class.php)
-
tags/1.0.3/Includes/Options/Tabs/Tools/ToolsTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/Tools/ToolsTab.class.php)
-
tags/1.0.3/Includes/Services/Classes/AdminNotice.class.php (copied) (copied from xo-for-angular/trunk/Includes/Services/Classes/AdminNotice.class.php)
-
tags/1.0.3/Includes/Services/Classes/RouteGenerator.class.php (modified) (1 diff)
-
tags/1.0.3/Includes/Xo.php (copied) (copied from xo-for-angular/trunk/Includes/Xo.php)
-
tags/1.0.3/readme.txt (copied) (copied from xo-for-angular/trunk/readme.txt) (2 diffs)
-
tags/1.0.3/xo-angular.php (copied) (copied from xo-for-angular/trunk/xo-angular.php) (1 diff)
-
trunk/Includes/Services/Classes/RouteGenerator.class.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/xo-angular.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
xo-for-angular/tags/1.0.3/Includes/Services/Classes/RouteGenerator.class.php
r2042983 r2050579 86 86 global $wp_post_types; 87 87 88 // Iterate through all available post types 88 89 foreach ($wp_post_types as $post_type => $post_type_config) { 90 // Skip if the post type is not public or is a page 89 91 if ((!$post_type_config->public) || ($post_type == 'page')) 90 92 continue; 91 93 92 if ((!$template = $this->Xo->Services->Options->GetOption('xo_' . $post_type . '_template', false)) 93 || (!$attrs = $this->Xo->Services->TemplateReader->GetAnnotatedTemplate($template))) 94 continue; 94 // Check if the post type has a rewrite base 95 if (isset($post_type_config->rewrite['slug'])) { 96 // Get the template of the rewrite base 97 if ((!$template = $this->Xo->Services->Options->GetOption('xo_' . $post_type . '_template', false)) 98 || (!$attrs = $this->Xo->Services->TemplateReader->GetAnnotatedTemplate($template))) 99 continue; 95 100 96 $rewrite = ((isset($post_type_config->rewrite['slug'])) ? $post_type_config->rewrite['slug'] : $post_type); 97 $routes[] = new XoApiAbstractRoute($rewrite, $attrs['loadChildren'], 'prefix'); 101 // Generate route for a posts hub page which will handle individual post urls 102 $routes[] = new XoApiAbstractRoute($post_type_config->rewrite['slug'], $attrs['loadChildren'], 'prefix'); 103 } else { 104 // Get all the published posts of a particular post type 105 $posts = get_posts(array( 106 'post_status' => 'publish', 107 'post_type' => $post_type, 108 'posts_per_page' => -1, 109 'fields' => 'ids' 110 )); 111 112 // Iterate through the found posts 113 foreach ($posts as $postId) { 114 // Generate route for individual post pages which are routed individually 115 if ($attrs = $this->Xo->Services->TemplateReader->GetTemplateForPost($postId)) { 116 $path = ltrim(wp_make_link_relative(get_permalink($postId)), '/'); 117 $routes[] = new XoApiAbstractRoute($path, $attrs['loadChildren'], 'full'); 118 } 119 } 120 } 98 121 } 99 122 } -
xo-for-angular/tags/1.0.3/readme.txt
r2047166 r2050579 4 4 Requires at least: 4.9 5 5 Tested up to: 5.1 6 Stable tag: 1.0. 26 Stable tag: 1.0.3 7 7 Requires PHP: 7.0.0 8 8 License: GPLv2 or later … … 34 34 == Changelog == 35 35 36 = 1.0.3 = 37 * Fix routes output for posts without rewrite base. 38 36 39 = 1.0.2 = 37 * Fix issue with SVG icon loading in admin options 40 * Fix issue with SVG icon loading in admin options. 38 41 39 42 = 1.0.1 = 40 * Added link target to menu item output 41 * Fix for posts filter api returning results when there is no match 43 * Added link target to menu item output. 44 * Fix for posts filter api returning results when there is no match. 42 45 43 46 = 1.0.0 = -
xo-for-angular/tags/1.0.3/xo-angular.php
r2047166 r2050579 4 4 Plugin URI: https://angularxo.io 5 5 Description: Angular theme development in WordPress with templates and a powerful API. 6 Version: 1.0. 26 Version: 1.0.3 7 7 Author: Travis Brown 8 8 Author URI: http://www.xodustech.com -
xo-for-angular/trunk/Includes/Services/Classes/RouteGenerator.class.php
r2042983 r2050579 86 86 global $wp_post_types; 87 87 88 // Iterate through all available post types 88 89 foreach ($wp_post_types as $post_type => $post_type_config) { 90 // Skip if the post type is not public or is a page 89 91 if ((!$post_type_config->public) || ($post_type == 'page')) 90 92 continue; 91 93 92 if ((!$template = $this->Xo->Services->Options->GetOption('xo_' . $post_type . '_template', false)) 93 || (!$attrs = $this->Xo->Services->TemplateReader->GetAnnotatedTemplate($template))) 94 continue; 94 // Check if the post type has a rewrite base 95 if (isset($post_type_config->rewrite['slug'])) { 96 // Get the template of the rewrite base 97 if ((!$template = $this->Xo->Services->Options->GetOption('xo_' . $post_type . '_template', false)) 98 || (!$attrs = $this->Xo->Services->TemplateReader->GetAnnotatedTemplate($template))) 99 continue; 95 100 96 $rewrite = ((isset($post_type_config->rewrite['slug'])) ? $post_type_config->rewrite['slug'] : $post_type); 97 $routes[] = new XoApiAbstractRoute($rewrite, $attrs['loadChildren'], 'prefix'); 101 // Generate route for a posts hub page which will handle individual post urls 102 $routes[] = new XoApiAbstractRoute($post_type_config->rewrite['slug'], $attrs['loadChildren'], 'prefix'); 103 } else { 104 // Get all the published posts of a particular post type 105 $posts = get_posts(array( 106 'post_status' => 'publish', 107 'post_type' => $post_type, 108 'posts_per_page' => -1, 109 'fields' => 'ids' 110 )); 111 112 // Iterate through the found posts 113 foreach ($posts as $postId) { 114 // Generate route for individual post pages which are routed individually 115 if ($attrs = $this->Xo->Services->TemplateReader->GetTemplateForPost($postId)) { 116 $path = ltrim(wp_make_link_relative(get_permalink($postId)), '/'); 117 $routes[] = new XoApiAbstractRoute($path, $attrs['loadChildren'], 'full'); 118 } 119 } 120 } 98 121 } 99 122 } -
xo-for-angular/trunk/readme.txt
r2047166 r2050579 4 4 Requires at least: 4.9 5 5 Tested up to: 5.1 6 Stable tag: 1.0. 26 Stable tag: 1.0.3 7 7 Requires PHP: 7.0.0 8 8 License: GPLv2 or later … … 34 34 == Changelog == 35 35 36 = 1.0.3 = 37 * Fix routes output for posts without rewrite base. 38 36 39 = 1.0.2 = 37 * Fix issue with SVG icon loading in admin options 40 * Fix issue with SVG icon loading in admin options. 38 41 39 42 = 1.0.1 = 40 * Added link target to menu item output 41 * Fix for posts filter api returning results when there is no match 43 * Added link target to menu item output. 44 * Fix for posts filter api returning results when there is no match. 42 45 43 46 = 1.0.0 = -
xo-for-angular/trunk/xo-angular.php
r2047166 r2050579 4 4 Plugin URI: https://angularxo.io 5 5 Description: Angular theme development in WordPress with templates and a powerful API. 6 Version: 1.0. 26 Version: 1.0.3 7 7 Author: Travis Brown 8 8 Author URI: http://www.xodustech.com
Note: See TracChangeset
for help on using the changeset viewer.