Skip to content

Commit

Permalink
Merge pull request #339 from threadi/fix/influenceOfCptColumns
Browse files Browse the repository at this point in the history
fixed influence on foreign ctps
  • Loading branch information
threadi authored Feb 18, 2025
2 parents fa0f3a4 + 24bcfa5 commit 2719619
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 6 additions & 0 deletions app/PersonioIntegration/PostTypes/PersonioPosition.php
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,12 @@ public function get_meta_box_for_pro_taxonomy( WP_Post $post, array $attr ): voi
public function disable_create_options(): void {
global $pagenow, $typenow;

// bail if requested list is not our cpt.
if ( $this->get_name() !== $typenow ) {
return;
}

// run further checks and set the edit url.
if ( is_admin() && ! empty( $typenow ) && ! empty( $pagenow ) && 'edit.php' === $pagenow && ! empty( sanitize_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) && stripos( sanitize_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'edit.php' ) && stripos( sanitize_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'post_type=' . $typenow ) && ! stripos( sanitize_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'page' ) ) {
$pagenow = 'edit-' . $typenow . '.php';
}
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [4.2.3] - 18.02.2025

### Fixed

- Fixed influence on foreign custom post types

## [4.2.2] - 17.02.2025

### Optimized
Expand Down
6 changes: 1 addition & 5 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ Complete revision of the plugin. Please create a backup before installing versio
== Changelog ==

= @@VersionNumber@@ =
- Search for post meta fields of our own cpt in backend (e.g. search for Position ID is now possible)
- Optimized button styles for options in backend
- Fixed missing hook on Block Detail
- Fixed error on intro usage
- Fixed canceling of intro on first intro page
- Fixed influence on foreign custom post types

[older changes](https://github.com/threadi/wp-personio-integration-light/blob/master/changelog.md)

0 comments on commit 2719619

Please sign in to comment.