markdown 自定义 - WP作业管理器WordPress插件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 自定义 - WP作业管理器WordPress插件相关的知识,希望对你有一定的参考价值。

//* Change existing fields of WP Job Manager - on frontend Submit Job form
// @link https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/forms/class-wp-job-manager-form-submit-job.php
add_filter( 'submit_job_form_fields', 'jennywren_submit_job_form_fields' );
function jennywren_submit_job_form_fields( $fields ) {

    // Here we target one of the job fields (job_location) and change its info
    $fields['job']['job_location']['label'] = "Address";
    $fields['job']['job_location']['description'] = "Enter your town and state for applicants to search by location.";
    $fields['job']['job_location']['placeholder'] = 'e.g. "Florissant, MO"';
    $fields['job']['job_description']['description'] = "(Example: duties, church size, salary range etc.)";
    $fields['job']['job_location']['required'] = true;

    $fields['company']['company_logo']['label'] = "Logo (100px square)";

    // And return the modified fields
    return $fields;
}

//* Change existing fields of WP Job Manager - on WP Admin Edit screen
// @link https://github.com/mikejolley/WP-Job-Manager/blob/master/includes/admin/class-wp-job-manager-writepanels.php
add_filter( 'job_manager_job_listing_data_fields', 'jennywren_admin_job_fields' );
function jennywren_admin_job_fields( $fields ) {

    // Here we target one of the job fields (location) and change it's placeholder
    $fields['_job_location']['label'] = "Address";
    $fields['_job_location']['placeholder'] = 'e.g. "Florissant, MO"';

    // And return the modified fields
    return $fields;
}

//* Add new field for WP Job Manager - on frontend Submit Job form
// @link https://wpjobmanager.com/document/tutorial-adding-a-salary-field-for-jobs/
add_filter( 'submit_job_form_fields', 'jennywren_new_job_form_fields' );
function jennywren_new_job_form_fields( $fields ) {
  $fields['company']['job_contact_name'] = array(
    'label'       => __( 'Contact Name', 'job_manager' ),
    'type'        => 'text',
    'required'    => true,
    'placeholder' => '',
    'priority'    => 2
  );
  $fields['company']['job_contact_phone'] = array(
    'label'       => __( 'Contact Phone Number', 'job_manager' ),
    'type'        => 'text',
    'required'    => true,
    'placeholder' => '',
    'priority'    => 2
  );
  return $fields;
}

//* Add new field for WP Job Manager - on WP Admin Edit screen
add_filter( 'job_manager_job_listing_data_fields', 'jennywren_new_admin_job_fields' );
function jennywren_new_admin_job_fields( $fields ) {
  $fields['_job_contact_name'] = array(
    'label'       => __( 'Contact Name', 'job_manager' ),
    'type'        => 'text',
    'placeholder' => '',
  );
  $fields['_job_contact_phone'] = array(
    'label'       => __( 'Contact Phone', 'job_manager' ),
    'type'        => 'text',
    'placeholder' => '',
  );
  return $fields;
}

// The following makes changes to the WordPress backend

//* Hide meta on Jobs Edit screens
add_action('admin_head', 'jennywren_hide_jobs_meta');
function jennywren_hide_jobs_meta() {
	// Only run if the user is not an admin.
	//if ( ! current_user_can( 'administrator' ) ) {
		echo '<style>
			.form-field:nth-child(3),
			.form-field:nth-child(8),
			.form-field:nth-child(9),
			.form-field:nth-child(10) {
				display: none;
			}
			.wp_job_manager_meta_data .form-field,
			.wp_job_manager_meta_data .form-field:nth-child(2n) {
			    float: left !important;
			    padding: 0 12px 0 0 !important;
			    clear: none !important;
			}
		</style>';
	//}
}

//* Add text on Jobs Edit screens Company Logo metabox
add_action('admin_head', 'twc_division_access_styling');
function twc_division_access_styling() {
		echo "<style>
			#postimagediv .inside:before {
				content: 'Upload an image size 100x100px square.';
				color: red;
			}
		</style>";
}
/* WP JOB MANAGER PLUGIN - for MINISTRY OPPORTUNITIES */

/* remove sidebar */
body.single-job_listing #main-content .container::before {
    content: none;
}

body.single-job_listing #left-area {
    width: 100%;
}

body.single-job_listing #sidebar {
    display: none;
}

.single_job_listing .company .name a.phone {
    float: none !important;
    margin-left: 0 !important;
}

/* show header */
body.job_listing-template-default #main-header {
	background-color: #0c3357;
}

/* apply button styling */
.job-manager-application-wrapper .application .application_button, 
.single_job_listing .application .application_button,
.job-manager-form .button[type="submit"] {
    color: #ffffff !important;
    font-size: 17px;
    font-family: 'Montserrat', Helvetica,Arial,Lucida,sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    background-color: #e2a437;
	-webkit-transition: all .2s;
	-moz-transition: all .2s;
	transition: all .2s;
	box-shadow: 0px 5px 0px 0px #835607;
	min-width: 250px;
	border: none;
	border-radius: 3px;
	line-height: 1.4em !important;
	margin: 0 0 5px;
	padding: 1em;
}

.job-manager-application-wrapper .application .application_button:hover, 
.single_job_listing .application .application_button:hover,
.job-manager-form .button[type="submit"]:hover {
    color: #ffffff !important;
    background: #eebe6a !important;
	box-shadow: 0px 5px 0px 0px #e2a437 !important;
}

/* job listings table styling */
.single_job_listing .meta {
    list-style: none outside !important;
}

.single_job_listing .meta .full-time {
    background-color: #1589ca;
}

.job-manager .full-time, 
.job-types .full-time, 
.job_listing .full-time {
	color: #1589ca;
}

.single_job_listing .meta .part-time {
    background-color: #e2a437;
}

.job-manager .part-time, 
.job-types .part-time, 
.job_listing .part-time {
	color: #e2a437;
}

/* search form and job form styling */
.job-manager-form h2 {
	margin: 30px 0;	
}

.job-manager-form fieldset input.input-text, 
.job-manager-form fieldset select, 
.job-manager-form fieldset textarea {
	background: #efefef;
	border: none;
	border-radius: 3px;
	font-size: 17px;
	padding: 14px 16px;
}

.job_filters .search_jobs input, 
.job_filters .search_jobs select {
	border-radius: 3px;
	font-size: 17px;
	padding: 14px 16px;
}	

.fieldset-logged_in,
.fieldset-login_required,
.fieldset-company_tagline,
.fieldset-company_video,
.fieldset-company_twitter {
	display: none;
}

.single_job_listing .company img {
    width: 100px;
    height: 100px;
}
.single_job_listing .company .name {
    margin: 0 0 0 100px;
    padding: 2.1em 1em 2.1em 3em !important;
}
.single_job_listing .company strong {
	font-size: 30px;
}

/* show logo at final size */
.job-manager-form fieldset .job-manager-uploaded-files .job-manager-uploaded-file .job-manager-uploaded-file-preview img {
    height: 100px;
    width: 100px;
}

/* job preview styling */
.entry-content .job_listing_preview_title .button, 
.job_listing_preview_title .button {
	    color: #ffffff !important;
    font-size: 17px;
    font-family: 'Montserrat', Helvetica,Arial,Lucida,sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    background-color: #e2a437;
	-webkit-transition: all .2s;
	-moz-transition: all .2s;
	transition: all .2s;
	border: none;
	border-radius: 3px;
	line-height: 1.4em !important;
	padding: .5em 1em;
	margin: 0 0 0 10px;
}

.entry-content .job_listing_preview_title .button:hover, 
.job_listing_preview_title .button:hover {
    background: #eebe6a !important;
}

.job_listing_preview {
    padding: 2em;
}

.entry-content .job_listing_preview_title, 
.job_listing_preview_title {
    padding: .75em 1em .5em 1em;
}

.entry-content .job_listing_preview_title h2 {
    color: #777 !important;
    padding: 0;
}

#job-manager-job-dashboard table td,
#job-manager-job-dashboard table th {
    padding: .5em 1em;
}

/* breadcrumb link on individual jobs */
.breadcrumb a {
	color: #aaa;
    font-size: 14px;
}

.breadcrumb a:hover {
	color: #1589ca;
}
[ file under: Notes ]

## WP Job Manager
*Adds jobs for both students and faculty/staff*

Add jobs via the backend, or the frontend here: https://website.com/post-a-job

Code in:
- Appearance > Editor > Job Manager
- Appearance > Editor > functions.php

以上是关于markdown 自定义 - WP作业管理器WordPress插件的主要内容,如果未能解决你的问题,请参考以下文章

markdown WP Trucking自定义字段

markdown 在WP Gutenberg中为块设置自定义GUI样式选项

markdown 在WP Gutenberg中为块设置自定义GUI样式选项

markdown 在WP Gutenberg中为块设置自定义GUI样式选项

高级自定义字段 acf_form() 'uploader' => 'basic' 无法在前端显示完整的 wp 媒体上传器

php 自定义WP管理员登录