diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index 8834947..b7392e1 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -21,7 +21,7 @@ jobs: uses: pat-s/always-upload-cache@v1.1.4 with: path: ${{ steps.composer-cache.outputs.dir }} - # Use the hash of composer.json as the key for your cache if you do not commit composer.lock. + # Use the hash of composer.json as the key for your cache if you do not commit composer.lock. key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} #key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} restore-keys: ${{ runner.os }}-composer- diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 0756e1f..4c70a1e 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -1,7 +1,7 @@ name: Unit Testing on: - push: - pull_request: + push: + pull_request: jobs: phpunit: runs-on: ubuntu-latest diff --git a/activitypub.php b/activitypub.php index 9dd8f82..d855d9f 100644 --- a/activitypub.php +++ b/activitypub.php @@ -19,10 +19,11 @@ namespace Activitypub; * Initialize plugin */ function init() { + \defined( 'ACTIVITYPUB_EXCERPT_LENGTH' ) || \define( 'ACTIVITYPUB_EXCERPT_LENGTH', 400 ); \defined( 'ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS' ) || \define( 'ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS', 3 ); \defined( 'ACTIVITYPUB_HASHTAGS_REGEXP' ) || \define( 'ACTIVITYPUB_HASHTAGS_REGEXP', '(?:(?<=\s)|(?<=

)|(?<=
)|^)#([A-Za-z0-9_]+)(?:(?=\s|[[:punct:]]|$))' ); \defined( 'ACTIVITYPUB_ALLOWED_HTML' ) || \define( 'ACTIVITYPUB_ALLOWED_HTML', '