• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty

Post Interface Embeds into Custom Fields

[Solved]

Foliovision › Forums › FV Player › Troubleshooting › Post Interface Embeds into Custom Fields

  • marcie 5 years, 2 months ago

    I am having a problem when I want to add a new video. The Interface is already in my custom fields panel. I am not sure how to fix this and it won’t let me insert a video until this is fixed.

    The custom fields is not a plugin but comes from my theme’s functions file. How do I separate the two from being in the same panel?

    Also having a problem with JS. But all videos seem to be working okay is this something I should worry about?

    It appears there are multiple jQuery libraries on your site, your videos might not be playing or may play with defects, please check.

    We also recommend you to open any of your videos on your site and see if you get a red warning message about JavaScript not working.

    FV Flowplayer script found: https://radcliffemedia.sosugary.com/wp-content/plugins/fv-wordpress-flowplayer/flowplayer/fv-flowplayer.min.js?ver=7.4.37.727!

    jQuery library found: https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js!

    jQuery library found: https://radcliffemedia.sosugary.com/wp-includes/js/jquery/jquery.js?ver=1.12.4-wp!

    screenshot-2020-12-01-22-44-58
    Screenshot-2020-12-01-22.44.58
    screenshot-2020-12-01-22-44-21
    Screenshot-2020-12-01-22.44.21
Viewing 10 replies - 1 through 10 (of 10 total)
  • Chiara Rendekova 5 years ago
    Avatar photo

    Hi Marcie,

    Thank you for reaching out to us.

    Could you please send us over your system info – Settings -> FV Player Pro -> Tools -> System Info? Our programmer will take a closer look on what might be causing your issue with adding your video.

    Thanks,
    Chiara

    marcie 5 years ago

    Sure

    ( System Info removed )
    Martin 5 years ago

    Hello Marcie,

    looking at your screenshot https://foliovision.com/images/2020/12/Screenshot-2020-12-01-22.44.21.png it appears something is calling one of the WP action hooks in a non-standard way.

    Do you get into the same issue when you try to use some standard WordPress theme such as Twenty Twenty?

    If that won’t help, then it might be one of the plugins. That warning about JavaScript is worth checking – if some plugin is loading the secondary copy of jQuery library like that it’s a good indication that some plugin is outdated and might be resposnible for these editing issues.

    I recommend that you try disabling plugins one by one until you find which one it is. Or you can download all your files using FTP and then look for https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js in the file contents with some advanced search tool.

    Thanks,
    Martin

    marcie 5 years ago

    I get nothing using the default 2020 theme because the theme is not calling anything so that is irrelevant.

    As for the plugins deal I don’t really use any on the site and the ones I do use don’t affect it. FLV player is the only one doing this.

    marcie 5 years ago

    the problem is between the theme’s function file and FLV Player.

    Martin 5 years ago

    Hello Marcie,

    I see no mention of a FLV Player plugin in your System Info, so I guess you mean FV Player.

    It’s great that you were able to figure it out. Do you see anything suspicious in that function.php file?

    Does it have a lot of “include” or “require” calls? If not, please send that file over to us – you can change the extensions from .php to .txt and then attach it here. I should be able to spot the suspicious call in it and figure out how to improve our FV Player’s compatibility.

    Thanks,
    Martin

    marcie 5 years ago
    <?php
    add_theme_support( 'post-thumbnails' );
    add_image_size( 'single-post-thumbnail', 590, 180 );
    
    
    if ( function_exists('register_sidebars') ) {
    	register_sidebar(array(
                    'name' => 'sidebar',
    		'before_widget' => '<div class="sidebarcontainer">',
    		'after_widget' => '</div><br>',
    		'before_title' => '<center><div class="sidebartitle">',
    		'after_title' => '</div></center>',
    	));
    }
    
    
    
    function wpb_total_posts() { 
    $total = wp_count_posts()->publish;
    return $total; 
    } 
    add_shortcode('total_posts','wpb_total_posts');
    
    function designsbykaci_numeric_posts_nav() {
     
        if( is_singular() )
            return;
     
        global $wp_query;
     
        /** Stop execution if there's only 1 page */
        if( $wp_query->max_num_pages <= 1 )
            return;
     
        $paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;
        $max   = intval( $wp_query->max_num_pages );
     
        /** Add current page to the array */
        if ( $paged >= 1 )
            $links[] = $paged;
     
        /** Add the pages around the current page to the array */
        if ( $paged >= 3 ) {
            $links[] = $paged - 1;
            $links[] = $paged - 2;
        }
     
        if ( ( $paged + 2 ) <= $max ) {
            $links[] = $paged + 2;
            $links[] = $paged + 1;
        }
     
        echo '<div class="pagenavi">
      ' . "\n"; /** Previous Post Link */ if ( get_previous_posts_link() ) printf( '
    • %s
    • ' . "\n", get_previous_posts_link() ); /** Link to first page, plus ellipses if necessary */ if ( ! in_array( 1, $links ) ) { $class = 1 == $paged ? ' class="active"' : ''; printf( '<li%s>%s' . "\n", $class, esc_url( get_pagenum_link( 1 ) ), '1' ); if ( ! in_array( 2, $links ) ) echo '
    • …
    • '; } /** Link to current page, plus 2 pages in either direction if necessary */ sort( $links ); foreach ( (array) $links as $link ) { $class = $paged == $link ? ' class="active"' : ''; printf( '<li%s>%s' . "\n", $class, esc_url( get_pagenum_link( $link ) ), $link ); } /** Link to last page, plus ellipses if necessary */ if ( ! in_array( $max, $links ) ) { if ( ! in_array( $max - 1, $links ) ) echo '
    • …
    • ' . "\n"; $class = $paged == $max ? ' class="active"' : ''; printf( '<li%s>%s' . "\n", $class, esc_url( get_pagenum_link( $max ) ), $max ); } /** Next Post Link */ if ( get_next_posts_link() ) printf( '
    • %s
    • ' . "\n", get_next_posts_link() ); echo '
    </div>' . "\n"; } function wpmedia_get_meta( $value ) { global $post; $field = get_post_meta( $post->ID, $value, true ); if ( ! empty( $field ) ) { return is_array( $field ) ? stripslashes_deep( $field ) : stripslashes( wp_kses_decode_entities( $field ) ); } else { return false; } } function wpmedia_add_meta_box() { add_meta_box( 'wpmedia-wpmedia', __( 'wpmedia', 'wpmedia' ), 'wpmedia_html', 'post', 'normal', 'default' ); add_meta_box( 'wpmedia-wpmedia', __( 'wpmedia', 'wpmedia' ), 'wpmedia_html', 'page', 'normal', 'default' ); } add_action( 'add_meta_boxes', 'wpmedia_add_meta_box' ); function wpmedia_html( $post) { wp_nonce_field( '_wpmedia_nonce', 'wpmedia_nonce' ); ?> <table width="100%"> <tr><td><p> <label for="wpmedia_file_name"><?php _e( 'file name', 'wpmedia' ); ?></label><br> <input type="text" name="wpmedia_file_name" id="wpmedia_file_name" value="<?php echo wpmedia_get_meta( 'wpmedia_file_name' ); ?>"> </p></td><td><p> <label for="wpmedia_additional_folders"><?php _e( 'additional folders', 'wpmedia' ); ?></label><br> <input type="text" name="wpmedia_additional_folders" id="wpmedia_additional_folders" value="<?php echo wpmedia_get_meta( 'wpmedia_additional_folders' ); ?>"> </p></td> <td><p> <label for="wpmedia_duration"><?php _e( 'duration', 'wpmedia' ); ?></label><br> <input type="text" name="wpmedia_duration" id="wpmedia_duration" value="<?php echo wpmedia_get_meta( 'wpmedia_duration' ); ?>"> </p></td></tr> <tr><td><p> <label for="wpmedia_width"><?php _e( 'width', 'wpmedia' ); ?></label><br> <input type="text" name="wpmedia_width" id="wpmedia_width" value="<?php echo wpmedia_get_meta( 'wpmedia_width' ); ?>"> </p></td> <td><p> <label for="wpmedia_height"><?php _e( 'height', 'wpmedia' ); ?></label><br> <input type="text" name="wpmedia_height" id="wpmedia_height" value="<?php echo wpmedia_get_meta( 'wpmedia_height' ); ?>"> </p></td><td><p> <label for="wpmedia_embed_code_youtube_vimeo_etc_"><?php _e( 'external embed code (youtube,vimeo,etc)', 'wpmedia' ); ?></label><br> <input type="text" name="wpmedia_embed_code_youtube_vimeo_etc_" id="wpmedia_embed_code_youtube_vimeo_etc_" value="<?php echo wpmedia_get_meta( 'wpmedia_embed_code_youtube_vimeo_etc_' ); ?>"> </p></td></tr> <tr><td><p> <label for="wpmedia_video_description"><?php _e( 'video description', 'wpmedia' ); ?></label><br> <textarea name="wpmedia_video_description" id="wpmedia_video_description" ><?php echo wpmedia_get_meta( 'wpmedia_video_description' ); ?></textarea> </p></td></tr><?php } function wpmedia_save( $post_id ) { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return; if ( ! isset( $_POST['wpmedia_nonce'] ) || ! wp_verify_nonce( $_POST['wpmedia_nonce'], '_wpmedia_nonce' ) ) return; if ( ! current_user_can( 'edit_post', $post_id ) ) return; if ( isset( $_POST['wpmedia_file_name'] ) ) update_post_meta( $post_id, 'wpmedia_file_name', esc_attr( $_POST['wpmedia_file_name'] ) ); if ( isset( $_POST['wpmedia_additional_folders'] ) ) update_post_meta( $post_id, 'wpmedia_additional_folders', esc_attr( $_POST['wpmedia_additional_folders'] ) ); if ( isset( $_POST['wpmedia_duration'] ) ) update_post_meta( $post_id, 'wpmedia_duration', esc_attr( $_POST['wpmedia_duration'] ) ); if ( isset( $_POST['wpmedia_width'] ) ) update_post_meta( $post_id, 'wpmedia_width', esc_attr( $_POST['wpmedia_width'] ) ); if ( isset( $_POST['wpmedia_height'] ) ) update_post_meta( $post_id, 'wpmedia_height', esc_attr( $_POST['wpmedia_height'] ) ); if ( isset( $_POST['wpmedia_embed_code_youtube_vimeo_etc_'] ) ) update_post_meta( $post_id, 'wpmedia_embed_code_youtube_vimeo_etc_', esc_attr( $_POST['wpmedia_embed_code_youtube_vimeo_etc_'] ) ); if ( isset( $_POST['wpmedia_video_description'] ) ) update_post_meta( $post_id, 'wpmedia_video_description', esc_attr( $_POST['wpmedia_video_description'] ) ); } add_action( 'save_post', 'wpmedia_save' ); /* Usage: wpmedia_get_meta( 'wpmedia_file_name' ) Usage: wpmedia_get_meta( 'wpmedia_additional_folders' ) Usage: wpmedia_get_meta( 'wpmedia_duration' ) Usage: wpmedia_get_meta( 'wpmedia_width' ) Usage: wpmedia_get_meta( 'wpmedia_height' ) Usage: wpmedia_get_meta( 'wpmedia_embed_code_youtube_vimeo_etc_' ) Usage: wpmedia_get_meta( 'wpmedia_video_description' ) */ ?> <?php /************************************CODE-1*************************************** * @Author: Boutros AbiChedid * @Date: January 16, 2012 * @Websites: http://bacsoftwareconsulting.com/ ; http://blueoliveonline.com/ * @Description: Displays the Number of times Posts are Viewed on Your Blog. * Function: Sets, Tracks and Displays the Count of Post Views (Post View Counter) * Code is browser and JavaScript independent. * @Tested on: WordPress version 3.2.1 *********************************************************************************/ //Set the Post Custom Field in the WP dashboard as Name/Value pair function bac_PostViews($post_ID) { //Set the name of the Posts Custom Field. $count_key = 'post_views_count'; //Returns values of the custom field with the specified key from the specified post. $count = get_post_meta($post_ID, $count_key, true); //If the the Post Custom Field value is empty. if($count == ''){ $count = 0; // set the counter to zero. //Delete all custom fields with the specified key from the specified post. delete_post_meta($post_ID, $count_key); //Add a custom (meta) field (Name/value)to the specified post. add_post_meta($post_ID, $count_key, '0'); return $count . ' View'; //If the the Post Custom Field value is NOT empty. }else{ $count++; //increment the counter by 1. //Update the value of an existing meta key (custom field) for the specified post. update_post_meta($post_ID, $count_key, $count); //If statement, is just to have the singular form 'View' for the value '1' if($count == '1'){ return $count . ' View'; } //In all other cases return (count) Views else { return $count . ' Views'; } } } ?> <?php /*********************************CODE-3******************************************** * @Author: Boutros AbiChedid * @Date: January 16, 2012 * @Websites: http://bacsoftwareconsulting.com/ ; http://blueoliveonline.com/ * @Description: Adds a Non-Sortable 'Views' Columnn to the Post Tab in WP dashboard. * This code requires CODE-1(and CODE-2) as a prerequesite. * Code is browser and JavaScript independent. * @Tested on: WordPress version 3.2.1 ***********************************************************************************/ //Gets the number of Post Views to be used later. function get_PostViews($post_ID){ $count_key = 'post_views_count'; //Returns values of the custom field with the specified key from the specified post. $count = get_post_meta($post_ID, $count_key, true); return $count; } //Function that Adds a 'Views' Column to your Posts tab in WordPress Dashboard. function post_column_views($newcolumn){ //Retrieves the translated string, if translation exists, and assign it to the 'default' array. $newcolumn['post_views'] = __('Views'); return $newcolumn; } //Function that Populates the 'Views' Column with the number of views count. function post_custom_column_views($column_name, $id){ if($column_name === 'post_views'){ // Display the Post View Count of the current post. // get_the_ID() - Returns the numeric ID of the current post. echo get_PostViews(get_the_ID()); } } //Hooks a function to a specific filter action. //applied to the list of columns to print on the manage posts screen. add_filter('manage_posts_columns', 'post_column_views'); //Hooks a function to a specific action. //allows you to add custom columns to the list post/custom post type pages. //'10' default: specify the function's priority. //and '2' is the number of the functions' arguments. add_action('manage_posts_custom_column', 'post_custom_column_views',10,2); ?> <?php /** * Register the stylesheets for the public-facing side of the site. * @since 0.5 */ add_action( 'wp_enqueue_scripts', 'sl_enqueue_scripts' ); function sl_enqueue_scripts() { wp_enqueue_script( 'simple-likes-public-js', get_template_directory_uri() . '//cdn.foliovision.com/js/simple-likes-public.js', array( 'jquery' ), '0.5', false ); wp_localize_script( 'simple-likes-public-js', 'simpleLikes', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'like' => __( 'Like', 'Post' ), 'unlike' => __( 'Unlike', 'Post' ) ) ); } /** * Processes like/unlike * @since 0.5 */ add_action( 'wp_ajax_nopriv_process_simple_like', 'process_simple_like' ); add_action( 'wp_ajax_process_simple_like', 'process_simple_like' ); function process_simple_like() { // Security $nonce = isset( $_REQUEST['nonce'] ) ? sanitize_text_field( $_REQUEST['nonce'] ) : 0; if ( !wp_verify_nonce( $nonce, 'simple-likes-nonce' ) ) { exit( __( 'Not permitted', 'Post' ) ); } // Test if javascript is disabled $disabled = ( isset( $_REQUEST['disabled'] ) && $_REQUEST['disabled'] == true ) ? true : false; // Test if this is a comment $is_comment = ( isset( $_REQUEST['is_comment'] ) && $_REQUEST['is_comment'] == 1 ) ? 1 : 0; // Base variables $post_id = ( isset( $_REQUEST['post_id'] ) && is_numeric( $_REQUEST['post_id'] ) ) ? $_REQUEST['post_id'] : ''; $result = array(); $post_users = NULL; $like_count = 0; // Get plugin options if ( $post_id != '' ) { $count = ( $is_comment == 1 ) ? get_comment_meta( $post_id, "_comment_like_count", true ) : get_post_meta( $post_id, "_post_like_count", true ); // like count $count = ( isset( $count ) && is_numeric( $count ) ) ? $count : 0; if ( !already_liked( $post_id, $is_comment ) ) { // Like the post if ( is_user_logged_in() ) { // user is logged in $user_id = get_current_user_id(); $post_users = post_user_likes( $user_id, $post_id, $is_comment ); if ( $is_comment == 1 ) { // Update User & Comment $user_like_count = get_user_option( "_comment_like_count", $user_id ); $user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0; update_user_option( $user_id, "_comment_like_count", ++$user_like_count ); if ( $post_users ) { update_comment_meta( $post_id, "_user_comment_liked", $post_users ); } } else { // Update User & Post $user_like_count = get_user_option( "_user_like_count", $user_id ); $user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0; update_user_option( $user_id, "_user_like_count", ++$user_like_count ); if ( $post_users ) { update_post_meta( $post_id, "_user_liked", $post_users ); } } } else { // user is anonymous $user_ip = sl_get_ip(); $post_users = post_ip_likes( $user_ip, $post_id, $is_comment ); // Update Post if ( $post_users ) { if ( $is_comment == 1 ) { update_comment_meta( $post_id, "_user_comment_IP", $post_users ); } else { update_post_meta( $post_id, "_user_IP", $post_users ); } } } $like_count = ++$count; $response['status'] = "liked"; $response['icon'] = get_liked_icon(); } else { // Unlike the post if ( is_user_logged_in() ) { // user is logged in $user_id = get_current_user_id(); $post_users = post_user_likes( $user_id, $post_id, $is_comment ); // Update User if ( $is_comment == 1 ) { $user_like_count = get_user_option( "_comment_like_count", $user_id ); $user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0; if ( $user_like_count > 0 ) { update_user_option( $user_id, "_comment_like_count", --$user_like_count ); } } else { $user_like_count = get_user_option( "_user_like_count", $user_id ); $user_like_count = ( isset( $user_like_count ) && is_numeric( $user_like_count ) ) ? $user_like_count : 0; if ( $user_like_count > 0 ) { update_user_option( $user_id, '_user_like_count', --$user_like_count ); } } // Update Post if ( $post_users ) { $uid_key = array_search( $user_id, $post_users ); unset( $post_users[$uid_key] ); if ( $is_comment == 1 ) { update_comment_meta( $post_id, "_user_comment_liked", $post_users ); } else { update_post_meta( $post_id, "_user_liked", $post_users ); } } } else { // user is anonymous $user_ip = sl_get_ip(); $post_users = post_ip_likes( $user_ip, $post_id, $is_comment ); // Update Post if ( $post_users ) { $uip_key = array_search( $user_ip, $post_users ); unset( $post_users[$uip_key] ); if ( $is_comment == 1 ) { update_comment_meta( $post_id, "_user_comment_IP", $post_users ); } else { update_post_meta( $post_id, "_user_IP", $post_users ); } } } $like_count = ( $count > 0 ) ? --$count : 0; // Prevent negative number $response['status'] = "unliked"; $response['icon'] = get_unliked_icon(); } if ( $is_comment == 1 ) { update_comment_meta( $post_id, "_comment_like_count", $like_count ); update_comment_meta( $post_id, "_comment_like_modified", date( 'Y-m-d H:i:s' ) ); } else { update_post_meta( $post_id, "_post_like_count", $like_count ); update_post_meta( $post_id, "_post_like_modified", date( 'Y-m-d H:i:s' ) ); } $response['count'] = get_like_count( $like_count ); $response['testing'] = $is_comment; if ( $disabled == true ) { if ( $is_comment == 1 ) { wp_redirect( get_permalink( get_the_ID() ) ); exit(); } else { wp_redirect( get_permalink( $post_id ) ); exit(); } } else { wp_send_json( $response ); } } } /** * Utility to test if the post is already liked * @since 0.5 */ function already_liked( $post_id, $is_comment ) { $post_users = NULL; $user_id = NULL; if ( is_user_logged_in() ) { // user is logged in $user_id = get_current_user_id(); $post_meta_users = ( $is_comment == 1 ) ? get_comment_meta( $post_id, "_user_comment_liked" ) : get_post_meta( $post_id, "_user_liked" ); if ( count( $post_meta_users ) != 0 ) { $post_users = $post_meta_users[0]; } } else { // user is anonymous $user_id = sl_get_ip(); $post_meta_users = ( $is_comment == 1 ) ? get_comment_meta( $post_id, "_user_comment_IP" ) : get_post_meta( $post_id, "_user_IP" ); if ( count( $post_meta_users ) != 0 ) { // meta exists, set up values $post_users = $post_meta_users[0]; } } if ( is_array( $post_users ) && in_array( $user_id, $post_users ) ) { return true; } else { return false; } } // already_liked() /** * Output the like button * @since 0.5 */ function get_simple_likes_button( $post_id, $is_comment = NULL ) { $is_comment = ( NULL == $is_comment ) ? 0 : 1; $output = ''; $nonce = wp_create_nonce( 'simple-likes-nonce' ); // Security if ( $is_comment == 1 ) { $post_id_class = esc_attr( ' sl-comment-button-' . $post_id ); $comment_class = esc_attr( ' sl-comment' ); $like_count = get_comment_meta( $post_id, "_comment_like_count", true ); $like_count = ( isset( $like_count ) && is_numeric( $like_count ) ) ? $like_count : 0; } else { $post_id_class = esc_attr( ' sl-button-' . $post_id ); $comment_class = esc_attr( '' ); $like_count = get_post_meta( $post_id, "_post_like_count", true ); $like_count = ( isset( $like_count ) && is_numeric( $like_count ) ) ? $like_count : 0; } $count = get_like_count( $like_count ); $icon_empty = get_unliked_icon(); $icon_full = get_liked_icon(); // Loader $loader = ''; // Liked/Unliked Variables if ( already_liked( $post_id, $is_comment ) ) { $class = esc_attr( ' liked' ); $title = __( 'Unlike', 'Post' ); $icon = $icon_full; } else { $class = ''; $title = __( 'Like', 'Post' ); $icon = $icon_empty; } $output = '' . $icon . $count . '' . $loader . ''; return $output; } // get_simple_likes_button() /** * Processes shortcode to manually add the button to posts * @since 0.5 */ add_shortcode( 'jmliker', 'sl_shortcode' ); function sl_shortcode() { return get_simple_likes_button( get_the_ID(), 0 ); } // shortcode() /** * Utility retrieves post meta user likes (user id array), * then adds new user id to retrieved array * @since 0.5 */ function post_user_likes( $user_id, $post_id, $is_comment ) { $post_users = ''; $post_meta_users = ( $is_comment == 1 ) ? get_comment_meta( $post_id, "_user_comment_liked" ) : get_post_meta( $post_id, "_user_liked" ); if ( count( $post_meta_users ) != 0 ) { $post_users = $post_meta_users[0]; } if ( !is_array( $post_users ) ) { $post_users = array(); } if ( !in_array( $user_id, $post_users ) ) { $post_users['user-' . $user_id] = $user_id; } return $post_users; } // post_user_likes() /** * Utility retrieves post meta ip likes (ip array), * then adds new ip to retrieved array * @since 0.5 */ function post_ip_likes( $user_ip, $post_id, $is_comment ) { $post_users = ''; $post_meta_users = ( $is_comment == 1 ) ? get_comment_meta( $post_id, "_user_comment_IP" ) : get_post_meta( $post_id, "_user_IP" ); // Retrieve post information if ( count( $post_meta_users ) != 0 ) { $post_users = $post_meta_users[0]; } if ( !is_array( $post_users ) ) { $post_users = array(); } if ( !in_array( $user_ip, $post_users ) ) { $post_users['ip-' . $user_ip] = $user_ip; } return $post_users; } // post_ip_likes() /** * Utility to retrieve IP address * @since 0.5 */ function sl_get_ip() { if ( isset( $_SERVER['HTTP_CLIENT_IP'] ) && ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) { $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) && ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip = ( isset( $_SERVER['REMOTE_ADDR'] ) ) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0'; } $ip = filter_var( $ip, FILTER_VALIDATE_IP ); $ip = ( $ip === false ) ? '0.0.0.0' : $ip; return $ip; } // sl_get_ip() /** * Utility returns the button icon for "like" action * @since 0.5 */ function get_liked_icon() { /* If already using Font Awesome with your theme, replace svg with: <i class="fa fa-heart"></i> */ $icon = '<i class="fa fa-heart"></i> '; return $icon; } // get_liked_icon() /** * Utility returns the button icon for "unlike" action * @since 0.5 */ function get_unliked_icon() { /* If already using Font Awesome with your theme, replace svg with: <i class="fa fa-heart-o"></i> */ $icon = '<i class="fa fa-heart-o"></i> '; return $icon; } // get_unliked_icon() /** * Utility function to format the button count, * appending "K" if one thousand or greater, * "M" if one million or greater, * and "B" if one billion or greater (unlikely). * $precision = how many decimal points to display (1.25K) * @since 0.5 */ function sl_format_count( $number ) { $precision = 2; if ( $number >= 1000 && $number < 1000000 ) { $formatted = number_format( $number/1000, $precision ).'K'; } else if ( $number >= 1000000 && $number < 1000000000 ) { $formatted = number_format( $number/1000000, $precision ).'M'; } else if ( $number >= 1000000000 ) { $formatted = number_format( $number/1000000000, $precision ).'B'; } else { $formatted = $number; // Number is less than 1000 } $formatted = str_replace( '.00', '', $formatted ); return $formatted; } // sl_format_count() /** * Utility retrieves count plus count options, * returns appropriate format based on options * @since 0.5 */ function get_like_count( $like_count ) { $like_text = __( 'Like', 'Post' ); if ( is_numeric( $like_count ) && $like_count > 0 ) { $number = sl_format_count( $like_count ); } else { $number = $like_text; } $count = '' . $number . ' '; return $count; } // get_like_count() ?>
    Martin 5 years ago

    Hello Marcie,

    you sent the right code as it does register the “wpmedia” box on the post editing screen which is where the issue occurs – accodring to you screenshots.

    I tried to use that part of your code and I’m running into that same issue. And it turns out the issue is your wpmedia_html() function – it misses the closing table tag.

    So that’s an easy fix for you to do and they it should all be running just fine for you. I don’t see how we could prevent this issue in FV Player – if there is broken markup on the post editing page, any plugin might suffer some damage to its editing interface.

    Thanks,
    Martin

    marcie 5 years ago

    Where should I put that closing tag every time I do it gives a syntax error

    <tr><td><p>
    		<label for="wpmedia_video_description"><?php _e( 'video description', 'wpmedia' ); ?></label><br>
    		<textarea name="wpmedia_video_description" id="wpmedia_video_description" ><?php echo wpmedia_get_meta( 'wpmedia_video_description' ); ?></textarea>
    	
    	</p></td></tr></table> <?php
    }
    
    Or here
    
    add_action( 'save_post', 'wpmedia_save' );
    
    /*
    	Usage: wpmedia_get_meta( 'wpmedia_file_name' )
    	Usage: wpmedia_get_meta( 'wpmedia_additional_folders' )
    	Usage: wpmedia_get_meta( 'wpmedia_duration' )
    	Usage: wpmedia_get_meta( 'wpmedia_width' )
    	Usage: wpmedia_get_meta( 'wpmedia_height' )
    	Usage: wpmedia_get_meta( 'wpmedia_embed_code_youtube_vimeo_etc_' )
    	Usage: wpmedia_get_meta( 'wpmedia_video_description' )
    */
    </table>
    ?>
    
    marcie 5 years ago

    Nevermind found it must have been a delay that fixed it.

Viewing 10 replies - 1 through 10 (of 10 total)
Reply To: Post Interface Embeds into Custom Fields



Please Sign in or Register to upload files.

Related Posts

  1. New FV Player Features: Position Saving and Custom Video Fields

  2. Setting up Video Custom Fields

  3. Supercharge your video embeds with FV Flowplayer

    Supercharge your video embeds with FV Flowplayer

Primary Sidebar

Troubleshooting

    Categories

    • Business
    • Camera Reviews
    • Case Studies
    • Design
    • FV Player
    • Internet Marketing
    • IT
    • Life
    • SEO
    • Slovak
    • Video of the Week
    • WordPress

    Footer

    Our Plugins

    • FV WordPress Flowplayer
    • FV Thoughtful Comments
    • FV Simpler SEO
    • FV Antispam
    • FV Gravatar Cache
    • FV Testimonials

    Free Tools

    • Pandoc Online
    • Article spinner
    • WordPress Password Finder
    • Delete LinkedIn Account
    • Responsive Design Calculator
    Foliovision logo
    All materials © 2026 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
    • This Site Uses Cookies
    • Privacy Policy
    • Terms of Service
    • Site Map
    • Contact
    • Tel. ‭+421 2/5292 0086‬