PATH:
home
/
letacommog
/
aacote
/
wp-content
/
plugins
/
wp-job-manager
/
includes
<?php /** * Base class for all WP Job Manager forms. * * @package wp-job-manager * @since 1.0.0 */ class WP_Job_Manager_Forms { /** * The single instance of the class. * * @var self * @since 1.26.0 */ private static $_instance = null; /** * Allows for accessing single instance of class. Class should only be constructed once per call. * * @since 1.26.0 * @static * @return self Main instance. */ public static function instance() { if ( is_null( self::$_instance ) ) { self::$_instance = new self(); } return self::$_instance; } /** * Constructor. */ public function __construct() { add_action( 'init', array( $this, 'load_posted_form' ) ); } /** * If a form was posted, load its class so that it can be processed before display. */ public function load_posted_form() { if ( ! empty( $_POST['job_manager_form'] ) ) { $this->load_form_class( sanitize_title( $_POST['job_manager_form'] ) ); } } /** * Load a form's class * * @param string $form_name * @return string class name on success, false on failure. */ private function load_form_class( $form_name ) { if ( ! class_exists( 'WP_Job_Manager_Form' ) ) { include 'abstracts/abstract-wp-job-manager-form.php'; } // Now try to load the form_name. $form_class = 'WP_Job_Manager_Form_' . str_replace( '-', '_', $form_name ); $form_file = JOB_MANAGER_PLUGIN_DIR . '/includes/forms/class-wp-job-manager-form-' . $form_name . '.php'; if ( class_exists( $form_class ) ) { return call_user_func( array( $form_class, 'instance' ) ); } if ( ! file_exists( $form_file ) ) { return false; } if ( ! class_exists( $form_class ) ) { include $form_file; } // Init the form. return call_user_func( array( $form_class, 'instance' ) ); } /** * Returns the form content. * * @param string $form_name * @param array $atts Optional passed attributes. * @return string|null */ public function get_form( $form_name, $atts = array() ) { $form = $this->load_form_class( $form_name ); if ( $form ) { ob_start(); $form->output( $atts ); return ob_get_clean(); } } }
[+]
..
[-] class-wp-job-manager-usage-tracking-data.php
[edit]
[+]
widgets
[-] class-wp-job-manager-install.php
[edit]
[+]
admin
[-] class-wp-job-manager-cache-helper.php
[edit]
[-] class-wp-job-manager-blocks.php
[edit]
[-] class-wp-job-manager-usage-tracking.php
[edit]
[+]
3rd-party
[-] class-wp-job-manager-data-cleaner.php
[edit]
[+]
forms
[-] class-wp-job-manager-shortcodes.php
[edit]
[-] class-wp-job-manager-data-exporter.php
[edit]
[+]
helper
[-] class-wp-job-manager-forms.php
[edit]
[-] class-wp-job-manager-api.php
[edit]
[-] class-wp-job-manager-email-notifications.php
[edit]
[+]
emails
[-] class-wp-job-manager-category-walker.php
[edit]
[+]
abstracts
[-] class-wp-job-manager-post-types.php
[edit]
[-] class-wp-job-manager-widget.php
[edit]
[-] class-wp-job-manager-ajax.php
[edit]
[-] class-wp-job-manager-geocode.php
[edit]
[+]
rest-api