2
0
Fork 0
mirror of https://github.com/discourse/wp-discourse.git synced 2025-10-03 08:59:21 +08:00
Commit graph

391 commits

Author SHA1 Message Date
Angus McLeod
10fe7fbe4d
Update versions and release notes (#500) 2024-01-29 14:11:19 -08:00
Angus McLeod
3b220942dc
Two Five Zero (#494)
- Post publishing code improvements
- PHPUnit updated to PHPUnit 9
2023-12-22 00:15:51 +08: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
c49b5098ce
Two four six (#459)
* IMPROVE: improvements to utility function get_discourse_comments

Allows for get_discourse_comments to:
- Operate without comments being enabled
- Trigger a sync
- Bypass the comment cache
- Determine the comment type

* IMPROVE: add wpdc_after_webhook_post_update action to topic webhook

Adds the action wpdc_after_webhook_post_update which fires after the topic sync webhook has finished updating the topic metadata. Receives any updated wordpress post ids as an argument.

* Apply phpcs to lib/utilities

* Update version and release notes

* Update composer
2022-09-21 11:46:17 -07:00
Angus McLeod
b4a5539706
two four five (#451)
* FIX: when WP is the connect client and sync logout is enabled the response needs to be raw

https://meta.discourse.org/t/wpdiscourse-logout-not-working/232011

* IMPROVE: add the WP post_id to the wpdc_publish_body filter

https://meta.discourse.org/t/how-to-tag-posts-that-are-published-from-wordpress-to-discourse/99927

* Fix metadata and linting
2022-07-06 10:21:44 -07:00
Angus McLeod
27842753cd
Add wp_discourse_after_publish action (#450) 2022-07-04 09:49:19 -07: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
7e86834666
Fixes for comment formatter log issue (#449)
* Comment out comment_formatter log

* Format comment

* Update version

* Comment out relevant test

* Try removing PHPEnv

* Update formatting.yml

* Update formatting.yml

* Apply changes to other actions

* Add release note about github action changes

* Update to fix note

* Return without running formatter if comments are disabled

* Fix test linting

* Update test-discourse-comment.php
2022-05-11 11:29:59 -07:00
Angus McLeod
79e5953e67
Copy updates and discourse-publish bugfix (#440)
* post_update bugfix (after moving to discourse_request)

* Update api key copy

* Bump version
2022-02-28 11:22:26 -08: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
5dc4ac0871
Update workflows and documentation (#430)
* Reformat workflows, add metadata workflow and add contributing doc

* Update workflow names

* Update metadata.yml

* Update metadata.yml

* Fix script syntax

* Add package.json for tests

* Move setup node up

* Remove npm caching

* Rearrange metadata run order

* Fix metadata script comparisons

* Increment versions and add release note
2021-12-07 13:53:22 -08:00
Natalie Tay
2d8e88f957
FIX: Use correct verb for sync_sso request (#429)
* Use correct verb for sync_sso request

* Fix formatting issue for the PHP codesniffer

* Bump version to 2.3.6

Co-authored-by: scossar <scossar3@gmail.com>
2021-12-06 17:37:56 -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
012596620e
DEV: data-* attributes are now allowed by default (#425)
* DEV: data-* attributes are now allowed by default

See https://core.trac.wordpress.org/changeset/43981. Note that this old usage causes issues with data attributes used by other plugins.

* Bump version and add release notes
2021-11-09 19:01:22 -08:00
Angus McLeod
bb7354bacf
Update api key copy (#424)
* Update copy

* Bump version and add release notes
2021-11-09 09:24:55 -08:00
Angus McLeod
420d577aa0
IMPROVE: add translation pipeline for configurable text (#422)
* IMPROVE: add translation pipeline for configurable text

* Update version and release notes

* Update ci.yml
2021-11-05 12:17:25 -07:00
Angus McLeod
d6920fd665
Adopt Discourse approach to tag cleaning (#421)
* Add diacritics to allowed characters in tags

* Adopt the same approach to tag cleaning as used in core

* Bump version
2021-10-06 16:50:45 -07:00
Angus McLeod
92033ea5ba
Apply DiscourseConnect copy changes && new shortcode (#398)
* Apply DiscourseConnect copy changes && new shortcode

See further https://meta.discourse.org/t/sso-to-discourseconnect/183377

* Update usage of "Single Sign On" in readmes

* Apply DiscourseConnect copy changes && new shortcode

See further https://meta.discourse.org/t/sso-to-discourseconnect/183377

* Add logging copy change

* Apply DiscourseConnect copy changes && new shortcode

See further https://meta.discourse.org/t/sso-to-discourseconnect/183377

* Update version and changelog
2021-08-05 12:20:56 -07: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
331c94ccea
Compatability and CI Updates (#409)
* Do not use libxml_disable_entity_loader on PHP 8

* Add PHPUnit tests to CI, excluding PHP 8

* Ensure we're installing composer as needed in GH actions

* Only run tests on 7.1

* Remove PHP 8 from CI

* Remove tests from CI for now

* Re-enable tests on 7.1 only

* Start the mysql service

* CI Tweaks

* CI: revert to root pwd

* Create user with native pwd for use in install-wp-tests

* Use PHP 7.4 for tests

* re-add lock file

* Update version and changelog

* Ensure test helpers are required

* Transients must be removed to ensure we get an error response in test
2021-06-02 14:04:36 -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
Angus McLeod
51816b696d
Manually autoload files (#406)
* Manually autoload files

* Version bump
2021-05-17 21:31:46 -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
Simon Cossar
241640f98d
Add wpdc_comments_count filter (#396)
* Add wpdc_comments_count filter

* Bump version to 2.2.3
2021-04-05 14:04:01 -07:00
Simon Cossar
c8202350f5
Bump plugin version to 2.2.2 (#394) 2021-03-19 18:52:03 -07:00
Angus McLeod
5777ddb77f
Ensure topic tags is defined (#386)
* Ensure topic tags is defined

* Add version metadata
2020-12-23 09:58:34 -08:00
Simon Cossar
058082ffd5
Bump version to 2.2.0 (#384)
* Use direct db r/w for values used and updated in publication logic

- Adds ``get_post_meta_from_db`` and ``add_post_meta_to_db``, which are direct substitutes for ``get_post_meta`` and ``add_post_meta`` that read and write directly to and from the db instead of using the wordpress object cache as first port of call.

- Like the prior usage of ``add_post_meta``, ``add_post_meta_to_db`` enforces uniqueness.

- These new methods have only been applied to the meta value both used AND updated in the publish logic, i.e. ``discourse_post_id``.

* Update @wordpress/scripts to 12.1.0

* State should not be initialized if postType is not allowed

* Add option to enable/disable direct db usage

* Formatting changes for the PHP codesniffer

* Bump version to 2.2.0

* Update changelog for 2.2.0 release

Co-authored-by: Angus McLeod <angus@mcleod.org.au>
2020-12-10 15:48:43 -08:00
Simon Cossar
b8b3f6039e
Bump version to 2.1.9 (#378)
* Update @wordpress/scripts to 12.1.0

* Add newwline to end of file

* Bump version to 2.1.9
2020-11-24 13:37:44 -08:00
Simon Cossar
4ac37457d3
Bump plugin version to 2.1.8 (#375)
* Update @wordpress/scripts to 12.1.0

* Bump version to 2.1.8
2020-11-11 10:54:51 -08:00
scossar
784f811867
Bump version to 2.1.7 2020-10-16 13:35:25 -07:00
scossar
89bb55c7b8
Bump version to 2.1.6 2020-10-09 15:18:04 -07:00
scossar
7377153839
Bump version to 2.1.5 2020-09-22 13:56:16 -07:00
scossar
d799fad8ef
Bump version to 2.1.4 2020-09-11 16:20:15 -07:00
scossar
a76ba24ae9
Bump version to 2.1.3 2020-09-10 18:40:26 -07:00
scossar
f5553c4f57
Bump version to 2.1.2 2020-08-19 12:50:53 -07:00
scossar
3deb304d4f
Bump version to 2.1.1 2020-08-14 12:40:47 -07:00
scossar
972733e56d
Bump version to 2.1.0 2020-08-10 20:59:15 -07:00
scossar
772c4e6912
Bump version to 2.0.9 2020-08-10 15:01:24 -07:00
scossar
efb555370f
Bump version to 2.0.8 2020-08-09 11:00:15 -07:00
scossar
08d7fd2982
Bump version to 2.0.7 2020-08-07 17:44:46 -07:00
scossar
0ba885a18c
Bump version to 2.0.6 2020-07-11 13:20:26 -07:00
scossar
c596360767
Bump version to 2.0.5 2020-06-03 12:27:35 -07:00
scossar
cd786d4638
Bump version to 2.0.4 2020-05-29 16:20:20 -07:00
scossar
2dbef9c7d4
Bump version to 2.0.3 2020-05-27 13:28:54 -07:00
scossar
f1f4b3452f
Bump version to 2.0.2 2020-05-15 17:39:12 -07:00