Skip to content

Commit

Permalink
Prepare for next release
Browse files Browse the repository at this point in the history
  • Loading branch information
irshadahmad21 committed Dec 16, 2024
1 parent c32b2f2 commit f9e1992
Show file tree
Hide file tree
Showing 26 changed files with 3,136 additions and 2,993 deletions.
5 changes: 0 additions & 5 deletions .changeset/thirty-insects-kneel.md

This file was deleted.

240 changes: 120 additions & 120 deletions plugins/wptelegram-login/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,139 +150,59 @@ Source: [src/shared/LoginHandler.php](../src/shared/LoginHandler.php), [line 663

## Filters

### `widget_title`

*Filters the widget title.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$title` | `string` | The widget title. Default 'Pages'.
`$instance` | `array` | Array of settings for the current widget.
`$this->id_base` | |

**Changelog**

Version | Description
------- | -----------
`1.0.0` |

Source: [src/shared/widgets/Primary.php](../src/shared/widgets/Primary.php), [line 46](../src/shared/widgets/Primary.php#L46-L55)

### `wptelegram_login_redirect_to`

*Filters the redirect URL for the login button*

It can be used to fix the wrong URL in case the website is in subdirectory and the URL is invalid.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$redirect_to` | `string` | The redirect URL.

**Changelog**

Version | Description
------- | -----------
`1.0.0` |

Source: [src/shared/Shared.php](../src/shared/Shared.php), [line 125](../src/shared/Shared.php#L125-L134)

### `wptelegram_login_telegram_callback_url`

*Filters the callback URL for the login button*
### `wptelegram_login_get_user_by_telegram_id`

It can be used to fix the wrong URL in case the website is in subdirectory and the URL is invalid.
*Filter the user found by its Telegram ID.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$callback_url` | `string` | The callback URL.

**Changelog**

Version | Description
------- | -----------
`1.0.0` |
`$user` | `\WPTelegram\Login\includes\WP_User\|false` | The user object or false.
`$tg_user_id` | `int\|string` | Telegram User ID.

Source: [src/shared/Shared.php](../src/shared/Shared.php), [line 154](../src/shared/Shared.php#L154-L163)
Source: [src/includes/Utils.php](../src/includes/Utils.php), [line 111](../src/includes/Utils.php#L111-L117)

### `wptelegram_login_show_if_user_connected`
### `wptelegram_login_web_app_login_data`

*Filters whether to show the button if user is already connected.*
*Filters the data for the web app login.*

- [Examples](./examples/show_if_user_connected.md)
This can be used to customize the messages etc. for the web app login UI.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$show_if_connected` | `bool` | Whether to show the button if user is already connected.
`$current_user_telegram_id` | `int` | The current user's Telegram ID.

Source: [src/shared/Shared.php](../src/shared/Shared.php), [line 218](../src/shared/Shared.php#L218-L226)

### `wptelegram_login_show_if_user_is`

*Filters when to show the login button*
`$data` | `array` | The data for the web app login.

Possible values:
"logged_out", "logged_in", "author", "subscriber" etc.
Source: [src/includes/AssetManager.php](../src/includes/AssetManager.php), [line 274](../src/includes/AssetManager.php#L274-L281)

You can also pass a user role e.g "editor" or a comma separated list or an array of roles
to display the button for specific user roles
### `wptelegram_login_language_options`

Passing an empty value will display the button
for both logged in and logged out users
*Filters the language options for the settings page.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$show_if_user_is` | `string` | When to show the button.

**Changelog**

Version | Description
------- | -----------
`1.0.0` |

Source: [src/shared/Shared.php](../src/shared/Shared.php), [line 232](../src/shared/Shared.php#L232-L248)

### `wptelegram_login_use_telegram_avatar`

*Filters whether to use the Telegram avatar.*

Pass `false` to disable the Telegram avatar.

- [Examples](./examples/use_telegram_avatar.md)

**Arguments**
`$data` | `array` | The language options.
`$translations` | `array` | The available translations.

Argument | Type | Description
-------- | ---- | -----------
`$use_telegram_avatar` | `bool` | Whether to use the Telegram avatar.
`$url` | `string` | Avatar URL.
`$id_or_email` | `mixed` | user id or email.
Source: [src/includes/AssetManager.php](../src/includes/AssetManager.php), [line 410](../src/includes/AssetManager.php#L410-L416)

Source: [src/shared/Shared.php](../src/shared/Shared.php), [line 307](../src/shared/Shared.php#L307-L318)
### `wptelegram_login_intercept_request_on`

### `wptelegram_login_custom_avatar_url`
*Filter the hook and priority to use for intercepting the login request.*

*Filters the custom avatar URL.*
- [Examples](./examples/intercept_request_on.md)

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$avatar_url` | `string` | The custom avatar URL.
`$url` | `string` | Avatar URL.
`$id_or_email` | `mixed` | user id or email.
`$hook_and_priority` | `array` | The hook and priority.

Source: [src/shared/Shared.php](../src/shared/Shared.php), [line 352](../src/shared/Shared.php#L352-L359)
Source: [src/includes/Main.php](../src/includes/Main.php), [line 392](../src/includes/Main.php#L392-L399)

### `wptelegram_login_validation_query_params`

Expand Down Expand Up @@ -490,59 +410,139 @@ Argument | Type | Description

Source: [src/shared/LoginHandler.php](../src/shared/LoginHandler.php), [line 711](../src/shared/LoginHandler.php#L711-L717)

### `wptelegram_login_web_app_login_data`
### `wptelegram_login_redirect_to`

*Filters the data for the web app login.*
*Filters the redirect URL for the login button*

This can be used to customize the messages etc. for the web app login UI.
It can be used to fix the wrong URL in case the website is in subdirectory and the URL is invalid.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data` | `array` | The data for the web app login.
`$redirect_to` | `string` | The redirect URL.

Source: [src/includes/AssetManager.php](../src/includes/AssetManager.php), [line 274](../src/includes/AssetManager.php#L274-L281)
**Changelog**

### `wptelegram_login_language_options`
Version | Description
------- | -----------
`1.0.0` |

*Filters the language options for the settings page.*
Source: [src/shared/Shared.php](../src/shared/Shared.php), [line 125](../src/shared/Shared.php#L125-L134)

### `wptelegram_login_telegram_callback_url`

*Filters the callback URL for the login button*

It can be used to fix the wrong URL in case the website is in subdirectory and the URL is invalid.

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$data` | `array` | The language options.
`$translations` | `array` | The available translations.
`$callback_url` | `string` | The callback URL.

Source: [src/includes/AssetManager.php](../src/includes/AssetManager.php), [line 410](../src/includes/AssetManager.php#L410-L416)
**Changelog**

### `wptelegram_login_get_user_by_telegram_id`
Version | Description
------- | -----------
`1.0.0` |

*Filter the user found by its Telegram ID.*
Source: [src/shared/Shared.php](../src/shared/Shared.php), [line 154](../src/shared/Shared.php#L154-L163)

### `wptelegram_login_show_if_user_connected`

*Filters whether to show the button if user is already connected.*

- [Examples](./examples/show_if_user_connected.md)

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$user` | `\WPTelegram\Login\includes\WP_User\|false` | The user object or false.
`$tg_user_id` | `int\|string` | Telegram User ID.
`$show_if_connected` | `bool` | Whether to show the button if user is already connected.
`$current_user_telegram_id` | `int` | The current user's Telegram ID.

Source: [src/includes/Utils.php](../src/includes/Utils.php), [line 111](../src/includes/Utils.php#L111-L117)
Source: [src/shared/Shared.php](../src/shared/Shared.php), [line 218](../src/shared/Shared.php#L218-L226)

### `wptelegram_login_intercept_request_on`
### `wptelegram_login_show_if_user_is`

*Filter the hook and priority to use for intercepting the login request.*
*Filters when to show the login button*

- [Examples](./examples/intercept_request_on.md)
Possible values:
"logged_out", "logged_in", "author", "subscriber" etc.

You can also pass a user role e.g "editor" or a comma separated list or an array of roles
to display the button for specific user roles

Passing an empty value will display the button
for both logged in and logged out users

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$hook_and_priority` | `array` | The hook and priority.
`$show_if_user_is` | `string` | When to show the button.

Source: [src/includes/Main.php](../src/includes/Main.php), [line 392](../src/includes/Main.php#L392-L399)
**Changelog**

Version | Description
------- | -----------
`1.0.0` |

Source: [src/shared/Shared.php](../src/shared/Shared.php), [line 232](../src/shared/Shared.php#L232-L248)

### `wptelegram_login_use_telegram_avatar`

*Filters whether to use the Telegram avatar.*

Pass `false` to disable the Telegram avatar.

- [Examples](./examples/use_telegram_avatar.md)

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$use_telegram_avatar` | `bool` | Whether to use the Telegram avatar.
`$url` | `string` | Avatar URL.
`$id_or_email` | `mixed` | user id or email.

Source: [src/shared/Shared.php](../src/shared/Shared.php), [line 307](../src/shared/Shared.php#L307-L318)

### `wptelegram_login_custom_avatar_url`

*Filters the custom avatar URL.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$avatar_url` | `string` | The custom avatar URL.
`$url` | `string` | Avatar URL.
`$id_or_email` | `mixed` | user id or email.

Source: [src/shared/Shared.php](../src/shared/Shared.php), [line 352](../src/shared/Shared.php#L352-L359)

### `widget_title`

*Filters the widget title.*

**Arguments**

Argument | Type | Description
-------- | ---- | -----------
`$title` | `string` | The widget title. Default 'Pages'.
`$instance` | `array` | Array of settings for the current widget.
`$this->id_base` | |

**Changelog**

Version | Description
------- | -----------
`1.0.0` |

Source: [src/shared/widgets/Primary.php](../src/shared/widgets/Primary.php), [line 46](../src/shared/widgets/Primary.php#L46-L55)


<p align="center"><a href="https://github.com/pronamic/wp-documentor"><img src="https://cdn.jsdelivr.net/gh/pronamic/wp-documentor@main/logos/pronamic-wp-documentor.svgo-min.svg" alt="Pronamic WordPress Documentor" width="32" height="32"></a><br><em>Generated by <a href="https://github.com/pronamic/wp-documentor">Pronamic WordPress Documentor</a> <code>1.2.0</code></em><p>
Expand Down
6 changes: 6 additions & 0 deletions plugins/wptelegram/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 4.2.6

### Patch Changes

- [#229](https://github.com/wpsocio/wp-projects/pull/229) [`c32b2f2`](https://github.com/wpsocio/wp-projects/commit/c32b2f20909b660d26a01e97ec7ccdc4da690069) Thanks [@irshadahmad21](https://github.com/irshadahmad21)! - Added the instant Send to Telegram option on the post list page

## 4.2.5

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions plugins/wptelegram/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
**Tags:** telegram, notifications, posts, channel, group
**Requires at least:** 6.4
**Requires PHP:** 7.4
**Tested up to:** 6.7
**Stable tag:** 4.2.5
**Tested up to:** 6.7.1
**Stable tag:** 4.2.6
**License:** GPL-3.0-or-later
**License URI:** [https://www.gnu.org/licenses/gpl-3.0.html](https://www.gnu.org/licenses/gpl-3.0.html)
**Donate link:** [wpsocio.com/donate](https://wpsocio.com/donate)
Expand Down
2 changes: 1 addition & 1 deletion plugins/wptelegram/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wpsocio/wptelegram",
"version": "4.2.5",
"version": "4.2.6",
"description": "Integrate your WordPress site perfectly with Telegram with full control.",
"scripts": {
"lint": "\"vendor/bin/phpcs\" --standard=../../phpcs.xml --extensions=php src/ dev.php",
Expand Down
2 changes: 1 addition & 1 deletion plugins/wptelegram/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wptelegram",
"title": "WP Telegram",
"version": "4.2.5",
"version": "4.2.6",
"description": "Integrate your WordPress site perfectly with Telegram with full control.",
"private": true,
"license": "GPL-3.0-or-later",
Expand Down
Loading

0 comments on commit f9e1992

Please sign in to comment.