Plugin Directory

Changeset 2413812


Ignore:
Timestamp:
11/06/2020 10:18:22 AM (5 years ago)
Author:
kodeks
Message:

Fjernet preview-fix

Location:
kodeks-dashboard/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kodeks-dashboard/trunk/functions.php

    r2413804 r2413812  
    613613    }
    614614
    615     if ( ! function_exists( 'get_current_template' )){
     615    if ( !function_exists( 'get_current_template' )){
    616616        function get_current_template( $echo = false ) {
    617617            if( !isset( $GLOBALS['current_theme_template'] ) )
     
    624624    }
    625625
    626     if ( ! function_exists( 'is_post_type' )){
     626    if ( !function_exists( 'is_post_type' )){
    627627        function is_post_type($type){
    628628            global $wp_query;
     
    737737
    738738
    739 
    740     // Fix ACF Preview
    741 
    742     if ( !function_exists( 'kodeks_fix_post_id_on_preview' ) ){
    743 
    744         function kodeks_fix_post_id_on_preview($null, $post_id) {
    745             if (is_preview()) {
    746                 return get_the_ID();
    747             }
    748             else {
    749                 $acf_post_id = isset($post_id->ID) ? $post_id->ID : $post_id;
    750 
    751                 if (!empty($acf_post_id)) {
    752                     return $acf_post_id;
    753                 }
    754                 else {
    755                     return $null;
    756                 }
    757             }
    758         }
    759         add_filter( 'acf/pre_load_post_id', 'kodeks_fix_post_id_on_preview', 10, 2 );       
    760     }
    761 
    762 
    763739    /**
    764740 * Extend WordPress search to include custom fields
  • kodeks-dashboard/trunk/kodeks-dashboard.php

    r2413804 r2413812  
    33Plugin Name: Kodeks Dashboard
    44Description: This plugin customizes WordPress for Kodeks customers.
    5 Version: 3.0.13
     5Version: 3.0.14
    66Author: Thomas Johannessen & Marius Kaase
    77Author URI: http://kodeks.no
  • kodeks-dashboard/trunk/readme.txt

    r2413804 r2413812  
    11=== Kodeks Dashboard ===
    2 Version: 3.0.13
     2Version: 3.0.14
    33Contributors: Kodeks AS
    44Tested up to: 5.5.3
Note: See TracChangeset for help on using the changeset viewer.