Skip to content

Commit ebe8879

Browse files
authored
Merge pull request #280 from WonderCMS/340
Merging 3.4.0 changes to main branch. - PHP 8.2 support - Fixed "master" -> "main" renaming since we now have an organisation. - Add support for WEBP and AVIF. - Fix license year. - Fix theme that is shipped with WonderCMS. - Fix all readme links to point to new repository.
2 parents 48c8a30 + f838e00 commit ebe8879

File tree

5 files changed

+35
-29
lines changed

5 files changed

+35
-29
lines changed

.github/README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<h1 align="center">
22
<a href="https://wondercms.com" target="_blank" title="Official WonderCMS website">
3-
<img src="https://github.com/robiso/wondercms-cdn-files/blob/master/logo.svg?raw=true" alt="WonderCMS logo" title="WonderCMS" align="center" height="150" />
3+
<img src="https://github.com/WonderCMS/wondercms-cdn-files/blob/main/logo.svg?raw=true" alt="WonderCMS logo" title="WonderCMS" align="center" height="150" />
44
</a>
55
<br>WonderCMS - Free Website Builder<br>
66
<sup>Smallest CMS (5 files • 48KB zip) - 1 step install</sup>
77
</h1>
88

9-
<p align="center"><a href="https://github.com/robiso/wondercms/wiki#wondercms-documentation"><img src="https://camo.githubusercontent.com/45b2b4156eee6b315080fad3c417be62fb10b7d3/68747470733a2f2f696d672e736869656c64732e696f2f72656164746865646f63732f7069702f737461626c652e7376673f6c6f6e6743616368653d7472756526763d313030" alt="Docs" data-canonical-src="https://img.shields.io/readthedocs/pip/stable.svg?longCache=true&amp;v=100" style="max-width:100%;"></a>
9+
<p align="center"><a href="https://github.com/WonderCMS/wondercms/wiki#wondercms-documentation"><img src="https://camo.githubusercontent.com/45b2b4156eee6b315080fad3c417be62fb10b7d3/68747470733a2f2f696d672e736869656c64732e696f2f72656164746865646f63732f7069702f737461626c652e7376673f6c6f6e6743616368653d7472756526763d313030" alt="Docs" data-canonical-src="https://img.shields.io/readthedocs/pip/stable.svg?longCache=true&amp;v=100" style="max-width:100%;"></a>
1010
<a href="https://www.wondercms.com/about" rel="nofollow"><img src="https://camo.githubusercontent.com/9939e040d7c234e669e0f617f0cb2247bf86b71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f6a656374253230666f756e6465642532302d253230696e253230323030382d2532353630303f6c6f6e6743616368653d7472756526763d313030" alt="Project " data-canonical-src="https://img.shields.io/badge/project%20founded%20-%20in%202008-%25600?longCache=true&amp;v=100" style="max-width:100%;"></a>
1111
<a target="_blank" rel="noopener noreferrer" href="https://camo.githubusercontent.com/21e44ed76cd7c7d861a97c415edebdc421e8fcee/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323032302e7376673f6c6f6e6743616368653d74727565"><img src="https://img.shields.io/maintenance/yes/2022.svg?longCache=true" alt="Maintained" data-canonical-src="https://img.shields.io/maintenance/yes/2022.svg?longCache=true" style="max-width:100%;"></a>
12-
<a href="https://github.com/robiso/wondercms/blob/master/license"><img src="https://camo.githubusercontent.com/5098d9debf116c028641edd6d434f57ce436824c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e7376673f6c6f6e6743616368653d74727565" alt="License" data-canonical-src="https://img.shields.io/github/license/mashape/apistatus.svg?longCache=true" style="max-width:100%;"></a>
13-
<a href="https://github.com/robiso/wondercms/releases"><img src="https://camo.githubusercontent.com/016ebd6f0795dd02d373cfb8689b831e4438cc8b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f726f6269736f2f776f6e646572636d732f746f74616c2e7376673f6c6162656c3d646f776e6c6f61647325323073696e636525323032303137266c6f6e6743616368653d74727565" alt="Number of downloads since first release on GitHub" data-canonical-src="https://img.shields.io/github/downloads/robiso/wondercms/total.svg?label=downloads%20since%202017&amp;longCache=true" style="max-width:100%;"></a>
12+
<a href="https://github.com/WonderCMS/wondercms/blob/master/license"><img src="https://camo.githubusercontent.com/5098d9debf116c028641edd6d434f57ce436824c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e7376673f6c6f6e6743616368653d74727565" alt="License" data-canonical-src="https://img.shields.io/github/license/mashape/apistatus.svg?longCache=true" style="max-width:100%;"></a>
13+
<a href="https://github.com/WonderCMS/wondercms/releases"><img src="https://camo.githubusercontent.com/016ebd6f0795dd02d373cfb8689b831e4438cc8b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f726f6269736f2f776f6e646572636d732f746f74616c2e7376673f6c6162656c3d646f776e6c6f61647325323073696e636525323032303137266c6f6e6743616368653d74727565" alt="Number of downloads since first release on GitHub" data-canonical-src="https://img.shields.io/github/downloads/WonderCMS/wondercms/total.svg?label=downloads%20since%202017&amp;longCache=true" style="max-width:100%;"></a>
1414
<a href="https://paypal.me/WonderCMS" rel="nofollow"><img src="https://camo.githubusercontent.com/0cdc244481d2dc6524ce8e7a6a58b95a27a39773/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f6e6174652d50617950616c2d677265656e2e7376673f6c6f6e6743616368653d74727565" alt="Donate" data-canonical-src="https://img.shields.io/badge/donate-PayPal-11AABB.svg?longCache=true" style="max-width:100%;"></a>
1515
</p>
1616

@@ -28,10 +28,10 @@
2828

2929
## Small and simple flat file CMS
3030
- **No configuration needed - unzip and upload.**
31-
- 5 files: [database.js](https://github.com/robiso/wondercms/wiki/Default-database.js#default-databasejs) (JSON format), [index.php](https://github.com/robiso/wondercms/blob/master/index.php), [theme.php](https://github.com/robiso/wondercms/blob/master/themes/sky/theme.php), [style.css](https://github.com/robiso/wondercms/blob/master/themes/sky/css/style.css) and [htaccess](https://github.com/robiso/wondercms/blob/master/.htaccess).
31+
- 5 files: [database.js](https://github.com/WonderCMS/wondercms/wiki/Default-database.js#default-databasejs) (JSON format), [index.php](https://github.com/WonderCMS/wondercms/blob/master/index.php), [theme.php](https://github.com/WonderCMS/wondercms/blob/master/themes/sky/theme.php), [style.css](https://github.com/WonderCMS/wondercms/blob/master/themes/sky/css/style.css) and [htaccess](https://github.com/WonderCMS/wondercms/blob/master/.htaccess).
3232
- Transferring your website to a new host/server is done by only copy/pasting all files (no additional configuration/migration)
3333
- Privacy oriented: no cookies, tracking or "powered by" links.
34-
- Includes plugins ([via hooks/listeners](https://github.com/robiso/wondercms/wiki/List-of-hooks)), [themes](https://github.com/robiso/wondercms/wiki/Create-theme-in-8-easy-steps)/plugins installer, [backups](https://github.com/robiso/wondercms/wiki/Backup-all-files), [1 click updates](https://github.com/robiso/wondercms/wiki/One-click-update).
34+
- Includes plugins ([via hooks/listeners](https://github.com/WonderCMS/wondercms/wiki/List-of-hooks)), [themes](https://github.com/WonderCMS/wondercms/wiki/Create-theme-in-8-easy-steps)/plugins installer, [backups](https://github.com/WonderCMS/wondercms/wiki/Backup-all-files), [1 click updates](https://github.com/WonderCMS/wondercms/wiki/One-click-update).
3535
- Supports most server types (Apache, NGINX, IIS).
3636
- Project goal: keep it simple, tiny, hassle free (infrequent-ish 1 click updates).
3737

@@ -43,7 +43,7 @@
4343
<br>
4444

4545
### Other install options
46-
- Option 2: Clone from GitHub: `git clone https://github.com/robiso/wondercms.git`
46+
- Option 2: Clone from GitHub: `git clone https://github.com/WonderCMS/wondercms.git`
4747
- Option 3: [Get hosting with WonderCMS pre-installed](https://www.wondercms.com/latest)
4848
- Option 4: [Docker image](https://github.com/robiso/docker-wondercms)
4949
- Option 5: [Install with cPanel (and Softaculous) - video tutorial](https://www.youtube.com/watch?v=5tykBmKAUkA&feature=youtu.be&t=25)
@@ -52,14 +52,14 @@
5252
<br>
5353

5454
## Requirements
55-
- PHP 7.2 or greater
55+
- PHP 7.4 or greater
5656
- cURL extension
5757
- mbstring extension
5858
- Zip extension
5959
- mod_rewrite module
6060
- any type of server (Apache, NGINX or IIS)
6161

62-
*For setting up WonderCMS on NGINX or IIS servers, there is one additional step required. Read more: [NGINX setup](https://github.com/robiso/wondercms/wiki/NGINX-server-config) or [IIS setup](https://github.com/robiso/wondercms/wiki/IIS-server-config).*
62+
*For setting up WonderCMS on NGINX or IIS servers, there is one additional step required. Read more: [NGINX setup](https://github.com/WonderCMS/wondercms/wiki/NGINX-server-config) or [IIS setup](https://github.com/WonderCMS/wondercms/wiki/IIS-server-config).*
6363

6464
**WonderCMS works on most Apache servers/hosts (even free ones) by default.**
6565

@@ -76,9 +76,9 @@ Note: Some plugins also include other libraries such as jQuery, default WonderCM
7676
## Security features
7777
- Track free and transparent - WonderCMS doesn't track users or store any personal cookies, there is only one session state cookie. Your WonderCMS installation is completely detached from WonderCMS servers. One click updates are pushed through GitHub.
7878
- Supports HTTPS out of the box.
79-
- [Check how to turn on "improved security" mode](https://github.com/robiso/wondercms/wiki/Better-security-mode-(HTTPS-and-other-features)).
79+
- [Check how to turn on "improved security" mode](https://github.com/WonderCMS/wondercms/wiki/Better-security-mode-(HTTPS-and-other-features)).
8080
- All CSS and JS libraries include SubResource Integrity (SRI) tags. This prevents any changes to the libraries being loaded. If any changes are made, the libraries won't load for your and your visitors protection.
81-
- [Check how to add SRI tags to your custom theme](https://github.com/robiso/wondercms/wiki/Add-SRI-tags-to-your-theme-libraries#sri-subresource-integrity---3-steps-for-more-security). This step isn't necessary if you're using a theme from the official website.
81+
- [Check how to add SRI tags to your custom theme](https://github.com/WonderCMS/wondercms/wiki/Add-SRI-tags-to-your-theme-libraries#sri-subresource-integrity---3-steps-for-more-security). This step isn't necessary if you're using a theme from the official website.
8282
- WonderCMS encourages you to change your default login URL. **Consider your custom login URL as your private username**.
8383
- Choosing a good login URL can prevent brute force attacks.
8484
- Your login page will always return a 404 header response. Search engines do not (and should not) cache your login URL.
@@ -98,8 +98,8 @@ Note: Some plugins also include other libraries such as jQuery, default WonderCM
9898
- theme and plugin installer/updater
9999
- 1 click updates
100100
- 1 click backups
101-
- [easy to theme](https://github.com/robiso/wondercms/wiki/Create-theme-in-8-easy-steps)
102-
- [custom editable blocks](https://github.com/robiso/wondercms/wiki/Create-new-editable-areas-or-editable-blocks#difference-between-editable-blocks-and-editable-areas)
101+
- [easy to theme](https://github.com/WonderCMS/wondercms/wiki/Create-theme-in-8-easy-steps)
102+
- [custom editable blocks](https://github.com/WonderCMS/wondercms/wiki/Create-new-editable-areas-or-editable-blocks#difference-between-editable-blocks-and-editable-areas)
103103
- custom theme and plugin repositories
104104
- log of last 5 logged in IPs
105105
- file uploader
@@ -185,7 +185,7 @@ Also listed on the official [WonderCMS website](https://www.wondercms.com/donors
185185

186186

187187
#### Community & Support
188-
- [GitHub Issues](https://github.com/robiso/wondercms/issues)
188+
- [GitHub Issues](https://github.com/WonderCMS/wondercms/issues)
189189
- [Community](https://www.wondercms.com/community)
190190
- [Slack](https://wondercms.slack.com)
191191

@@ -196,11 +196,11 @@ Also listed on the official [WonderCMS website](https://www.wondercms.com/donors
196196

197197

198198
#### Github links
199-
- [Docs/Wiki](https://github.com/robiso/wondercms/wiki#wondercms-documentation)
200-
- [Common questions](https://github.com/robiso/wondercms/wiki#common-questions--help)
201-
- [List of common errors](https://github.com/robiso/wondercms/wiki/List-of-common-errors#troubleshooting-common-errors)
202-
- [How to create a theme](https://github.com/robiso/wondercms/wiki/Create-theme-in-8-easy-steps)
203-
- [How to create a plugin](https://github.com/robiso/wondercms/wiki/List-of-hooks)
199+
- [Docs/Wiki](https://github.com/WonderCMS/wondercms/wiki#wondercms-documentation)
200+
- [Common questions](https://github.com/WonderCMS/wondercms/wiki#common-questions--help)
201+
- [List of common errors](https://github.com/WonderCMS/wondercms/wiki/List-of-common-errors#troubleshooting-common-errors)
202+
- [How to create a theme](https://github.com/WonderCMS/wondercms/wiki/Create-theme-in-8-easy-steps)
203+
- [How to create a plugin](https://github.com/WonderCMS/wondercms/wiki/List-of-hooks)
204204

205205

206206
#### Hosting and install tutorial links

index.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
session_start();
10-
define('VERSION', '3.3.4');
10+
define('VERSION', '3.4.0');
1111
mb_internal_encoding('UTF-8');
1212

1313
if (defined('PHPUNIT_TESTING') === false) {
@@ -39,10 +39,10 @@ class Wcms
3939
public const MIN_PASSWORD_LENGTH = 8;
4040

4141
/** @var string WCMS_REPO - repo URL */
42-
public const WCMS_REPO = 'https://raw.githubusercontent.com/robiso/wondercms/master/';
42+
public const WCMS_REPO = 'https://raw.githubusercontent.com/WonderCMS/wondercms/main/';
4343

4444
/** @var string WCMS_CDN_REPO - CDN repo URL */
45-
public const WCMS_CDN_REPO = 'https://raw.githubusercontent.com/robiso/wondercms-cdn-files/master/';
45+
public const WCMS_CDN_REPO = 'https://raw.githubusercontent.com/WonderCMS/wondercms-cdn-files/main/';
4646

4747
/** @var string $currentPage - current page */
4848
public $currentPage = '';
@@ -1086,7 +1086,7 @@ private function downloadFileFromUrl(string $fileUrl): string
10861086
}
10871087

10881088
/**
1089-
* Get content of a file from master branch
1089+
* Get content of a file from main branch
10901090
*
10911091
* @param string $file the file we want
10921092
* @param string $repo
@@ -1099,7 +1099,7 @@ public function getFileFromRepo(string $file, string $repo = self::WCMS_REPO): s
10991099
}
11001100

11011101
/**
1102-
* Get the latest version from master branch
1102+
* Get the latest version from main branch
11031103
* @param string $repo
11041104
* @return null|string
11051105
*/
@@ -1109,7 +1109,7 @@ public function getOfficialVersion(string $repo = self::WCMS_REPO): ?string
11091109
}
11101110

11111111
/**
1112-
* Get the files from master branch
1112+
* Get the files from main branch
11131113
* @param string $fileName
11141114
* @param string $repo
11151115
* @return null|string
@@ -2201,7 +2201,7 @@ public function settings(): string
22012201
$output .= '
22022202
</div>
22032203
<div role="tabpanel" class="tab-pane" id="menu">';
2204-
$items = $this->get('config', 'menuItems');
2204+
$items = get_mangled_object_vars($this->get('config', 'menuItems'));
22052205
reset($items);
22062206
$first = key($items);
22072207
end($items);
@@ -2455,6 +2455,7 @@ private function renderSettingsMenuItem(
24552455
*/
24562456
private function renderSettingsSubMenuItem(object $subpages, string $parentKeyTree, string $parentSlugTree): string
24572457
{
2458+
$subpages = get_mangled_object_vars($subpages);
24582459
reset($subpages);
24592460
$firstSubpage = key($subpages);
24602461
end($subpages);
@@ -2672,6 +2673,8 @@ public function uploadFileAction(): void
26722673
'application/rar',
26732674
'image/svg',
26742675
'image/svg+xml',
2676+
'image/avif',
2677+
'image/webp',
26752678
'application/svg+xm',
26762679
'text/plain',
26772680
'application/vnd.ms-excel',
@@ -2683,6 +2686,7 @@ public function uploadFileAction(): void
26832686

26842687
$allowedExtensions = [
26852688
'avi',
2689+
'avif',
26862690
'css',
26872691
'doc',
26882692
'docx',
@@ -2715,6 +2719,7 @@ public function uploadFileAction(): void
27152719
'xls',
27162720
'xlsx',
27172721
'webm',
2722+
'webp',
27182723
'wmv',
27192724
'zip',
27202725
];

license

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Robert Isoski and WonderCMS contributors
3+
Copyright (c) 2023 Robert Isoski and WonderCMS contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

themes/sky/theme.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
<meta name="title" content="<?= $Wcms->get('config', 'siteTitle') ?> - <?= $Wcms->page('title') ?>" />
1313
<meta name="description" content="<?= $Wcms->page('description') ?>">
1414
<meta name="keywords" content="<?= $Wcms->page('keywords') ?>">
15-
<meta property="og:url" content="<?= $Wcms->getCurrentPageUrl() ?>" />
15+
<meta property="og:url" content="<?= $this->url() ?>" />
1616
<meta property="og:type" content="website" />
1717
<meta property="og:site_name" content="<?= $Wcms->get('config', 'siteTitle') ?>" />
1818
<meta property="og:title" content="<?= $Wcms->page('title') ?>" />
19+
<meta name="twitter:site" content="<?= $this->url() ?>" />
1920
<meta name="twitter:title" content="<?= $Wcms->get('config', 'siteTitle') ?> - <?= $Wcms->page('title') ?>" />
2021
<meta name="twitter:description" content="<?= $Wcms->page('description') ?>" />
2122

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.4
1+
3.4.0

0 commit comments

Comments
 (0)