elementor / elementor/elementor

elementor/element/post/ deprecation

Open
#14,019 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
7.1k
Forks
1.6k
Avg merge
1d 5h
Merged PRs (30d)
193

Description

## Prerequisites

- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [x] The issue still exists against the latest stable version of Elementor.

## Description

I've seen that you have a plan for deprecating the following action:
'elementor/element/post/document_settings'

And it's supposed to get replaced with the following actions, one for posts and the other for pages:
'elementor/element/wp-post/document_settings'
'elementor/element/wp-page/document_settings'

Apparently you haven't paid enough attention to the fact that there might be a lot of developers who have written codes for custom post types with this action 'elementor/element/post/document_settings'.

At first, I thought that you had something in mind so I tested out this action 'elementor/element/wp-{custom-post-type-name}/ document_settings' but then I relized that you didn't.

I wanna know that what did you think about custom post types?
Because with what you did, developers' codes for custom post types will be disfounctional.

## Steps to reproduce
You can add the following function to your function.php and edit a page, post and custom post type using elementor
```
add_action( 'elementor/element/wp-page/document_settings/before_section_start', 'testoptions', 10, 2 );
add_action( 'elementor/element/wp-post/document_settings/before_section_start', 'testoptions', 10, 2 );
function testoptions() {
var_dump('test');
die();
}
```

## Isolating the problem

- [x] This bug happens with only Elementor plugin active (and Elementor Pro).
- [x] This bug happens with a default WordPress theme active.
- [x] I can reproduce this bug consistently using the steps above.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.