Changeset 2051900
- Timestamp:
- 03/17/2019 04:16:04 AM (7 years ago)
- Location:
- xo-for-angular
- Files:
-
- 14 edited
- 18 copied
-
tags/1.0.4 (copied) (copied from xo-for-angular/trunk)
-
tags/1.0.4/Includes/Api/Abstract/Objects/Menu.class.php (copied) (copied from xo-for-angular/trunk/Includes/Api/Abstract/Objects/Menu.class.php)
-
tags/1.0.4/Includes/Api/Api.class.php (modified) (1 diff)
-
tags/1.0.4/Includes/Api/Controllers/PostsController.class.php (copied) (copied from xo-for-angular/trunk/Includes/Api/Controllers/PostsController.class.php) (3 diffs)
-
tags/1.0.4/Includes/Options/Abstract/AdminPage.class.php (modified) (2 diffs)
-
tags/1.0.4/Includes/Options/Abstract/SettingsTab.class.php (modified) (1 diff)
-
tags/1.0.4/Includes/Options/Options.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Options.class.php) (2 diffs)
-
tags/1.0.4/Includes/Options/Tabs/General/AcfTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/General/AcfTab.class.php)
-
tags/1.0.4/Includes/Options/Tabs/General/ApiTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/General/ApiTab.class.php)
-
tags/1.0.4/Includes/Options/Tabs/General/IndexTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/General/IndexTab.class.php)
-
tags/1.0.4/Includes/Options/Tabs/General/PostsTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/General/PostsTab.class.php)
-
tags/1.0.4/Includes/Options/Tabs/General/RoutingTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/General/RoutingTab.class.php)
-
tags/1.0.4/Includes/Options/Tabs/General/TemplatesTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/General/TemplatesTab.class.php)
-
tags/1.0.4/Includes/Options/Tabs/Tools/ExportTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/Tools/ExportTab.class.php) (1 diff)
-
tags/1.0.4/Includes/Options/Tabs/Tools/ProfileTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/Tools/ProfileTab.class.php) (1 diff)
-
tags/1.0.4/Includes/Options/Tabs/Tools/ToolsTab.class.php (copied) (copied from xo-for-angular/trunk/Includes/Options/Tabs/Tools/ToolsTab.class.php) (1 diff)
-
tags/1.0.4/Includes/Services/Classes/AdminNotice.class.php (copied) (copied from xo-for-angular/trunk/Includes/Services/Classes/AdminNotice.class.php)
-
tags/1.0.4/Includes/Services/Classes/RouteGenerator.class.php (copied) (copied from xo-for-angular/trunk/Includes/Services/Classes/RouteGenerator.class.php) (1 diff)
-
tags/1.0.4/Includes/Xo.php (copied) (copied from xo-for-angular/trunk/Includes/Xo.php)
-
tags/1.0.4/readme.txt (copied) (copied from xo-for-angular/trunk/readme.txt) (3 diffs)
-
tags/1.0.4/xo-angular.php (copied) (copied from xo-for-angular/trunk/xo-angular.php) (1 diff)
-
trunk/Includes/Api/Api.class.php (modified) (1 diff)
-
trunk/Includes/Api/Controllers/PostsController.class.php (modified) (3 diffs)
-
trunk/Includes/Options/Abstract/AdminPage.class.php (modified) (2 diffs)
-
trunk/Includes/Options/Abstract/SettingsTab.class.php (modified) (1 diff)
-
trunk/Includes/Options/Options.class.php (modified) (2 diffs)
-
trunk/Includes/Options/Tabs/Tools/ExportTab.class.php (modified) (1 diff)
-
trunk/Includes/Options/Tabs/Tools/ProfileTab.class.php (modified) (1 diff)
-
trunk/Includes/Options/Tabs/Tools/ToolsTab.class.php (modified) (1 diff)
-
trunk/Includes/Services/Classes/RouteGenerator.class.php (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/xo-angular.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
xo-for-angular/tags/1.0.4/Includes/Api/Api.class.php
r2042983 r2051900 66 66 $this->Xo->RequireOnce('Includes/Api/Abstract/Responses/PostsGetResponse.class.php'); 67 67 $this->Xo->RequireOnce('Includes/Api/Abstract/Responses/PostsFilterResponse.class.php'); 68 $this->Xo->RequireOnce('Includes/Api/Abstract/Responses/PostsConfigResponse.class.php'); 68 69 $this->Xo->RequireOnce('Includes/Api/Abstract/Responses/MenusResponse.class.php'); 69 70 $this->Xo->RequireOnce('Includes/Api/Abstract/Responses/TermsResponse.class.php'); -
xo-for-angular/tags/1.0.4/Includes/Api/Controllers/PostsController.class.php
r2044909 r2051900 16 16 * @return XoApiAbstractPostsGetResponse 17 17 */ 18 function Get($params) {18 public function Get($params) { 19 19 // Return an error if the url is missing 20 20 if ((empty($params['postId'])) && (empty($params['url']))) … … 101 101 * @return XoApiAbstractPostsFilterResponse 102 102 */ 103 function Filter($params) {103 public function Filter($params) { 104 104 // Collect search vars 105 105 $search = ((!empty($params['search'])) ? $params['search'] : null); … … 207 207 ); 208 208 } 209 210 /** 211 * Retrieve the config for a given post type. 212 * 213 * @since 1.0.4 214 * 215 * @param mixed $params Request object 216 * @return XoApiAbstractPostsConfigResponse 217 */ 218 public function Config($params) { 219 // Return an error if the post type is missing 220 if (empty($params['postType'])) 221 return new XoApiAbstractPostsConfigResponse(false, __('Missing post id.', 'xo')); 222 223 // Get the post type config object 224 $postTypeConfig = get_post_type_object($params['postType']); 225 226 // Return an error if the post type is not found 227 if (empty($postTypeConfig)) 228 return new XoApiAbstractPostsConfigResponse(false, __('Post type not found.', 'xo')); 229 230 // Return an error if the post type is not public 231 if (!$postTypeConfig->public) 232 return new XoApiAbstractPostsConfigResponse(false, __('Post type not found.', 'xo')); 233 234 // Return success and the post type config 235 return new XoApiAbstractPostsConfigResponse( 236 true, __('Successfully located post type config.', 'xo'), 237 $postTypeConfig 238 ); 239 } 209 240 } -
xo-for-angular/tags/1.0.4/Includes/Options/Abstract/AdminPage.class.php
r2042983 r2051900 81 81 $this->SetCurrentTab(); 82 82 83 echo '<div class="wrap ">';83 echo '<div class="wrap xo-wrap">'; 84 84 85 85 $this->RenderHeading(); … … 146 146 */ 147 147 function RenderHeading() { 148 if ($this->pageTitle) 149 echo '<h1>' . $this->pageTitle . '</h1>'; 148 if (!$this->pageTitle) 149 return; 150 151 echo '<h1 class="xo-heading"><span class="xo-logo"></span>' 152 . '<span>' . $this->pageTitle . '</span></h1>'; 150 153 } 151 154 -
xo-for-angular/tags/1.0.4/Includes/Options/Abstract/SettingsTab.class.php
r2042983 r2051900 11 11 settings_errors(); 12 12 13 echo '<form method="post" action="options.php">';13 echo '<form class="xo-form" method="post" action="options.php">'; 14 14 15 15 settings_fields($this->tabPageSlug); -
xo-for-angular/tags/1.0.4/Includes/Options/Options.class.php
r2047166 r2051900 43 43 $this->InitToolsPage(); 44 44 $this->InitToolsPageTabs(); 45 46 add_action('admin_enqueue_scripts', array($this, 'AddAdminStyles'), 10, 0); 47 } 48 49 function AddAdminStyles() { 50 $adminCssFile = $this->Xo->GetFile('assets/css/admin.css', true); 51 52 if ($adminCssFile) 53 wp_enqueue_style('admin-styles', $adminCssFile); 45 54 } 46 55 … … 49 58 $this->Xo, 50 59 'angular-xo', 51 $this->Xo->name,60 __('General Options', 'xo'), 52 61 $this->Xo->name, 53 62 $this->Xo->name, -
xo-for-angular/tags/1.0.4/Includes/Options/Tabs/Tools/ExportTab.class.php
r2043256 r2051900 16 16 */ 17 17 public function Render() { 18 echo '<div class="xo-form">'; 19 18 20 $this->AddExportSettingsSection(); 19 21 $this->AddExportAppConfigSection(); 22 23 echo '</div>'; 20 24 } 21 25 -
xo-for-angular/tags/1.0.4/Includes/Options/Tabs/Tools/ProfileTab.class.php
r2043256 r2051900 16 16 */ 17 17 public function Render() { 18 echo '<div class="xo-form">'; 19 18 20 $this->AddGeneralSection(); 21 22 echo '</div>'; 19 23 } 20 24 -
xo-for-angular/tags/1.0.4/Includes/Options/Tabs/Tools/ToolsTab.class.php
r2043256 r2051900 20 20 21 21 public function Render() { 22 echo '<div class="xo-form">'; 23 22 24 $this->AddGeneralSection(); 23 25 $this->AddGeneralSectionAppConfigEntrypoint(); 24 26 $this->AddGeneralSectionRebuildTemplateCache(); 25 27 $this->AddGeneralSectionResetDefaults(); 28 29 echo '</div>'; 26 30 } 27 31 -
xo-for-angular/tags/1.0.4/Includes/Services/Classes/RouteGenerator.class.php
r2050579 r2051900 100 100 101 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'); 102 $routes[] = new XoApiAbstractRoute($post_type_config->rewrite['slug'], $attrs['loadChildren'], 'prefix', array( 103 'postType' => $post_type 104 )); 103 105 } else { 104 106 // Get all the published posts of a particular post type -
xo-for-angular/tags/1.0.4/readme.txt
r2050579 r2051900 4 4 Requires at least: 4.9 5 5 Tested up to: 5.1 6 Stable tag: 1.0. 36 Stable tag: 1.0.4 7 7 Requires PHP: 7.0.0 8 8 License: GPLv2 or later … … 34 34 == Changelog == 35 35 36 = 1.0.4 = 37 * Add new API endpoint to retrieve post type config. 38 * Update styles used in admin options. 39 36 40 = 1.0.3 = 37 41 * Fix routes output for posts without rewrite base. … … 42 46 = 1.0.1 = 43 47 * Added link target to menu item output. 44 * Fix for posts filter apireturning results when there is no match.48 * Fix for posts filter API returning results when there is no match. 45 49 46 50 = 1.0.0 = -
xo-for-angular/tags/1.0.4/xo-angular.php
r2050579 r2051900 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. 36 Version: 1.0.4 7 7 Author: Travis Brown 8 8 Author URI: http://www.xodustech.com -
xo-for-angular/trunk/Includes/Api/Api.class.php
r2042983 r2051900 66 66 $this->Xo->RequireOnce('Includes/Api/Abstract/Responses/PostsGetResponse.class.php'); 67 67 $this->Xo->RequireOnce('Includes/Api/Abstract/Responses/PostsFilterResponse.class.php'); 68 $this->Xo->RequireOnce('Includes/Api/Abstract/Responses/PostsConfigResponse.class.php'); 68 69 $this->Xo->RequireOnce('Includes/Api/Abstract/Responses/MenusResponse.class.php'); 69 70 $this->Xo->RequireOnce('Includes/Api/Abstract/Responses/TermsResponse.class.php'); -
xo-for-angular/trunk/Includes/Api/Controllers/PostsController.class.php
r2044909 r2051900 16 16 * @return XoApiAbstractPostsGetResponse 17 17 */ 18 function Get($params) {18 public function Get($params) { 19 19 // Return an error if the url is missing 20 20 if ((empty($params['postId'])) && (empty($params['url']))) … … 101 101 * @return XoApiAbstractPostsFilterResponse 102 102 */ 103 function Filter($params) {103 public function Filter($params) { 104 104 // Collect search vars 105 105 $search = ((!empty($params['search'])) ? $params['search'] : null); … … 207 207 ); 208 208 } 209 210 /** 211 * Retrieve the config for a given post type. 212 * 213 * @since 1.0.4 214 * 215 * @param mixed $params Request object 216 * @return XoApiAbstractPostsConfigResponse 217 */ 218 public function Config($params) { 219 // Return an error if the post type is missing 220 if (empty($params['postType'])) 221 return new XoApiAbstractPostsConfigResponse(false, __('Missing post id.', 'xo')); 222 223 // Get the post type config object 224 $postTypeConfig = get_post_type_object($params['postType']); 225 226 // Return an error if the post type is not found 227 if (empty($postTypeConfig)) 228 return new XoApiAbstractPostsConfigResponse(false, __('Post type not found.', 'xo')); 229 230 // Return an error if the post type is not public 231 if (!$postTypeConfig->public) 232 return new XoApiAbstractPostsConfigResponse(false, __('Post type not found.', 'xo')); 233 234 // Return success and the post type config 235 return new XoApiAbstractPostsConfigResponse( 236 true, __('Successfully located post type config.', 'xo'), 237 $postTypeConfig 238 ); 239 } 209 240 } -
xo-for-angular/trunk/Includes/Options/Abstract/AdminPage.class.php
r2042983 r2051900 81 81 $this->SetCurrentTab(); 82 82 83 echo '<div class="wrap ">';83 echo '<div class="wrap xo-wrap">'; 84 84 85 85 $this->RenderHeading(); … … 146 146 */ 147 147 function RenderHeading() { 148 if ($this->pageTitle) 149 echo '<h1>' . $this->pageTitle . '</h1>'; 148 if (!$this->pageTitle) 149 return; 150 151 echo '<h1 class="xo-heading"><span class="xo-logo"></span>' 152 . '<span>' . $this->pageTitle . '</span></h1>'; 150 153 } 151 154 -
xo-for-angular/trunk/Includes/Options/Abstract/SettingsTab.class.php
r2042983 r2051900 11 11 settings_errors(); 12 12 13 echo '<form method="post" action="options.php">';13 echo '<form class="xo-form" method="post" action="options.php">'; 14 14 15 15 settings_fields($this->tabPageSlug); -
xo-for-angular/trunk/Includes/Options/Options.class.php
r2047166 r2051900 43 43 $this->InitToolsPage(); 44 44 $this->InitToolsPageTabs(); 45 46 add_action('admin_enqueue_scripts', array($this, 'AddAdminStyles'), 10, 0); 47 } 48 49 function AddAdminStyles() { 50 $adminCssFile = $this->Xo->GetFile('assets/css/admin.css', true); 51 52 if ($adminCssFile) 53 wp_enqueue_style('admin-styles', $adminCssFile); 45 54 } 46 55 … … 49 58 $this->Xo, 50 59 'angular-xo', 51 $this->Xo->name,60 __('General Options', 'xo'), 52 61 $this->Xo->name, 53 62 $this->Xo->name, -
xo-for-angular/trunk/Includes/Options/Tabs/Tools/ExportTab.class.php
r2043256 r2051900 16 16 */ 17 17 public function Render() { 18 echo '<div class="xo-form">'; 19 18 20 $this->AddExportSettingsSection(); 19 21 $this->AddExportAppConfigSection(); 22 23 echo '</div>'; 20 24 } 21 25 -
xo-for-angular/trunk/Includes/Options/Tabs/Tools/ProfileTab.class.php
r2043256 r2051900 16 16 */ 17 17 public function Render() { 18 echo '<div class="xo-form">'; 19 18 20 $this->AddGeneralSection(); 21 22 echo '</div>'; 19 23 } 20 24 -
xo-for-angular/trunk/Includes/Options/Tabs/Tools/ToolsTab.class.php
r2043256 r2051900 20 20 21 21 public function Render() { 22 echo '<div class="xo-form">'; 23 22 24 $this->AddGeneralSection(); 23 25 $this->AddGeneralSectionAppConfigEntrypoint(); 24 26 $this->AddGeneralSectionRebuildTemplateCache(); 25 27 $this->AddGeneralSectionResetDefaults(); 28 29 echo '</div>'; 26 30 } 27 31 -
xo-for-angular/trunk/Includes/Services/Classes/RouteGenerator.class.php
r2050579 r2051900 100 100 101 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'); 102 $routes[] = new XoApiAbstractRoute($post_type_config->rewrite['slug'], $attrs['loadChildren'], 'prefix', array( 103 'postType' => $post_type 104 )); 103 105 } else { 104 106 // Get all the published posts of a particular post type -
xo-for-angular/trunk/readme.txt
r2050579 r2051900 4 4 Requires at least: 4.9 5 5 Tested up to: 5.1 6 Stable tag: 1.0. 36 Stable tag: 1.0.4 7 7 Requires PHP: 7.0.0 8 8 License: GPLv2 or later … … 34 34 == Changelog == 35 35 36 = 1.0.4 = 37 * Add new API endpoint to retrieve post type config. 38 * Update styles used in admin options. 39 36 40 = 1.0.3 = 37 41 * Fix routes output for posts without rewrite base. … … 42 46 = 1.0.1 = 43 47 * Added link target to menu item output. 44 * Fix for posts filter apireturning results when there is no match.48 * Fix for posts filter API returning results when there is no match. 45 49 46 50 = 1.0.0 = -
xo-for-angular/trunk/xo-angular.php
r2050579 r2051900 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. 36 Version: 1.0.4 7 7 Author: Travis Brown 8 8 Author URI: http://www.xodustech.com
Note: See TracChangeset
for help on using the changeset viewer.