/** * Listify Theme custom action output areas * * Requires Listify 1.0.2 or newer * * @since @@since * * @param $current_options * @param $type * * @return array|bool */ function auto_output($current_options, $type) { if ($type === 'company') { $type = "job"; } if ($type === 'resume_fields') { $type = "resume"; } $field_groups = !empty($type) ? array($type) : array('job', 'resume'); $theme_version = WP_Job_Manager_Field_Editor_Integration::check_theme('listify', '1.0.2', 'version'); if (!$theme_version) { return FALSE; } $listify_options_job = array('1.0.2' => array('single_job_listing_listify' => '---' . __("Listify Theme", 'wp-job-manager-field-editor'), 'listify_single_job_listing_meta' => __('Single Listing Meta', 'wp-job-manager-field-editor'), 'listify_single_job_listing_actions' => __('Single Listing Actions', 'wp-job-manager-field-editor'), 'single_job_listing_below_location_map' => __('Single Listing Below Location Map', 'wp-job-manager-field-editor'), 'single_job_listing_listify_widgets' => '---' . __("Listify Theme Widgets", 'wp-job-manager-field-editor'), 'listify_widget_job_listing_map_before' => __('Single Listing Top of Map Widget', 'wp-job-manager-field-editor'), 'listify_widget_job_listing_map_after' => __('Single Listing Bottom of Map Widget', 'wp-job-manager-field-editor'), 'listify_widget_job_listing_hours_before' => __('Single Listing Top of Hours Widget', 'wp-job-manager-field-editor'), 'listify_widget_job_listing_author_after' => __('Single Listing Bottom of Author Widget', 'wp-job-manager-field-editor'), 'listify_widget_job_listing_content_before' => __('Single Listing Top of Main Content Widget', 'wp-job-manager-field-editor'), 'listify_widget_job_listing_content_after' => __('Single Listing Bottom of Main Content Widget', 'wp-job-manager-field-editor'), 'listify_widget_job_listing_gallery_slider_before' => __('Single Listing Top of Gallery Widget', 'wp-job-manager-field-editor'), 'listify_widget_job_listing_gallery_slider_after' => __('Single Listing Bottom of Gallery Widget', 'wp-job-manager-field-editor'), 'listify_widget_job_listing_tags_before' => __('Single Listing Top of Tags Widget', 'wp-job-manager-field-editor'), 'listify_widget_job_listing_tags_after' => __('Single Listing Bottom of Tags Widget', 'wp-job-manager-field-editor'), 'listify_widget_job_listing_video_before' => __('Single Listing Top of Video Widget', 'wp-job-manager-field-editor'), 'listify_widget_job_listing_video_after' => __('Single Listing Bottom of Video Widget', 'wp-job-manager-field-editor'))); foreach ($field_groups as $group) { if (!isset(${"listify_options_{$group}"})) { continue; } foreach (${"listify_options_{$group}"} as $version => $options) { if (version_compare($theme_version, $version, 'ge')) { $current_options = array_merge($current_options, $options); } } } return $current_options; }
/** * Setup and Localize JS Script Translations * * @since 1.1.9 * */ function js_translations() { $support_ticket_url = 'https://plugins.smyl.es/support/new/'; // JS Translation Vars $this->js_translations = array('error_submit_ticket' => sprintf(__('If you continue receive this error, please submit a <a target="_blank" href="%s">support ticket</a>.', 'wp-job-manager-field-editor'), esc_url($support_ticket_url)), 'view_alert' => __('If you want to edit this field, please click the <strong>Edit</strong> link from the list table.', 'wp-job-manager-field-editor'), 'meta_key_required' => __('A valid meta key is required!', 'wp-job-manager-field-editor'), 'meta_key_no_spaces' => __('Meta keys can NOT have spaces in them, use an underscore instead! As an example, job shift should be job_shift.', 'wp-job-manager-field-editor'), 'meta_key_query_var' => sprintf(__('You can not use a <a href="%s" target="_blank">WordPress Public Query Variable</a> as a meta key as it will cause the submit listing page to show a 404 error! Choose something different!', 'wp-job-manager-field-editor'), 'https://codex.wordpress.org/WordPress_Query_Vars'), 'edit_change_meta_key' => __('If you change the meta key it will be saved as a new field! You should NOT do this unless you know what your doing!', 'wp-job-manager-field-editor'), 'meta_key_chars' => __('The ONLY supported characters for meta keys are a-z (lowercase), 0-9 (numbers), and _ (underscores, in place of space) for meta keys!<br />Do <strong>NOT</strong> use any other characters or you will have issues!', 'wp-job-manager-field-editor'), 'no_spaces' => __('Spaces are not allowed in this field!', 'wp-job-manager-field-editor'), 'type_required' => __('A valid type is required!', 'wp-job-manager-field-editor'), 'field_required' => __('This field is required!', 'wp-job-manager-field-editor'), 'options_required' => __('Options are required for this field type! Value IS required, label is optional. If label is not provided the value will be used instead.', 'wp-job-manager-field-editor'), 'options_badchars' => __('Option values can NOT contain the asterisk (*) or tilde (~) characters! Labels are allowed to have these characters, but values can not!', 'wp-job-manager-field-editor'), 'priority_required' => __('A valid priority is required! Priority must be a numerical value.', 'wp-job-manager-field-editor'), 'priority_nan' => __('Priority must be a numerical value! You CAN use decimals.', 'wp-job-manager-field-editor'), 'add_new_field' => __('Add New Field', 'wp-job-manager-field-editor'), 'edit_field' => __('Edit Field', 'wp-job-manager-field-editor'), 'view_field' => __('View Field', 'wp-job-manager-field-editor'), 'save_field' => __('Save Field', 'wp-job-manager-field-editor'), 'remove_field' => __('Remove Field', 'wp-job-manager-field-editor'), 'enable_field' => __('Enable Field', 'wp-job-manager-field-editor'), 'disable_field' => __('Disable Field', 'wp-job-manager-field-editor'), 'type' => __('type', 'wp-job-manager-field-editor'), 'label' => __('label', 'wp-job-manager-field-editor'), 'description' => __('description', 'wp-job-manager-field-editor'), 'placeholder' => __('placeholder', 'wp-job-manager-field-editor'), 'priority' => __('priority', 'wp-job-manager-field-editor'), 'required' => __('required', 'wp-job-manager-field-editor'), 'remove' => __('remove', 'wp-job-manager-field-editor'), 'disable' => __('disable', 'wp-job-manager-field-editor'), 'yes' => __('Yes', 'wp-job-manager-field-editor'), 'no' => __('No', 'wp-job-manager-field-editor'), 'options' => __('Options', 'wp-job-manager-field-editor'), 'cancel' => __('Cancel', 'wp-job-manager-field-editor'), 'close' => __('Close', 'wp-job-manager-field-editor'), 'enable' => __('Enable', 'wp-job-manager-field-editor'), 'disable' => __('Disable', 'wp-job-manager-field-editor'), 'error' => __('Error', 'wp-job-manager-field-editor'), 'unknown_error' => __('Uknown Error! Refresh the page and try again.', 'wp-job-manager-field-editor'), 'success' => __('Success', 'wp-job-manager-field-editor'), 'ays_remove' => __('Are you sure you want to remove', 'wp-job-manager-field-editor'), 'ays_disable' => __('Are you sure you want to disable', 'wp-job-manager-field-editor'), 'ays_enable' => __('Are you sure you want to enable', 'wp-job-manager-field-editor'), 'remove_all_confirm' => __('Are you sure? This will remove ALL of your custom and customized field data!', 'wp-job-manager-field-editor'), 'using_the_syntax' => __('Using the syntax ', 'wp-job-manager-field-editor'), 'tax_options_edit' => __('Edit Field Options', 'wp-job-manager-field-editor'), 'options_detail' => array('file' => sprintf(__('Allowed<br/><a href="%1$s" target="_blank">Mime Types</a><br/><small>NOT required</small>', 'wp-job-manager-field-editor'), 'http://codex.wordpress.org/Function_Reference/get_allowed_mime_types#Default_allowed_mime_types'), 'select' => __('Options', 'wp-job-manager-field-editor')), 'options_ph_label' => array('file' => __('image/jpeg', 'wp-job-manager-field-editor'), 'select' => __('Caption', 'wp-job-manager-field-editor')), 'options_ph_value' => array('file' => __('jpg', 'wp-job-manager-field-editor'), 'select' => __('value', 'wp-job-manager-field-editor')), 'options_label' => array('file' => __('Type', 'wp-job-manager-field-editor'), 'select' => __('Label', 'wp-job-manager-field-editor')), 'options_value' => array('file' => __('Extension', 'wp-job-manager-field-editor'), 'select' => __('Value', 'wp-job-manager-field-editor'))); $theme = WP_Job_Manager_Field_Editor_Integration::get_theme_name(); $theme_name = $theme['theme_name']; $theme_version = $theme['version']; $this->js_translations['wpjmp_exists'] = class_exists('WPJMP_Products') ? TRUE : FALSE; if ($theme_name) { $this->js_translations['theme_name'] = $theme_name; } if ($theme_version) { $this->js_translations['theme_version'] = $theme_version; } wp_localize_script('jmfe-scripts', 'jmfelocale', $this->js_translations); }
/** * Jobify Theme custom action output areas * * Requires Jobify 2.0.1.2 or newer * * @since 1.1.12 * * @param $type * * @return array|bool */ function jobify($type) { if ($type === 'company') { $type = "job"; } $theme_version = WP_Job_Manager_Field_Editor_Integration::check_theme('jobify', '2.0.1.2', 'version'); if (!$theme_version) { return FALSE; } $jobify_options_job = array('2.0.1.2' => array('single_job_listing_info_jobify' => '---' . __("Jobify Theme", 'wp-job-manager-field-editor'), 'single_job_listing_info_before' => __('Single Job Listing Before', 'wp-job-manager-field-editor'), 'single_job_listing_info_after' => __('Single Job Listing After', 'wp-job-manager-field-editor'), 'single_job_listing_info_start' => __('Single Job Listing Start', 'wp-job-manager-field-editor'), 'single_job_listing_info_end' => __('Single Job Listing End', 'wp-job-manager-field-editor'))); $jobify_options_resume = array('2.0.1.2' => array('single_resume_info_jobify' => '---' . __("Jobify Theme", 'wp-job-manager-field-editor'), 'single_resume_info_before' => __('Single Resume Listing Before', 'wp-job-manager-field-editor'), 'single_resume_info_after' => __('Single Resume Listing After', 'wp-job-manager-field-editor'), 'single_resume_info_start' => __('Single Resume Listing Start', 'wp-job-manager-field-editor'), 'single_resume_info_end' => __('Single Resume Listing End', 'wp-job-manager-field-editor'))); foreach (${"jobify_options_{$type}"} as $version => $options) { if (version_compare($theme_version, $version, 'ge')) { $this->available_options = array_merge($this->available_options, $options); } } return $this->available_options; }
/** * Singleton Instance * * @since 1.0.0 * * @return WP_Job_Manager_Field_Editor_Integration */ static function get_instance() { // If the single instance hasn't been set, set it now. if (null == self::$instance) { self::$instance = new self(); } return self::$instance; }
/** * WP_Job_Manager_Field_Editor_Integration Class Object * * @since 1.1.8 * * @return WP_Job_Manager_Field_Editor_Integration */ public function integration() { if (!class_exists('WP_Job_Manager_Field_Editor_Integration')) { include 'classes/integration.php'; } if (!$this->integration) { $this->integration = WP_Job_Manager_Field_Editor_Integration::get_instance(); } return $this->integration; }