Changeset 2932187
- Timestamp:
- 06/29/2023 10:24:37 AM (3 years ago)
- Location:
- appful-app
- Files:
-
- 3 deleted
- 3 edited
- 73 copied
-
tags/3.1.6 (copied) (copied from appful-app/trunk)
-
tags/3.1.6/appful-app.php (copied) (copied from appful-app/trunk/appful-app.php) (1 diff)
-
tags/3.1.6/appful.log (copied) (copied from appful-app/trunk/appful.log)
-
tags/3.1.6/frontend/scripts/user.js (copied) (copied from appful-app/trunk/frontend/scripts/user.js)
-
tags/3.1.6/frontend/templates/appful_menu_page.html.twig (copied) (copied from appful-app/trunk/frontend/templates/appful_menu_page.html.twig)
-
tags/3.1.6/includes/api/Api.php (copied) (copied from appful-app/trunk/includes/api/Api.php)
-
tags/3.1.6/includes/api/Endpoints.php (copied) (copied from appful-app/trunk/includes/api/Endpoints.php)
-
tags/3.1.6/includes/api/ReqHandler.php (copied) (copied from appful-app/trunk/includes/api/ReqHandler.php)
-
tags/3.1.6/includes/api/Rewrites.php (copied) (copied from appful-app/trunk/includes/api/Rewrites.php)
-
tags/3.1.6/includes/api/client/BackendClient.php (copied) (copied from appful-app/trunk/includes/api/client/BackendClient.php)
-
tags/3.1.6/includes/api/client/SelfClient.php (copied) (copied from appful-app/trunk/includes/api/client/SelfClient.php)
-
tags/3.1.6/includes/api/dtos/BlogHooksDto.php (copied) (copied from appful-app/trunk/includes/api/dtos/BlogHooksDto.php)
-
tags/3.1.6/includes/api/dtos/BlogInfoDto.php (copied) (copied from appful-app/trunk/includes/api/dtos/BlogInfoDto.php)
-
tags/3.1.6/includes/api/handlers/AuthenticateUserRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/AuthenticateUserRequestHandler.php)
-
tags/3.1.6/includes/api/handlers/ClearLogRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/ClearLogRequestHandler.php)
-
tags/3.1.6/includes/api/handlers/PullLocalPostContentRequestHandler.php (copied) (copied from appful-app/trunk/includes/api/handlers/PullLocalPostContentRequestHandler.php)
-
tags/3.1.6/includes/api/mapper/BlogHooksMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/BlogHooksMapper.php)
-
tags/3.1.6/includes/api/mapper/BlogInfoMapper.php (copied) (copied from appful-app/trunk/includes/api/mapper/BlogInfoMapper.php)
-
tags/3.1.6/includes/api/reponses/BackendResponse.php (deleted)
-
tags/3.1.6/includes/api/reponses/HttpResponse.php (copied) (copied from appful-app/trunk/includes/api/reponses/HttpResponse.php)
-
tags/3.1.6/includes/api/requests/BackendRequest.php (deleted)
-
tags/3.1.6/includes/api/requests/HttpRequest.php (copied) (copied from appful-app/trunk/includes/api/requests/HttpRequest.php)
-
tags/3.1.6/includes/domain/AuthenticateRequest.php (copied) (copied from appful-app/trunk/includes/domain/AuthenticateRequest.php)
-
tags/3.1.6/includes/domain/BlogHooks.php (copied) (copied from appful-app/trunk/includes/domain/BlogHooks.php)
-
tags/3.1.6/includes/domain/BlogInfo.php (copied) (copied from appful-app/trunk/includes/domain/BlogInfo.php)
-
tags/3.1.6/includes/helper/ClientTokenManager.php (copied) (copied from appful-app/trunk/includes/helper/ClientTokenManager.php)
-
tags/3.1.6/includes/helper/Constants.php (copied) (copied from appful-app/trunk/includes/helper/Constants.php)
-
tags/3.1.6/includes/helper/Logger.php (copied) (copied from appful-app/trunk/includes/helper/Logger.php)
-
tags/3.1.6/includes/hooks/AttachmentHook.php (copied) (copied from appful-app/trunk/includes/hooks/AttachmentHook.php)
-
tags/3.1.6/includes/hooks/PostHook.php (copied) (copied from appful-app/trunk/includes/hooks/PostHook.php) (3 diffs)
-
tags/3.1.6/includes/hooks/UserHook.php (copied) (copied from appful-app/trunk/includes/hooks/UserHook.php)
-
tags/3.1.6/includes/main/AppfulPlugin.php (copied) (copied from appful-app/trunk/includes/main/AppfulPlugin.php)
-
tags/3.1.6/includes/menu/Menu.php (copied) (copied from appful-app/trunk/includes/menu/Menu.php)
-
tags/3.1.6/includes/use_cases/AttachmentDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/AttachmentDeleteUseCase.php)
-
tags/3.1.6/includes/use_cases/AttachmentSaveUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/AttachmentSaveUseCase.php)
-
tags/3.1.6/includes/use_cases/AuthenticateUserUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/AuthenticateUserUseCase.php)
-
tags/3.1.6/includes/use_cases/CategoryDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/CategoryDeleteUseCase.php)
-
tags/3.1.6/includes/use_cases/CategorySaveUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/CategorySaveUseCase.php)
-
tags/3.1.6/includes/use_cases/ClearLogsUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/ClearLogsUseCase.php)
-
tags/3.1.6/includes/use_cases/CommentDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/CommentDeleteUseCase.php)
-
tags/3.1.6/includes/use_cases/CommentSaveUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/CommentSaveUseCase.php)
-
tags/3.1.6/includes/use_cases/DeleteSessionUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/DeleteSessionUseCase.php)
-
tags/3.1.6/includes/use_cases/GetLocalPostContentByIdUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetLocalPostContentByIdUseCase.php)
-
tags/3.1.6/includes/use_cases/GetPostContentsByIdUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/GetPostContentsByIdUseCase.php)
-
tags/3.1.6/includes/use_cases/IsLoggedInUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/IsLoggedInUseCase.php)
-
tags/3.1.6/includes/use_cases/LogoutUserUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/LogoutUserUseCase.php)
-
tags/3.1.6/includes/use_cases/PostDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/PostDeleteUseCase.php)
-
tags/3.1.6/includes/use_cases/PostSaveUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/PostSaveUseCase.php)
-
tags/3.1.6/includes/use_cases/PullLocalPostContentUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/PullLocalPostContentUseCase.php)
-
tags/3.1.6/includes/use_cases/RegisterBlogUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/RegisterBlogUseCase.php)
-
tags/3.1.6/includes/use_cases/SendAttachmentChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendAttachmentChunkSyncUseCase.php)
-
tags/3.1.6/includes/use_cases/SendCategoryChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendCategoryChunkSyncUseCase.php)
-
tags/3.1.6/includes/use_cases/SendCommentChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendCommentChunkSyncUseCase.php)
-
tags/3.1.6/includes/use_cases/SendPostChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendPostChunkSyncUseCase.php)
-
tags/3.1.6/includes/use_cases/SendTagChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendTagChunkSyncUseCase.php)
-
tags/3.1.6/includes/use_cases/SendUserChunkSyncUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SendUserChunkSyncUseCase.php)
-
tags/3.1.6/includes/use_cases/SyncAllUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/SyncAllUseCase.php)
-
tags/3.1.6/includes/use_cases/TagDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/TagDeleteUseCase.php)
-
tags/3.1.6/includes/use_cases/TagSaveUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/TagSaveUseCase.php)
-
tags/3.1.6/includes/use_cases/UseCaseManager.php (copied) (copied from appful-app/trunk/includes/use_cases/UseCaseManager.php)
-
tags/3.1.6/includes/use_cases/UserDeleteUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/UserDeleteUseCase.php)
-
tags/3.1.6/includes/use_cases/UserSaveUseCase.php (copied) (copied from appful-app/trunk/includes/use_cases/UserSaveUseCase.php)
-
tags/3.1.6/includes/wp/WPBlogManager.php (copied) (copied from appful-app/trunk/includes/wp/WPBlogManager.php)
-
tags/3.1.6/includes/wp/WPOptionsManager.php (copied) (copied from appful-app/trunk/includes/wp/WPOptionsManager.php)
-
tags/3.1.6/includes/wp/WPPostManager.php (copied) (copied from appful-app/trunk/includes/wp/WPPostManager.php)
-
tags/3.1.6/includes/wp/WPUserManager.php (copied) (copied from appful-app/trunk/includes/wp/WPUserManager.php)
-
tags/3.1.6/includes/wp/mapper/UserMapper.php (copied) (copied from appful-app/trunk/includes/wp/mapper/UserMapper.php)
-
tags/3.1.6/lib/.gitignore (deleted)
-
tags/3.1.6/lib/vendor/autoload.php (copied) (copied from appful-app/trunk/lib/vendor/autoload.php)
-
tags/3.1.6/lib/vendor/composer/ClassLoader.php (copied) (copied from appful-app/trunk/lib/vendor/composer/ClassLoader.php)
-
tags/3.1.6/lib/vendor/composer/autoload_classmap.php (copied) (copied from appful-app/trunk/lib/vendor/composer/autoload_classmap.php)
-
tags/3.1.6/lib/vendor/composer/autoload_psr4.php (copied) (copied from appful-app/trunk/lib/vendor/composer/autoload_psr4.php)
-
tags/3.1.6/lib/vendor/composer/autoload_real.php (copied) (copied from appful-app/trunk/lib/vendor/composer/autoload_real.php)
-
tags/3.1.6/lib/vendor/composer/autoload_static.php (copied) (copied from appful-app/trunk/lib/vendor/composer/autoload_static.php)
-
tags/3.1.6/lib/vendor/composer/installed.php (copied) (copied from appful-app/trunk/lib/vendor/composer/installed.php)
-
tags/3.1.6/readme.txt (copied) (copied from appful-app/trunk/readme.txt) (1 diff)
-
trunk/appful-app.php (modified) (1 diff)
-
trunk/includes/hooks/PostHook.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
appful-app/tags/3.1.6/appful-app.php
r2930682 r2932187 12 12 * Plugin URI: https://appful.io 13 13 * Description: Appful® is the number 1 plugin for turning your WordPress Content into a native, beautiful app on iOS & Android in under 5 minutes. 14 * Version: 3.1. 514 * Version: 3.1.6 15 15 * Requires at least: 5.8 16 16 * Requires PHP: 7.4 -
appful-app/tags/3.1.6/includes/hooks/PostHook.php
r2920030 r2932187 17 17 public function init() { 18 18 add_action( 19 " transition_post_status",20 function ( string $new_status, string $old_status, WP_Post $post ) {21 $this-> on_post_transition( $new_status, $old_status,$post );19 "wp_after_insert_post", 20 function ( int $post_id, WP_Post $post ) { 21 $this->after_save_post( $post ); 22 22 }, 23 23 99, 24 3,24 2, 25 25 ); 26 27 // add_action(28 // "save_post",29 // function ( int $post_id, WP_Post $post, bool $update ) {30 // $this->on_save_post( $post_id, $post, $update );31 // },32 // 10,33 // 334 // );35 26 36 27 add_action( … … 44 35 } 45 36 46 private function on_post_transition( string $new_status, ?string $old_status, WP_Post $post ) { 37 private function on_delete_post( int $post_id, WP_Post $post ) { 38 if ( $post->post_type != "post" ) { 39 return; 40 } 41 42 Logger::log( "Post with id " . $post->ID . " deleted!" ); 43 44 $this->use_case_manager->post_delete_use_case()->invoke( $post_id ); 45 } 46 47 private function after_save_post( WP_Post $post ) { 47 48 if ( defined( "DOING_AUTOSAVE" ) && DOING_AUTOSAVE ) { 48 49 return; … … 57 58 } 58 59 59 Logger::log( "Post with id " . $post->ID . " moved from " . ( ( $old_status == null ) ? "null" : $old_status ) . " to " . $new_status . "!" ); 60 61 $domain_post = PostMapper::to_domain( $post ); 62 $this->use_case_manager->post_save_use_case()->invoke( $domain_post ); 63 } 64 65 private function on_delete_post( int $post_id, WP_Post $post ) { 66 if ( $post->post_type != "post" ) { 67 return; 68 } 69 70 Logger::log( "Post with id " . $post->ID . " deleted!" ); 71 72 $this->use_case_manager->post_delete_use_case()->invoke( $post_id ); 73 } 74 75 private function on_save_post( int $post_id, WP_Post $post, bool $update ) { 76 if ( defined( "DOING_AUTOSAVE" ) && DOING_AUTOSAVE ) { 77 return; 78 } 79 80 if ( $post->post_type != "post" ) { 81 return; 82 } 83 84 if ( $post->post_status == "auto-draft" || $post->post_status == "inherit" ) { 85 return; 86 } 87 88 $this->send_new_post( $post ); 89 } 90 91 private function send_new_post( WP_Post $post ) { 92 Logger::log( "Post with id " . $post->ID . " saved!" ); 60 Logger::log( "Post with id " . $post->ID . " inserted with status " . $post->post_status . "!" ); 93 61 94 62 $domain_post = PostMapper::to_domain( $post ); -
appful-app/tags/3.1.6/readme.txt
r2930682 r2932187 6 6 Tested up to: 6.2 7 7 Requires PHP: 7.4 8 Stable tag: 3.1. 58 Stable tag: 3.1.6 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
appful-app/trunk/appful-app.php
r2930682 r2932187 12 12 * Plugin URI: https://appful.io 13 13 * Description: Appful® is the number 1 plugin for turning your WordPress Content into a native, beautiful app on iOS & Android in under 5 minutes. 14 * Version: 3.1. 514 * Version: 3.1.6 15 15 * Requires at least: 5.8 16 16 * Requires PHP: 7.4 -
appful-app/trunk/includes/hooks/PostHook.php
r2920030 r2932187 17 17 public function init() { 18 18 add_action( 19 " transition_post_status",20 function ( string $new_status, string $old_status, WP_Post $post ) {21 $this-> on_post_transition( $new_status, $old_status,$post );19 "wp_after_insert_post", 20 function ( int $post_id, WP_Post $post ) { 21 $this->after_save_post( $post ); 22 22 }, 23 23 99, 24 3,24 2, 25 25 ); 26 27 // add_action(28 // "save_post",29 // function ( int $post_id, WP_Post $post, bool $update ) {30 // $this->on_save_post( $post_id, $post, $update );31 // },32 // 10,33 // 334 // );35 26 36 27 add_action( … … 44 35 } 45 36 46 private function on_post_transition( string $new_status, ?string $old_status, WP_Post $post ) { 37 private function on_delete_post( int $post_id, WP_Post $post ) { 38 if ( $post->post_type != "post" ) { 39 return; 40 } 41 42 Logger::log( "Post with id " . $post->ID . " deleted!" ); 43 44 $this->use_case_manager->post_delete_use_case()->invoke( $post_id ); 45 } 46 47 private function after_save_post( WP_Post $post ) { 47 48 if ( defined( "DOING_AUTOSAVE" ) && DOING_AUTOSAVE ) { 48 49 return; … … 57 58 } 58 59 59 Logger::log( "Post with id " . $post->ID . " moved from " . ( ( $old_status == null ) ? "null" : $old_status ) . " to " . $new_status . "!" ); 60 61 $domain_post = PostMapper::to_domain( $post ); 62 $this->use_case_manager->post_save_use_case()->invoke( $domain_post ); 63 } 64 65 private function on_delete_post( int $post_id, WP_Post $post ) { 66 if ( $post->post_type != "post" ) { 67 return; 68 } 69 70 Logger::log( "Post with id " . $post->ID . " deleted!" ); 71 72 $this->use_case_manager->post_delete_use_case()->invoke( $post_id ); 73 } 74 75 private function on_save_post( int $post_id, WP_Post $post, bool $update ) { 76 if ( defined( "DOING_AUTOSAVE" ) && DOING_AUTOSAVE ) { 77 return; 78 } 79 80 if ( $post->post_type != "post" ) { 81 return; 82 } 83 84 if ( $post->post_status == "auto-draft" || $post->post_status == "inherit" ) { 85 return; 86 } 87 88 $this->send_new_post( $post ); 89 } 90 91 private function send_new_post( WP_Post $post ) { 92 Logger::log( "Post with id " . $post->ID . " saved!" ); 60 Logger::log( "Post with id " . $post->ID . " inserted with status " . $post->post_status . "!" ); 93 61 94 62 $domain_post = PostMapper::to_domain( $post ); -
appful-app/trunk/readme.txt
r2930682 r2932187 6 6 Tested up to: 6.2 7 7 Requires PHP: 7.4 8 Stable tag: 3.1. 58 Stable tag: 3.1.6 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.