Skip to content

Commit 35d5183

Browse files
authored
Merge pull request #953 from ExpressionEngine/7.dev
Push 7.5.8 change log and docs live
2 parents 04656a5 + c9301a5 commit 35d5183

File tree

3 files changed

+117
-54
lines changed

3 files changed

+117
-54
lines changed

docs/development/add-on-update-file.md

Lines changed: 66 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
# Add-on Update File
1111

12+
[TOC]
13+
1214
## Overview
1315

1416
The `upd.[addon_name].php` file (commonly just called the `upd` file) is critical to ExpressionEngine knowing what to do with your add-on. Here we tell ExpressionEngine what actions to register, core hooks we want to use, database tables to update, and much more. We need to tell ExpressionEngine what to do when we install an add-on, update an add-on, and uninstall and add-on. Thankfully the CLI takes care of most of this for us.
@@ -63,8 +65,8 @@ class Amazing_add_on_upd extends Installer
6365
The first thing you will notice in our `Amazing_add_on_upd` class is a list of properties that describe some specifics of our add-on to ExpressionEngine. There are two required properties to declare here:
6466

6567
```
66-
public $has_cp_backend = 'y'; // Shows the option to see addon’s settings.
67-
public $has_publish_fields = 'n'; // Whether module provides tab for entry edit page
68+
public $has_cp_backend = 'y'; // Shows the option to see addon’s settings.
69+
public $has_publish_fields = 'n'; // Whether module provides tab for entry edit page
6870
```
6971

7072
## Install Your Add-On (`install()`)
@@ -77,23 +79,25 @@ The CLI automatically generates our install method. This method will ensure that
7779

7880

7981
```
80-
public function install()
81-
{
82-
parent::install();
82+
public function install()
83+
{
84+
parent::install();
8385
84-
// create a database table
85-
// notify mission control
86-
// add publish tabs
86+
// create a database table
87+
// notify mission control
88+
// add publish tabs
8789
88-
return true;
89-
}
90+
return true;
91+
}
9092
```
9193

9294
### Adding Publish Tabs
9395
Optionally add the publish page tab fields to any saved publish layouts. This is ONLY used if the module adds a tab to the publish page and it requires the [`tabs()` function](#add-publish-tabs-with-your-add-on-tabs):
9496

95-
ee()->load->library('layout');
96-
ee()->layout->add_layout_tabs($this->tabs(), 'module_name');
97+
```
98+
ee()->load->library('layout');
99+
ee()->layout->add_layout_tabs($this->tabs(), 'module_name');
100+
```
97101

98102

99103
## Add Publish Tabs With Your Add-on (`tabs()`)
@@ -104,25 +108,27 @@ Optionally add the publish page tab fields to any saved publish layouts. This is
104108

105109
An optional function included only if your add-on adds a tab to the publish page. This function should return a multidimensional associative array: the top array key consisting of the tab name, followed by any field names, with each field having a variety of default settings. Note that when the fields are added to the publish page, they are namespaced to prevent variable collisions:
106110

107-
function tabs()
108-
{
109-
$tabs['tab_name'] = array(
110-
'field_name_one'=> array(
111-
'visible' => 'true',
112-
'collapse' => 'false',
113-
'htmlbuttons' => 'true',
114-
'width' => '100%'
115-
),
116-
'field_name_two'=> array(
117-
'visible' => 'true',
118-
'collapse' => 'false',
119-
'htmlbuttons' => 'true',
120-
'width' => '100%'
121-
),
122-
);
123-
124-
return $tabs;
125-
}
111+
```
112+
function tabs()
113+
{
114+
$tabs['tab_name'] = array(
115+
'field_name_one'=> array(
116+
'visible' => 'true',
117+
'collapse' => 'false',
118+
'htmlbuttons' => 'true',
119+
'width' => '100%'
120+
),
121+
'field_name_two'=> array(
122+
'visible' => 'true',
123+
'collapse' => 'false',
124+
'htmlbuttons' => 'true',
125+
'width' => '100%'
126+
),
127+
);
128+
129+
return $tabs;
130+
}
131+
```
126132

127133
Be sure that you also update your [`install()` function](#adding-publish-tabs) to add your specified tabs.
128134

@@ -138,22 +144,24 @@ The `update` method will run code when a user installs an update to our add-on.
138144
| \$current | `string` | The last recorded version of the module in the `exp_modules` table |
139145
| Returns | `Boolean` | `FALSE` if no update is needed, `TRUE` otherwise
140146

141-
public function update($current = '')
142-
{
143-
// Runs migrations
144-
parent::update($current);
147+
```
148+
public function update($current = '')
149+
{
150+
// Runs migrations
151+
parent::update($current);
145152
146-
// only run the update if the user is currently running a version less than 2.0
147-
if (version_compare($current, '2.0', '<'))
148-
{
149-
// Do your update code here
150-
// update database
151-
// notify mission control of the update
152-
}
153+
// only run the update if the user is currently running a version less than 2.0
154+
if (version_compare($current, '2.0', '<'))
155+
{
156+
// Do your update code here
157+
// update database
158+
// notify mission control of the update
159+
}
153160
154161
155-
return true;
156-
}
162+
return true;
163+
}
164+
```
157165

158166
## Uninstall Your Add-On (`uninstall()`)
159167
The CLI automatically generates our uninstall method. This method will ensure that all extensions and actions declared above will be properly uninstalled. Similarly to installation, if you just need to ensure your actions and extensions are uninstalled, you can leave this method as is. However, you added custom functionality in the `install()` method, then you need to also ensure you clean up after yourself here.
@@ -162,19 +170,23 @@ The CLI automatically generates our uninstall method. This method will ensure th
162170
| --------- | --------- | ------------------------------------------------------------ |
163171
| Returns | `Boolean` | `TRUE` if everything uninstalled properly, `FALSE` otherwise |
164172

165-
public function uninstall()
166-
{
167-
parent::uninstall();
173+
```
174+
public function uninstall()
175+
{
176+
parent::uninstall();
168177
169-
// remove my database tables
170-
// remove any publish tabs
171-
// turn off the lights
178+
// remove my database tables
179+
// remove any publish tabs
180+
// turn off the lights
172181
173-
return true;
174-
}
182+
return true;
183+
}
184+
```
175185

176186
### Removing Tabs
177187
Optionally delete any publish page tab fields saved in publish layouts. This is ONLY used if the module adds a tab to the publish page and it requires the `tabs()` function:
178188

179-
ee()->load->library('layout');
180-
ee()->layout->delete_layout_tabs($this->tabs(), 'module_name');
189+
```
190+
ee()->load->library('layout');
191+
ee()->layout->delete_layout_tabs($this->tabs(), 'module_name');
192+
```

docs/development/extension-hooks/model/channel-entry.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,17 @@ How it's called:
158158
ee()->extensions->call('after_channel_entry_bulk_delete', $delete_ids);
159159

160160
TIP: **New in version 4.3.0.**
161+
162+
## `before_channel_entry_version_delete($entry, $delete_versions)`
163+
164+
| Parameter | Type | Description |
165+
| ------------ | ------- | ---------------------------------------- |
166+
| \$entry | `Object` | Current ChannelEntry model object |
167+
| \$delete_versions | `Array` | Versions to be deleted |
168+
| Returns | `Array` | Modified array of Versions to be deleted |
169+
170+
Called after an entry is saved before Versions are deleted if versioning is enabled for the entry's channel.
171+
172+
How it's called:
173+
174+
$versions = ee()->extensions->call('before_channel_entry_version_delete', $this, $versions);

docs/installation/changelog.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,43 @@
88
-->
99
# ExpressionEngine v7 Change Log
1010

11+
## Version 7.5.8
12+
(Release: March 4th, 2025)
13+
14+
<div class="max-w-7xl mx-autotext-center">
15+
<div class="space-y-8 sm:space-y-12">
16+
<ul role="list" class="mx-auto grid grid-cols-2 gap-x-4 gap-y-1 sm:grid-cols-4 md:gap-x-6 lg:max-w-5xl lg:gap-x-8 lg:gap-y-1 xl:grid-cols-5">
17+
18+
<li><div class="space-y-4 text-center"><img class="mx-auto h-20 w-20 rounded-full lg:w-24 lg:h-24" src="https://avatars.githubusercontent.com/u/563996?v=4" /><div class="space-y-2"><div class="text-xs font-medium lg:text-sm"><p class="mb-1">Bryan Nielsen</p><p class="text-indigo-600"><a href="https://github.com/ExpressionEngine/ExpressionEngine/commits?author=bryannielsen" target="_BLANK">@bryannielsen</a></p></div></div></div></li>
19+
<li><div class="space-y-4 text-center"><img class="mx-auto h-20 w-20 rounded-full lg:w-24 lg:h-24" src="https://avatars.githubusercontent.com/u/2423727?v=4" /><div class="space-y-2"><div class="text-xs font-medium lg:text-sm"><p class="mb-1">Eric Swierczek</p><p class="text-indigo-600"><a href="https://github.com/ExpressionEngine/ExpressionEngine/commits?author=swierczek" target="_BLANK">@swierczek</a></p></div></div></div></li>
20+
<li><div class="space-y-4 text-center"><img class="mx-auto h-20 w-20 rounded-full lg:w-24 lg:h-24" src="https://avatars.githubusercontent.com/u/13821249?v=4" /><div class="space-y-2"><div class="text-xs font-medium lg:text-sm"><p class="mb-1">JCOGS Design</p><p class="text-indigo-600"><a href="https://github.com/ExpressionEngine/ExpressionEngine/commits?author=jcogs-design" target="_BLANK">@jcogs-design</a></p></div></div></div></li>
21+
<li><div class="space-y-4 text-center"><img class="mx-auto h-20 w-20 rounded-full lg:w-24 lg:h-24" src="https://avatars.githubusercontent.com/u/23382425?v=4" /><div class="space-y-2"><div class="text-xs font-medium lg:text-sm"><p class="mb-1">Yulya Lebed</p><p class="text-indigo-600"><a href="https://github.com/ExpressionEngine/ExpressionEngine/commits?author=Yulyaswan" target="_BLANK">@Yulyaswan</a></p></div></div></div></li>
22+
<li><div class="space-y-4 text-center"><img class="mx-auto h-20 w-20 rounded-full lg:w-24 lg:h-24" src="https://avatars.githubusercontent.com/u/752126?v=4" /><div class="space-y-2"><div class="text-xs font-medium lg:text-sm"><p class="mb-1">Yuri Salimovskiy</p><p class="text-indigo-600"><a href="https://github.com/ExpressionEngine/ExpressionEngine/commits?author=intoeetive" target="_BLANK">@intoeetive</a></p></div></div></div></li>
23+
<li><div class="space-y-4 text-center"><img class="mx-auto h-20 w-20 rounded-full lg:w-24 lg:h-24" src="https://avatars.githubusercontent.com/u/17011377?v=4" /><div class="space-y-2"><div class="text-xs font-medium lg:text-sm"><p class="mb-1">brad</p><p class="text-indigo-600"><a href="https://github.com/ExpressionEngine/ExpressionEngine/commits?author=bakin1999" target="_BLANK">@bakin1999</a></p></div></div></div></li>
24+
<li><div class="space-y-4 text-center"><img class="mx-auto h-20 w-20 rounded-full lg:w-24 lg:h-24" src="https://avatars.githubusercontent.com/u/1181219?v=4" /><div class="space-y-2"><div class="text-xs font-medium lg:text-sm"><p class="mb-1">robinsowell</p><p class="text-indigo-600"><a href="https://github.com/ExpressionEngine/ExpressionEngine/commits?author=robinsowell" target="_BLANK">@robinsowell</a></p></div></div></div></li>
25+
</ul>
26+
</div>
27+
</div>
28+
29+
30+
**Enhancements** 🚀
31+
32+
- Removed unnecessary indentation in "update version" sidebar item; [#4721](https://github.com/ExpressionEngine/ExpressionEngine/pull/4721)
33+
- Add method to list indexes for a given table #4710 ; [#4571](https://github.com/ExpressionEngine/ExpressionEngine/pull/4710)
34+
- Updated sidebar version section to be red with white color when theres a critical update [#4706](https://github.com/ExpressionEngine/ExpressionEngine/pull/4706)
35+
- Decouple site query from log query when viewing CP logs [#4703](https://github.com/ExpressionEngine/ExpressionEngine/pull/4703)
36+
- Updated drop-down filter controls to show as much of the filter value as possible [#4581](https://github.com/ExpressionEngine/ExpressionEngine/discussions/4581)
37+
38+
**Bug Fixes** 💃🐛
39+
40+
- Resolved an issue where numeric channel shortnames caused a js error in Pro Search settings [#4709](https://github.com/ExpressionEngine/ExpressionEngine/pull/4709)
41+
- Resolved [#4576](https://github.com/ExpressionEngine/ExpressionEngine/issues/4576) where replace in Pro Search did not work with shared Grid fields
42+
43+
**Developers** 💻
44+
45+
- Added before_version_delete hook to entry versioning [#4694](https://github.com/ExpressionEngine/ExpressionEngine/pull/4694)
46+
- Treat smart quotes more lightly when searching [#4359](https://github.com/ExpressionEngine/ExpressionEngine/discussions/4359)
47+
1148
## Version 7.5.7
1249
(Release: January 23nd, 2025)
1350

0 commit comments

Comments
 (0)