Files
Digital-Dabei-Hamburg-Job-M…/ddhh-job-manager.php
Viktor Miller 693974b561 feat(01-02): register job_offer CPT with ownership-enforced capabilities
- Register job_offer custom post type with German labels
- Custom capability_type 'job_offer' prevents access to regular posts
- map_meta_cap filter enforces per-post ownership
- Elementor support via show_in_rest
- Menu icon: dashicons-businessperson at position 5
- Supports: title, editor, author, thumbnail
- Archive slug: jobangebote
- Custom capabilities prevent providers from editing others' posts

Tasks completed:
- Task 1: Register job_offer custom post type
- Task 2: Add capability mapping filter for ownership enforcement

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-14 18:57:29 +09:00

41 lines
1.2 KiB
PHP

<?php
/**
* Plugin Name: Digital Dabei Job Manager
* Plugin URI: https://www.hamburg.de/digital-dabei
* Description: Closed job board for provider self-registration and mentor applications
* Version: 1.0.0
* Author: digital dabei Hamburg
* Author URI: https://www.hamburg.de/digital-dabei
* Text Domain: ddhh-job-manager
* Domain Path: /languages
* Requires at least: 6.0
* Requires PHP: 7.4
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*
* @package DDHH_Job_Manager
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
// Define plugin constants.
define( 'DDHH_JM_VERSION', '1.0.0' );
define( 'DDHH_JM_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'DDHH_JM_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'DDHH_JM_PLUGIN_FILE', __FILE__ );
// Include core classes.
require_once DDHH_JM_PLUGIN_DIR . 'includes/class-activator.php';
require_once DDHH_JM_PLUGIN_DIR . 'includes/class-deactivator.php';
require_once DDHH_JM_PLUGIN_DIR . 'includes/class-post-types.php';
require_once DDHH_JM_PLUGIN_DIR . 'includes/class-ddhh-job-manager.php';
/**
* Initialize the plugin.
*/
function ddhh_jm_init() {
DDHH_JM_Job_Manager::get_instance();
}
add_action( 'plugins_loaded', 'ddhh_jm_init', 10 );