2
0
Fork 0
mirror of https://github.com/discourse/wp-discourse.git synced 2025-10-04 09:01:05 +08:00
Commit graph

14 commits

Author SHA1 Message Date
Simon Cossar
d5d84d9db5
DEV: Refactor xmlrpc_publish_post_to_discourse (#491)
* Refactor xmlrpc_publish_post_to_discourse; Return wp_mail success response from publish_failure_notification.

* Add missing doc comments; don't use magic method to access title.

* Pass post title to sync_to_discourse without setting it as a variable; Use '__return_true' in add_filter callback.
2023-10-30 09:38:54 -07:00
Simon Cossar
70fbc7ca32
DEV: Refactor publish_post_after_save function (#488)
* Refactor publish_post_after_save function

* Simplify return statements; move update_post_meta call out of force_publish_post function.

* Simplify publish_to_discourse condition; Add tests for the force-publish option.

* Use gmdate() instead of date() in force_publish_max_age test.

* Add force_publish_allowed method and property; Update unit tests.

* Remove type declaration from property. Not suported in < php7.4
2023-10-20 09:50:02 -07:00
Angus McLeod
0e4e7d944b
Two Four Nine (#480)
* WP < 5.5 backwards compatibility

* WP 5.1.2 to 5.3 compatibility

* Fix linting

* Fix test workflow matrix

* Matrix requires array

* Update multisite phpunit config

* More linting fixes

* Update metadata

* Update release note
2023-03-09 16:37:10 -07:00
Angus McLeod
cb6e3343bd
Two Four Eight (#472)
* Only update metafile when needed and always add date to filename

* Add setting to disable logs entirely

* Bump version and add release notes

* Update unit-test.php
2022-12-31 20:57:16 -08:00
Angus McLeod
cb91768161
Two Four Seven (#469)
* Add comment block

* Various bugfixes

* Bump versions

* Fix unit tests

* phpcs fixes

* Escape html output

* Update .jshintignore

* Update WP PHPCS usage && fix warning in log_viewer

* Update contact section of readme

We'll be closing issues on the github repo and directing all contact to https://meta.discourse.org/c/support/wordpress
2022-12-23 11:28:43 -08:00
Angus McLeod
b19c82a7a9
Two Four Three (#431)
* Use scopes in connection status test

* Apply linting

* Add scopes root

* Fix unit tests

* Apply phpcs to test-discourse-connection

* Apply better spacing to test file

* Copy and version fixes

* Test and copy updates

* Update Logo (Wordpress 6.0 Support)

See further https://core.trac.wordpress.org/ticket/55539

* Add wpdc_publish_body filter

Filter to modify body sent when creating or updating posts

* Sidebar linting

* Make phpcs happy

* Update release notes
2022-05-24 09:27:51 -07:00
Angus McLeod
e69b1798dc
Two four zero (#439)
* Reinstate api-username for publication user

- Reinstate api-username in the publication header as the default method of user selection
- Keep change_owner approach wrapped in a setting
- Add tests for both

* Apply phpcs to tests

* Bump version

* Fix phpcs issues
2022-02-24 10:49:15 -08:00
Angus McLeod
90db807e1c
Improve Discourse Username support && request and test updates (#437)
* Add proper support for Discourse Username

* Update tests config

* Update version

* Bump version
2022-02-22 10:38:46 -08:00
Angus McLeod
0269054ee6
Wordpress 5.9 support, request standardisation and unit test improvements. (#436)
* Request consolidation && Version increment

- Confirm Wordpress 5.9 support.
- Complete wp_remote_request standardisation.
- Add discourse_request tests.

* Move to JSON posting and tag support

* Readme updates

* Update readme.txt
2022-02-10 13:33:21 -08:00
Angus McLeod
866038dc6c
Complete tests and logs (#426)
* WIP: various tests and logs

* Complete tests and logs for primary classes

* Minor fix

* WIP: various tests and logs

* Complete tests and logs for primary classes

* Minor fix

* Remove incorrectly merged code

* PHPCS fixes

* Add phpunit polifils as a dev dependency

* Bump phpunit polyfills version

* Minor test and dependency fixes

* Update ci.yml

* Complete multisite tests and integrate in CI

* Change coverage focus to entire lib folder

* Update TESTS.md

* Add logging to connection status

* Update verbose log settings

* Make verbose logging network settings in multisite

* Add utilities tests

* PHPCS fix

* Update version and add release notes

* Update settings-validator.php
2021-12-01 12:36:18 -08:00
Angus McLeod
954e705e10
PERF: use ajax tags autocomplete instead of tag list (#411)
* PERF: use ajax tags autocomplete instead of tag list

* Fix unit tests

* Fix phpcs errors

* Version bump
2021-07-16 11:59:52 -07:00
Angus McLeod
edff9958bf
FEATURE: Add tag publishing feature and move to new hook in instances >= WP 5.6 (#400)
* FIX: move to wp_after_insert_post and restrict to >= WP 5.6

@scossar Details to follow on meta

* Comply with VIP coding standards

* More WP Coding standards fixes

* FIX: move to wp_after_insert_post and restrict to >= WP 5.6

@scossar Details to follow on meta

* Comply with VIP coding standards

* More WP Coding standards fixes

* Add unit tests

* Bump version and add release notes
2021-06-04 12:04:57 -07:00
Angus McLeod
4a3d71401d
Handling comment type for post errors (#408)
* Abstract shared test methods

* Handle get_comment_type_for_post error and add comment logging

* Fix phpcs issues

* Bump version

* Add 2.2.6 changelog
2021-05-31 11:28:01 -07:00
Simon Cossar
43bd053450
Bump version to 2.2.4 (#404)
* Add base log classes

* Return maxFiles to normal level

* Use protected class variables for folder names in folder-manager

* Add unit tests for logger classes && various logger improvements

* Add log viewer

* Fix initialization sequence in LogViewer

* Add wp-discourse settings to plugin meta

* Remove metafile comments

* Add partial coverage and annotate LogViewer

* Add code coverage reporting and a tests readme

* Tests readme xdebug section formatting

* Add logging and tests to discourse-publish

This abstracts remote post components to make it possible to add consistent error and log handling. Also adds basic tests coverage for discourse-publish.

* Add successful publication test

* Add working tests for publish_after_create and publish_after_update

* Always remove test files and database upon install

* Cleanup copy and assertions for existing tests

* Final cleanup && verbose setting

* Improve structure of publish test

* Final tests, linting, security and cleanup

* PHP 7.0 Compatibility

* PHP 5.6 Compatibility

* JSHint fixes

* Update file-handler.php

* Update log viewer title

* Use older monolog and update file_handler function signatures

* Add nonce to other view_log action

* Namespace production composer packages and define build process

* Update COMPOSER.md

* Update FORMATTING.md

* Log viewer style, naming and log-refresh improvements

* Filter out all return type declarations during scoping

* JsHint: Don't use default params

* Update COMPOSER.md

* Copy fix

* Update scoper patchers notes

* Address syntax issues

- Remove >php7 syntax from non-required files
- Add phpcs pattern exclusions to phpcs.xml
- update formatting docs

* discourse-publish: address all phpcs notices and add more tests

Note: also added dealerdirect/phpcodesniffer-composer-installer to handle local requiring of codesniffer

* Handle all phpcs warnings in lib/logs

* Add todo: review phpcs exclusions to discourse-publish

* Monolog cleanup

- Remove unused monolog handlers, processors and formatters
- Add vendor_namespaced to excluded phpcs patterns

* Update CI versions to those used in composer

* Switch to using composer directly in CI actions

* Composer is packaged in shivammathur/setup-php

* Setup PHPCS via shivammathur/setup-php

* Incorrect tools key

* Use vendor/bin version of phpcs

* Install composer dependencies via ramsey/composer-install

* Update composer.lock to composer 2 and --ignore-platform-reqs

* Install lowest version of dependencies

* Move dependency-versions key

* Move composer-options key

* Exclude vendor directory from syntax checker

* Add vendor to jshintignore

* Update phpcs.xml to properly exclude js css and config files

* Address phpcs issues in log-viewer

* Fix remaining whitespace issues created in this PR

* Remove out of date sniffs and exclude specific code where necessary

* Final cleanup

* Properly escape html in log viewer

* Remove unnecessary verbiage from documentation

* Bump plugin's version to 2.2.4

Co-authored-by: Angus McLeod <angus@mcleod.org.au>
2021-05-11 15:31:24 -07:00