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
<?php | |
function videoproduzent_pre_save_post( $post_id ) | |
{ | |
// check if this is to be a new post | |
if( $post_id != 'new' ) | |
{ | |
return $post_id; | |
} | |
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
/* If displaying the 'schwierigkeit' column. */ | |
case 'schwierigkeit' : | |
/* Get the schwierigkeit for the post. */ | |
$terms = get_the_terms( $post_id, 'schwierigkeit' ); | |
/* If terms were found. */ | |
if ( !empty( $terms ) ) { | |
$out = array(); |
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
// check if this is to be a new post | |
if( $post_id != 'new' ) | |
{ | |
if (get_the_title($post_id) != $_POST['acf']['field_5434172d1d00f'] ){ | |
$update_post = array( | |
'ID' => $post_id, | |
'post_title' => $_POST['acf']['field_5434172d1d00f'] | |
); | |
// Update the post into the database |
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
<?php | |
//=========================================== | |
// Load JS | |
//=========================================== | |
function cff_scripts() { | |
// Load jQuery 2.1.3 | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', 'https://code.jquery.com/jquery-2.1.3.min.js', false, null); | |