| @@ -1485,14 +1485,14 @@ | ||
| 1485 | 1485 | foreach ($languages as $lang => $val) { |
| 1486 | 1486 | // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Reviewed for the NotificationX codebase: acceptable in this context. |
| 1487 | 1487 | $elementor_post_id = apply_filters( 'wpml_object_id', $elementor_id, 'nx_bar', false, $lang); |
| 1488 | 1488 | if($elementor_post_id){ |
| 1489 | - wp_delete_post($elementor_post_id, true); | |
| 1489 | + Helper::delete_owned_post($elementor_post_id, 'nx_bar'); | |
| 1490 | 1490 | } |
| 1491 | 1491 | } |
| 1492 | 1492 | return; |
| 1493 | 1493 | } |
| 1494 | - wp_delete_post($elementor_id, true); | |
| 1494 | + Helper::delete_owned_post($elementor_id, 'nx_bar'); | |
| 1495 | 1495 | } |
| 1496 | 1496 | } |
| 1497 | 1497 | |
| 1498 | 1498 | /** |
| @@ -2137,14 +2137,14 @@ | ||
| 2137 | 2137 | foreach ($languages as $lang => $val) { |
| 2138 | 2138 | // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Reviewed for the NotificationX codebase: acceptable in this context. |
| 2139 | 2139 | $wpml_pid = apply_filters( 'wpml_object_id', $pid, 'wp_block', false, $lang); |
| 2140 | 2140 | if($wpml_pid){ |
| 2141 | - wp_delete_post($wpml_pid, true); | |
| 2141 | + Helper::delete_owned_post($wpml_pid, 'nx_bar_eb'); | |
| 2142 | 2142 | } |
| 2143 | 2143 | } |
| 2144 | 2144 | return; |
| 2145 | 2145 | } |
| 2146 | - wp_delete_post($pid, true); | |
| 2146 | + Helper::delete_owned_post($pid, 'nx_bar_eb'); | |
| 2147 | 2147 | } |
| 2148 | 2148 | } |
| 2149 | 2149 | |
| 2150 | 2150 | public function templately_cloud_push_post_type($post_type){ |