Server IP : 192.64.118.117 / Your IP : 18.224.21.26 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/thecgapy/www/wp-content/plugins/beaver-builder-lite-version/includes/ |
Upload File : |
<?php /** * Misc functions for compatibility with other plugins. */ /** * Support for Option Tree. * * Older versions of Option Tree don't declare the ot_get_media_post_ID * function on the frontend which is needed for the media uploader and * throws an error if it doesn't exist. */ function fl_builder_option_tree_support() { if ( !function_exists( 'ot_get_media_post_ID' ) ) { function ot_get_media_post_ID() { // Option ID $option_id = 'ot_media_post_ID'; // Get the media post ID $post_ID = get_option( $option_id, false ); // Add $post_ID to the DB if ( $post_ID === false ) { global $wpdb; // Get the media post ID $post_ID = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE `post_title` = 'Media' AND `post_type` = 'option-tree' AND `post_status` = 'private'" ); // Add to the DB add_option( $option_id, $post_ID ); } return $post_ID; } } } add_action('after_setup_theme', 'fl_builder_option_tree_support');