diff --git a/includes/admin/class-wp-job-manager-writepanels.php b/includes/admin/class-wp-job-manager-writepanels.php index 3fe9d76bc..a541ce0fa 100644 --- a/includes/admin/class-wp-job-manager-writepanels.php +++ b/includes/admin/class-wp-job-manager-writepanels.php @@ -673,10 +673,6 @@ public function save_post( $post_id, $post ) { public function save_job_listing_data( $post_id, $post ) { global $wpdb; - // These need to exist. - add_post_meta( $post_id, '_filled', 0, true ); - add_post_meta( $post_id, '_featured', 0, true ); - // Save fields. foreach ( $this->job_listing_fields() as $key => $field ) { if ( isset( $field['type'] ) && 'info' === $field['type'] ) { diff --git a/includes/class-wp-job-manager-post-types.php b/includes/class-wp-job-manager-post-types.php index 3d094140d..baa2b3ab8 100644 --- a/includes/class-wp-job-manager-post-types.php +++ b/includes/class-wp-job-manager-post-types.php @@ -205,7 +205,7 @@ public function __construct() { add_filter( 'wp_insert_post_data', [ $this, 'fix_post_name' ], 10, 2 ); add_action( 'add_post_meta', [ $this, 'maybe_add_geolocation_data' ], 10, 3 ); add_action( 'update_post_meta', [ $this, 'update_post_meta' ], 10, 4 ); - add_action( 'wp_insert_post', [ $this, 'maybe_add_default_meta_data' ], 10, 2 ); + add_action( 'wp_after_insert_post', [ $this, 'maybe_add_default_meta_data' ], 10, 2 ); add_filter( 'post_types_to_delete_with_user', [ $this, 'delete_user_add_job_listings_post_type' ] ); add_action( 'transition_post_status', [ $this, 'track_job_submission' ], 10, 3 ); diff --git a/includes/forms/class-wp-job-manager-form-submit-job.php b/includes/forms/class-wp-job-manager-form-submit-job.php index 281cdd91a..7e1e70d5f 100644 --- a/includes/forms/class-wp-job-manager-form-submit-job.php +++ b/includes/forms/class-wp-job-manager-form-submit-job.php @@ -970,10 +970,6 @@ protected function create_attachment( $attachment_url ) { * @param array $values */ protected function update_job_data( $values ) { - // Set defaults. - add_post_meta( $this->job_id, '_filled', 0, true ); - add_post_meta( $this->job_id, '_featured', 0, true ); - $maybe_attach = []; // Loop fields and save meta and term data. diff --git a/wp-job-manager.php b/wp-job-manager.php index 733ba8fb4..04581d041 100644 --- a/wp-job-manager.php +++ b/wp-job-manager.php @@ -21,7 +21,7 @@ } // Define constants. -define( 'JOB_MANAGER_VERSION', '2.3.0' ); +define( 'JOB_MANAGER_VERSION', '2.3.0-dev' ); define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) ); define( 'JOB_MANAGER_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );