function interceptAjaxResize( $iframe_id, $resize_width, $timeout, $resize_on_ajax_jquery, $click_timeout, $resize_on_click_elements, $resize_min_height) { $debug = false; $val = ''; if ($timeout != '' || $click_timeout != '') { $val .= ''; if ($resize_on_ajax_jquery == 'true' || $click_timeout != '') { $val .= ''; } if ($resize_on_ajax_jquery == 'false' && $timeout != '') { $val .= ''; } } return $val; } /** * Replace placeholders in the url and fill them with proper values. */ function ai_replace_placeholders($str_input, $enable_replace) { global $aip_standalone; // wordpress does encode ' by default which does kill urls that contain this char $str_input = str_replace('′', '%27', $str_input); $str_input = str_replace('’', '%27', $str_input); if ($enable_replace) { $str_input = str_replace('{host}', $_SERVER['HTTP_HOST'], $str_input); $str_input = str_replace('{port}', $_SERVER['SERVER_PORT'], $str_input); if (!isset($aip_standalone)) { $str_input = str_replace('{site}', site_url(), $str_input); $current_user = wp_get_current_user(); $str_input = str_replace('{userid}', urlencode($current_user->ID), $str_input); if ( 0 == $current_user->ID ) { $str_input = str_replace('{username}', '', $str_input); $str_input = str_replace('{useremail}', '', $str_input); } else { $str_input = str_replace('{username}', urlencode($current_user->user_login), $str_input); $str_input = str_replace('{useremail}', urlencode($current_user->user_email), $str_input); // dynamic $propertyName = 'id'; print($phpObject->{$propertyName}); if (strpos($str_input,'{userinfo') !== false) { $regex = '/{(userinfo.*?)}/'; $result = preg_match_all( $regex, $str_input, $match); if ($result) { foreach ($match[1] as $hits) { $key = substr($hits, 9); $str_input = str_replace('{'.$hits.'}', urlencode($current_user->$key), $str_input); } } } if (strpos($str_input,'{usermeta') !== false) { $regex = '/{(usermeta.*?)}/'; $result = preg_match_all( $regex, $str_input, $match); if ($result) { foreach ($match[1] as $hits) { $key = substr($hits, 9); $user_last = get_user_meta( $current_user->ID, $key, true ); $str_input = str_replace('{'.$hits.'}', urlencode($user_last), $str_input); } } } } // postmeta! https://codex.wordpress.org/Custom_Fields $admin_email = get_option( 'admin_email' ); $str_input = str_replace('{adminemail}', urlencode($admin_email), $str_input); $uri = $_SERVER['REQUEST_URI']; if (strpos($str_input,'{urlpath') !== false) { // part of the url are extracted {urlpath1} = first path element $path_elements = explode("/", trim($uri, "/")); $count = 1; foreach($path_elements as $path_element){ $str_input = str_replace('{urlpath'.$count.'}', urlencode($path_element), $str_input); $count++; } // part of the url counting from the end {urlpath-1} = last path element reset($path_elements); $rpath_elements = array_reverse($path_elements); $count = 1; foreach($rpath_elements as $path_element){ $str_input = str_replace('{urlpath-'.$count.'}', urlencode($path_element), $str_input); $count++; } } // the full url if (strpos($str_input,'{href}') !== false) { $location = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://"; if ($_SERVER["SERVER_PORT"] != "80" && $_SERVER["SERVER_PORT"] != "443" ) { $location .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"]; } else { $location .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; } $str_input = str_replace('{href}', urlencode($location), $str_input); } if (strpos($str_input,'{query') !== false) { $regex = '/{(query.*?)}/'; $result = preg_match_all( $regex, $str_input, $match); if ($result) { foreach ($match[1] as $hits) { $key = substr($hits, 6); $value = $this->param($key); $str_input = str_replace('{'.$hits.'}', $value , $str_input); } } } // evaluate shortcodes for the parameter $str_input = str_replace('{{', "[", $str_input); $str_input = str_replace('}}', "]", $str_input); $str_input = do_shortcode($str_input); } } return $str_input; } } } if (!isset($aip_standalone)) { // setup new instance of plugin if not standalone if (class_exists("advancediFrame")) { $cons_advancediFrame = new advancediFrame(); } } //Actions and Filters if (isset($cons_advancediFrame)) { //Initialize the admin panel if (!function_exists('advancediFrame_ap')) { function advancediFrame_ap() { global $cons_advancediFrame; if (!isset($cons_advancediFrame)) { return; } $aiOptions = $cons_advancediFrame->getAiAdminOptions(); $pro = (file_exists(dirname(__FILE__) . "/includes/class-cw-envato-api.php")) ? " Pro" : ""; if (function_exists('add_options_page')) { add_options_page('Advanced iFrame' . $pro, 'Advanced iFrame'. $pro, 'manage_options', basename(__FILE__), array($cons_advancediFrame, 'printAdminPage')); } if ($aiOptions['show_menu_link'] == "true") { add_menu_page('Advanced iFrame' . $pro, 'Advanced iFrame'. $pro, 'manage_options', basename(__FILE__), array($cons_advancediFrame, 'printAdminPage')); } if (!empty($aiOptions['alternative_shortcode'])) { // setup shortcode alternative style add_shortcode($aiOptions['alternative_shortcode'], array($cons_advancediFrame, 'do_iframe_script'), 1); } add_action('admin_print_footer_scripts', array($cons_advancediFrame, 'addAiButtonJs'), 199); add_action('media_buttons', array($cons_advancediFrame, 'addAiButton'), 11); } } add_action('admin_menu', 'advancediFrame_ap', 1); //admin page add_action('init', array($cons_advancediFrame, 'loadLanguage'), 1); // add languages add_action('admin_enqueue_scripts', array($cons_advancediFrame, 'addAdminHeaderCode'), 99); // load css add_action('wp_enqueue_scripts', array($cons_advancediFrame, 'addWpHeaderCode'), 98); // load js add_action('wp_footer', array($cons_advancediFrame, 'add_script_footer'), 2); add_shortcode('advanced_iframe', array($cons_advancediFrame, 'do_iframe_script'), 1); // setup shortcode add_shortcode('advanced-iframe', array($cons_advancediFrame, 'do_iframe_script'), 1); // setup shortcode alternative style register_activation_hook(__FILE__, array($cons_advancediFrame, 'activate')); add_filter( 'widget_text', 'shortcode_unautop'); add_filter( 'widget_text', 'do_shortcode'); add_filter('plugin_action_links', array($cons_advancediFrame, 'ai_plugin_action_links'),10,2); } // ============================================== // Setup for widget + remove update functionality // ============================================== function ai_remove_update($value) { if(isset( $value ) && is_object( $value ) && isset($value->response[ plugin_basename(__FILE__) ])) { unset($value->response[ plugin_basename(__FILE__) ]); } return $value; } function advanced_iframe_widget_init(){ register_widget('AdvancedIframe_Widget'); } if (!isset($aip_standalone) && file_exists(dirname(__FILE__) . "/includes/advanced-iframe-widget.php")) { require_once('includes/advanced-iframe-widget.php'); add_action('widgets_init','advanced_iframe_widget_init'); add_filter('site_transient_update_plugins', 'ai_remove_update'); } // ============================================== // Get Plugin Version // ============================================== function advanced_iframe_plugin_version() { if ( ! function_exists( 'get_plugins' ) ) require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); $plugin_folder = get_plugins( '/' . plugin_basename( dirname( __FILE__ ) ) ); $plugin_file = basename( ( __FILE__ ) ); return $plugin_folder[$plugin_file]['Version']; } // ============================================== // Add Links in Plugins Table // ============================================== function advanced_iframe_plugin_meta_free( $links, $file ) { if ( strpos( $file, '/advanced-iframe.php' ) !== false ) { $iconstyle = 'style="-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;"'; $reviewlink = 'https://wordpress.org/support/view/plugin-reviews/advanced-iframe?rate=5#postform'; $links = array_merge( $links, array( 'Advanced iFrame Pro', '' ) ); } return $links; } function advanced_iframe_plugin_meta_pro( $links, $file ) { if ( strpos( $file, '/advanced-iframe.php' ) !== false ) { $iconstyle = 'style="-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;"'; $links = array(); $links = array_merge( $links, array( 'Version ' . advanced_iframe_plugin_version(), 'By Michael Dempfle', 'Code canyon - Advanced iFrame Pro', 'Demos' )); } return $links; } if (!isset($aip_standalone)) { if ( file_exists(dirname(__FILE__) . "/includes/advanced-iframe-widget.php")) { add_filter( 'plugin_row_meta', 'advanced_iframe_plugin_meta_pro', 10, 2 ); } else { add_filter( 'plugin_row_meta', 'advanced_iframe_plugin_meta_free', 10, 2 ); } } ?> Blog – DUOMONT

DUOMONT Blog

The Advantages of Online Lenders

The Advantages of Online Lenders The Pain of Online Lenders If you’re getting tired of not having the capacity to find out the loan you want at the speeds you want to pay, then you may want to consider having a peek at lenders. A great deal of lenders are available to fund certain demands […]

The advantages of Essay Writing Service in Canada What Must be Done About Essay Writing Service in Canada Before You Miss Your Chance In the event that you aren’t delighted with the standard of the informative article, you are going to get your cash back again.best outsourced essaywriter Therefore when it comes to search, the […]

New Detail by detail Roadmap for Where to Buy Cbd Oil There are usually 3 kinds of essential oil. Rick-Simpson oil cannot legally be bought from The Netherlands as stated previously.look at this community As a result, you can end up spending for cannabis essential oil that beneficial. Cannabis crops need shiny and powerful lighting. […]

The Hidden Facts Regarding False Lashes Revealed by a specialist LIST OF POSITIVE ACTIONS to discover more regarding False Lashes Before You’re LEFT OUT Remember false eyelashes are manufactured in a one-size fits all strategy, which usually means you might probably want to lessen the length to accommodate your lifestyle.2 sets of eyelashes Once applied, […]

Who Is Misleading Us About Cbd Oil Reviews Uk?

Who Is Misleading Us About Cbd Oil Reviews Uk? Our starter kits are a fantastic way to start your CBD vaping journey, coming with a vape pen and everything you must start. Whether you’re a beginner trying to find a starter kit or an expert searching for a new vape pen, you’ll locate something with […]

Incredible Facts About Cbd Oil Reviews Revealed by the Pros

Incredible Facts About Cbd Oil Reviews Revealed by the Pros The oil even produces a great salad dressing. There’s not simply a single type of cannabis oil. Also, it’s helpful to examine how you would like to take your oil. Still it’s vital important to realize that the oil isn’t absolutely free from THC. There […]

All About Where you can Buy Cbd Essential oil With no regulations about this supply of CBD hemp-based merchandise, you can not be sure what it is you’re purchasing.content original source site try this site click academic service You can find a broad collection of CBD services and products there. An individual may consult with […]

The Dirty Truth on Where to Buy Cbd Essential oil Where you can Buy Cbd Oil – the Story You will see a huge selection of CBD Oil brand names available and also that which could do the job for a single person, might not do exactly the job for a different.view publisher site premiumjane […]

The Forbidden Truth Regarding Provacan Cbd Oil Exposed by an Expert

The Forbidden Truth Regarding Provacan Cbd Oil Exposed by an Expert Hemp extract was shown to aid with a broad array of ailments. Hemp extract was demonstrated to aid with a broad array of dermatalogical, neurological, and physical health conditions. Hemp extract was shown to assist a wide variety of health conditions including dermatalogical, neurological, […]