Compare commits
9 Commits
Author | SHA1 | Date |
---|---|---|
Daniel Waxweiler | 979ecbc91f | |
Daniel Waxweiler | 08e80615c6 | |
Daniel Waxweiler | 526d57d1b2 | |
Daniel Waxweiler | 718d66506b | |
Daniel Waxweiler | cccd1a78b5 | |
Daniel Waxweiler | fa99821ffc | |
Daniel Waxweiler | 7bc35a3923 | |
Daniel Waxweiler | 82800a9db3 | |
Daniel Waxweiler | 46170377af |
34
README.md
34
README.md
|
@ -6,6 +6,8 @@ More details can be found in the [WordPress Plugin Directory](https://wordpress.
|
|||
|
||||
The current changelog can be found under [source/changelog.txt](source/changelog.txt).
|
||||
|
||||
This plugin uses [Mobilizon's GraphQL API](https://docs.joinmobilizon.org/contribute/graphql_api/).
|
||||
|
||||
## Development
|
||||
|
||||
### Setup
|
||||
|
@ -22,21 +24,23 @@ The current changelog can be found under [source/changelog.txt](source/changelog
|
|||
### Release procedure
|
||||
|
||||
1. Make sure `changelog.txt` is up-to-date.
|
||||
2. Use a new version number and copy over the new section into `readme.txt`.
|
||||
3. Update `package.json` with the same version number.
|
||||
4. Update the `package-lock.json`: `npm i --package-lock-only`
|
||||
5. Build: `npm run build-prod`
|
||||
6. Make sure screenshots are up-to-date.
|
||||
7. Copy the built plugin into `/trunk` of SVN.
|
||||
8. Create a new tag of the new version: `svn cp trunk tags/<version>`
|
||||
9. Check the version number occurrences in both folders.
|
||||
10. Commit everything together to the release SVN: `svn ci -m "release version <version>"` Make sure to add new files beforehand.
|
||||
11. Commit the new version in git with the same message.
|
||||
12. Tag the new version: `git tag v<version>`
|
||||
13. Push the new tag to the repository: `git push --tags`
|
||||
14. Append `-next` to the version number in `package.json`.
|
||||
15. Update the `package-lock.json`: `npm i --package-lock-only`
|
||||
16. Commit: `git commit -am "prepare next release"`
|
||||
2. Create a new section with a new version number.
|
||||
3. Copy over the new section into `readme.txt`.
|
||||
4. Update `package.json` with the same version number.
|
||||
5. Update the `package-lock.json`: `npm i --package-lock-only`
|
||||
6. Build: `npm run build-prod`
|
||||
7. Make sure screenshots are up-to-date.
|
||||
8. Copy the built plugin into `/trunk` of SVN.
|
||||
9. Create a new tag of the new version: `svn cp trunk tags/<version>`
|
||||
10. Check the version number occurrences in both folders.
|
||||
11. Make sure to handle exclamation and question marks in `svn status`.
|
||||
12. Commit everything together to the release SVN: `svn ci -m "release version <version>"`
|
||||
13. Commit the new version in git with the same message.
|
||||
14. Tag the new version: `git tag v<version>`
|
||||
15. Push the new tag to the repository: `git push --tags`
|
||||
16. Append `-next` to the version number in `package.json`.
|
||||
17. Update the `package-lock.json`: `npm i --package-lock-only`
|
||||
18. Commit: `git commit -am "prepare next release"`
|
||||
|
||||
### Other commands
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "connector-mobilizon",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.0-next",
|
||||
"description": "Display Mobilizon events in WordPress.",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
|
@ -28,12 +28,12 @@
|
|||
"luxon": "3.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.24.4",
|
||||
"@babel/eslint-parser": "7.24.1",
|
||||
"@babel/preset-env": "7.24.4",
|
||||
"@babel/core": "7.24.5",
|
||||
"@babel/eslint-parser": "7.24.5",
|
||||
"@babel/preset-env": "7.24.5",
|
||||
"@babel/preset-react": "7.24.1",
|
||||
"@wordpress/eslint-plugin": "17.12.0",
|
||||
"ava": "6.1.2",
|
||||
"@wordpress/eslint-plugin": "18.0.0",
|
||||
"ava": "6.1.3",
|
||||
"babel-loader": "9.1.3",
|
||||
"browser-env": "3.3.0",
|
||||
"c8": "9.1.0",
|
||||
|
@ -43,12 +43,12 @@
|
|||
"eslint-plugin-jsx": "0.1.0",
|
||||
"eslint-plugin-react": "7.34.1",
|
||||
"esm": "3.2.25",
|
||||
"gulp": "4.0.2",
|
||||
"gulp": "5.0.0",
|
||||
"gulp-replace": "1.1.4",
|
||||
"husky": "9.0.11",
|
||||
"lint-staged": "15.2.2",
|
||||
"prettier": "3.2.5",
|
||||
"rimraf": "5.0.5",
|
||||
"rimraf": "5.0.7",
|
||||
"webpack": "5.91.0",
|
||||
"webpack-cli": "5.1.4"
|
||||
},
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
### [Unreleased]
|
||||
#### Added
|
||||
#### Changed
|
||||
- Add some spacing between event items
|
||||
- Update dependencies
|
||||
#### Deprecated
|
||||
#### Removed
|
||||
#### Fixed
|
||||
- Fix undefined variable $classNamePrefix for both error views
|
||||
#### Security
|
||||
|
||||
### [1.0.0]
|
||||
|
|
|
@ -39,6 +39,7 @@ class EventsListBlock {
|
|||
$url = Settings::getUrl();
|
||||
$eventsCount = $block_attributes['eventsCount'];
|
||||
$groupName = isset($block_attributes['groupName']) ? $block_attributes['groupName'] : '';
|
||||
$classNamePrefix = NAME;
|
||||
|
||||
ob_start();
|
||||
try {
|
||||
|
@ -48,7 +49,6 @@ class EventsListBlock {
|
|||
$events = GraphQlClient::get_upcoming_events($url, (int) $eventsCount);
|
||||
}
|
||||
|
||||
$classNamePrefix = NAME;
|
||||
$locale = get_locale();
|
||||
$isShortOffsetNameShown = Settings::isShortOffsetNameShown();
|
||||
$timeZone = wp_timezone_string();
|
||||
|
|
|
@ -22,6 +22,7 @@ class EventsListShortcut {
|
|||
$url = Settings::getUrl();
|
||||
$eventsCount = $atts_with_overriden_defaults['events-count'];
|
||||
$groupName = $atts_with_overriden_defaults['group-name'];
|
||||
$classNamePrefix = NAME;
|
||||
|
||||
ob_start();
|
||||
try {
|
||||
|
@ -31,7 +32,6 @@ class EventsListShortcut {
|
|||
$events = GraphQlClient::get_upcoming_events($url, (int) $eventsCount);
|
||||
}
|
||||
|
||||
$classNamePrefix = NAME;
|
||||
$locale = get_locale();
|
||||
$isShortOffsetNameShown = Settings::isShortOffsetNameShown();
|
||||
$timeZone = wp_timezone_string();
|
||||
|
|
|
@ -23,6 +23,7 @@ class EventsListWidget extends \WP_Widget {
|
|||
$url = Settings::getUrl();
|
||||
$eventsCount = $options['eventsCount'];
|
||||
$groupName = isset($options['groupName']) ? $options['groupName'] : '';
|
||||
$classNamePrefix = NAME;
|
||||
|
||||
try {
|
||||
if ($groupName) {
|
||||
|
@ -31,7 +32,6 @@ class EventsListWidget extends \WP_Widget {
|
|||
$events = GraphQlClient::get_upcoming_events($url, (int) $eventsCount);
|
||||
}
|
||||
|
||||
$classNamePrefix = NAME;
|
||||
$locale = get_locale();
|
||||
$isShortOffsetNameShown = Settings::isShortOffsetNameShown();
|
||||
$timeZone = wp_timezone_string();
|
||||
|
|
|
@ -23,6 +23,8 @@ Features
|
|||
- Set the URL of the Mobilizon instance in the settings
|
||||
- Toggle adding named offset in brackets after the time in the settings
|
||||
|
||||
This plugin requests the events via Mobilizon's GraphQL API.
|
||||
|
||||
The source code is available on [Github](https://github.com/dwaxweiler/connector-mobilizon).
|
||||
|
||||
## Installation
|
||||
|
|
|
@ -9,7 +9,7 @@ if (!defined('ABSPATH')) {
|
|||
<div class="<?php echo esc_attr($classNamePrefix); ?>_events-list">
|
||||
<ul style="list-style-type: none; padding-left: 0;">
|
||||
<?php foreach($events as $event) { ?>
|
||||
<li>
|
||||
<li style="margin-top: 10px;">
|
||||
<a href="<?php echo esc_attr($event['url']); ?>"><?php echo esc_html_e($event['title']); ?></a>
|
||||
<br>
|
||||
<?php echo esc_html_e(Formatter::format_date($locale, $timeZone, $event['beginsOn'], $event['endsOn'], $isShortOffsetNameShown)); ?>
|
||||
|
|
Loading…
Reference in New Issue