Created
April 24, 2019 05:07
-
-
Save kurudrive/b272725d7fde47b0684a81b5441db1ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////////////////////////////// | |
// 金額の上限〜加減のセパレーターを書き換える | |
////////////////////////////////////////////// | |
function my_vgjpm_salary_separater() { | |
return 'から'; | |
} | |
add_filter( 'vgjpm_salary_separater', 'my_vgjpm_salary_separater' ); | |
////////////////////////////////////////////// | |
// 表のHTMLマークアップを改変する | |
////////////////////////////////////////////// | |
function my_vgjpm_jobInfo_tags_custom( $tags ) { | |
$tags = array( | |
'outer_before' => '<dl>', | |
'title_before' => '<dt>', | |
'title_after' => '</dt>', | |
'content_before' => '<dd>', | |
'content_after' => '</dd>', | |
'outer_after' => '</dl>', | |
); | |
return $tags; | |
} | |
add_filter( 'vgjpm_jobInfo_tags', 'my_vgjpm_jobInfo_tags_custom' ); | |
////////////////////////////////////////////// | |
// HTMLごと書き換える | |
////////////////////////////////////////////// | |
function my_vgjpm_render_job_posting_info_custom( $html ) { | |
// Google求人情報用のカスタムフィールドに保存した値を取得 | |
global $post; | |
$custom_fields = vgjpm_get_custom_fields( $post->ID ); | |
$html = ''; | |
$html .= '<h4>' . $custom_fields['vkjp_title'] . ':' . __( 'Job Title', 'vk-google-job-posting-manager' ) . '</h4>'; | |
$html .= '<div>' . esc_html( $custom_fields['vkjp_title'] ) . '</div>'; | |
$html .= '<h4>' . __( 'Description', 'vk-google-job-posting-manager' ) . '</h4>'; | |
$html .= '<div>' . nl2br( esc_textarea( $custom_fields['vkjp_description'] ) ) . '</div>'; | |
return $html; | |
} | |
add_filter( 'vgjpm_render_job_posting_info', 'my_vgjpm_render_job_posting_info_custom' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment