$style) { $alt_styles ['css' . ($index + 1)] = str_replace ("'", '"', str_replace (array ("\"", "<", ">", "[", "]"), "", trim ($style))); } echo "data-alt-style='1' data-alt-styles='", json_encode ($alt_styles), "'"; } } function padding_margin_code ($close_button, $class, $sticky_parameters, $wrapper_css, $block_code) { ?>
style=''>
wp_options = $block_object [$block]->wp_options; $block_name = isset ($preview_parameters ['name']) ? $preview_parameters ['name'] : $obj->get_ad_name(); $code = isset ($preview_parameters ['code']) ? $preview_parameters ['code'] : $obj->get_ad_data(); $alignment_type = isset ($preview_parameters ['alignment']) ? $preview_parameters ['alignment'] : $obj->get_alignment_type(); $horizontal_position = isset ($preview_parameters ['horizontal']) ? $preview_parameters ['horizontal'] : $obj->get_horizontal_position(); $vertical_position = isset ($preview_parameters ['vertical']) ? $preview_parameters ['vertical'] : $obj->get_vertical_position(); $horizontal_margin = isset ($preview_parameters ['horizontal_margin']) ? $preview_parameters ['horizontal_margin'] : $obj->get_horizontal_margin(); $vertical_margin = isset ($preview_parameters ['vertical_margin']) ? $preview_parameters ['vertical_margin'] : $obj->get_vertical_margin(); $animation = isset ($preview_parameters ['animation']) ? $preview_parameters ['animation'] : $obj->get_animation(); $wrapper_css = isset ($preview_parameters ['alignment_css']) ? $preview_parameters ['alignment_css'] : $obj->get_alignment_style (); $custom_css_code = isset ($preview_parameters ['custom_css']) ? $preview_parameters ['custom_css'] : $obj->get_custom_css(); $close_button = isset ($preview_parameters ['close']) ? $preview_parameters ['close'] : $obj->get_close_button (); $process_php = isset ($preview_parameters ['php']) ? $preview_parameters ['php'] : $obj->get_process_php (); $show_label = isset ($preview_parameters ['label']) ? $preview_parameters ['label'] : $obj->get_show_label (); $read_only = isset ($preview_parameters ['read_only']) ? $preview_parameters ['read_only'] : false; $obj->wp_options [AI_OPTION_BLOCK_NAME] = $block_name; $obj->wp_options [AI_OPTION_CODE] = $code; $obj->wp_options [AI_OPTION_ALIGNMENT_TYPE] = $alignment_type; $obj->wp_options [AI_OPTION_HORIZONTAL_POSITION] = $horizontal_position; $obj->wp_options [AI_OPTION_VERTICAL_POSITION] = $vertical_position; $obj->wp_options [AI_OPTION_HORIZONTAL_MARGIN] = $horizontal_margin; $obj->wp_options [AI_OPTION_VERTICAL_MARGIN] = $vertical_margin; $obj->wp_options [AI_OPTION_ANIMATION] = $animation; $obj->wp_options [AI_OPTION_CLOSE_BUTTON] = $close_button; $obj->wp_options [AI_OPTION_PROCESS_PHP] = $process_php; $obj->wp_options [AI_OPTION_SHOW_LABEL] = $show_label; $adsense = $block == 0; $sticky = false; $class = ''; $sticky_parameters = ''; $functions = function_exists ('ai_extract_features_2'); if (!$adsense) { switch ($alignment_type) { case AI_ALIGNMENT_STICKY: $sticky = true; break; case AI_ALIGNMENT_CUSTOM_CSS: $custom_css = str_replace (' ', '', $custom_css_code); if (strpos ($custom_css, 'position:fixed') !== false && strpos ($custom_css, 'z-index:') !== false) $sticky = true; break; } $classes = array (); $sticky_parameters = $obj->sticky_parameters ($classes, true); // For non-sticky preview show close button only if enabled in block settings if ($sticky || $close_button != AI_CLOSE_NONE) { $classes [] = 'ai-close'; } if ($sticky) { $classes [] = 'hide'; } if (count ($classes) != 0) { $class = " class='" . trim (implode (' ', $classes)) . "'"; } } // Head code must be called before ai_getProcessedCode (to process head PHP) ob_start (); ai_wp_head_hook (); if ($functions && !$ai_wp_data [AI_CLOSE_BUTTONS]) { echo "\n"; } $head_code = ob_get_clean (); // Disable AdSense Auto ads (page level ads) $head_code = str_replace ('enable_page_level_ads', 'disabled_page_level_ads', $head_code); $block_code = $obj->ai_getProcessedCode (true, true, true); // Fix for relative urls $block_code = str_replace ('src="wp-content', 'src="../wp-content', $block_code); $block_code = str_replace ("src='wp-content", "src='../wp-content", $block_code); $block_code = str_replace ('href="wp-content', 'href="../wp-content', $block_code); $block_code = str_replace ("href='wp-content", "href='../wp-content", $block_code); ?> <?php echo AD_INSERTER_NAME; ?> <?php if ($sticky) echo 'Sticky '; ?>Code Preview ?ver='> ?ver='> ?ver='> ?ver='>
0; $viewport --) { $viewport_name = get_viewport_name ($viewport); $viewport_width = get_viewport_width ($viewport); if ($viewport_name != '' && $viewport_width != 0) { echo ""; } $previous_name = $viewport_name; $previous_width = $viewport_width; } echo ""; ?>
", $previous_name, "", $previous_width != 0 ? $previous_width . "px" : "", "", get_viewport_name (1), "", $previous_width != 0 ? $previous_width . "px" : "", "
820 px
This page was not loaded properly. Please check browser, plugins and ad blockers.

PAGE BLOCKED

Preview

Block

AdSense ad unit

This is a preview of the code between dummy paragraphs. Here you can test various block alignments, visually edit margin and padding values of the wrapping div or write CSS code directly and watch live preview. Highlight button highlights background, wrapping div margin and code area, while Reset button restores all the values to those of the current block.

This is a preview of the saved code block between dummy paragraphs. It shows the code with the alignment and style as it is set for this code block. Highlight button highlights background, wrapping div margin and code area.

This is a preview of AdSense ad block between dummy paragraphs. AdSense ad code was loaded from your AdSense account. The ad block is displayed on a dummy page so it may be blank (no ads). Click on the Highlight button to highlight ad block.

You can resize the window (and refresh the page to reload ads) to check display with different screen widths. Once you are satisfied with alignment click on the Use button and the settings will be copied to the active block.

Please note that the code, block name, alignment and style are taken from the current block settings (may not be saved). No Wrapping style inserts the code as it is so margin and padding can't be set. However, you can use own HTML code for the block.

Ad Inserter can be configured to insert any code anywhere on the page. Each code with it's settings is called a code block. Free Ad Inserter supports 16 code blocks, Ad Inserter Pro supports up to 96 code blocks (depending on the license type). The settings page is divided into tabs - 16 code blocks and general plugin settings. Black number means inactive code block (code is not inserted anywhere), red number means block is using automatic insertion, blue number means block is using manual insertion while violet number means block is using automatic and manual insertion.

Few very important things you need to know in order to insert code and display some ad: Enable and use at least one display option (Automatic Display, Widget, Shortcode, PHP function call). Enable display on at least one Wordpress page type (Posts, Static pages, Homepage, Category pages, Search Pages, Archive pages). Single pages (posts and static pages) have also additional setting for individual exceptions. Use default blank value unless you are using individual post/page exceptions.

This is a preview of the code for sticky ads. Here you can test various horizontal and vertical alignments, close button locations, visually edit margin values or write CSS code directly and watch live preview. Highlight button highlights background, margin and code area, while Reset button restores all the values to those of the current block.

Ad Inserter can be configured to insert any code anywhere on the page. Each code with it's settings is called a code block. Free Ad Inserter supports 16 code blocks, Ad Inserter Pro supports up to 96 code blocks (depending on the license type). The settings page is divided into tabs - 16 code blocks and general plugin settings. Black number means inactive code block (code is not inserted anywhere), red number means block is using automatic insertion, blue number means block is using manual insertion while violet number means block is using automatic and manual insertion.

Few very important things you need to know in order to insert code and display some ad: Enable and use at least one display option (Automatic Display, Widget, Shortcode, PHP function call). Enable display on at least one Wordpress page type (Posts, Static pages, Homepage, Category pages, Search Pages, Archive pages). Single pages (posts and static pages) have also additional setting for individual exceptions. Use default blank value unless you are using individual post/page exceptions.

Ad Inserter can be configured to insert any code anywhere on the page. Each code with it's settings is called a code block. Free Ad Inserter supports 16 code blocks, Ad Inserter Pro supports up to 96 code blocks (depending on the license type). The settings page is divided into tabs - 16 code blocks and general plugin settings. Black number means inactive code block (code is not inserted anywhere), red number means block is using automatic insertion, blue number means block is using manual insertion while violet number means block is using automatic and manual insertion.

Few very important things you need to know in order to insert code and display some ad: Enable and use at least one display option (Automatic Display, Widget, Shortcode, PHP function call). Enable display on at least one Wordpress page type (Posts, Static pages, Homepage, Category pages, Search Pages, Archive pages). Single pages (posts and static pages) have also additional setting for individual exceptions. Use default blank value unless you are using individual post/page exceptions.

Ad Inserter can be configured to insert any code anywhere on the page. Each code with it's settings is called a code block. Free Ad Inserter supports 16 code blocks, Ad Inserter Pro supports up to 96 code blocks (depending on the license type). The settings page is divided into tabs - 16 code blocks and general plugin settings. Black number means inactive code block (code is not inserted anywhere), red number means block is using automatic insertion, blue number means block is using manual insertion while violet number means block is using automatic and manual insertion.

Few very important things you need to know in order to insert code and display some ad: Enable and use at least one display option (Automatic Display, Widget, Shortcode, PHP function call). Enable display on at least one Wordpress page type (Posts, Static pages, Homepage, Category pages, Search Pages, Archive pages). Single pages (posts and static pages) have also additional setting for individual exceptions. Use default blank value unless you are using individual post/page exceptions.

Ad Inserter can be configured to insert any code anywhere on the page. Each code with it's settings is called a code block. Free Ad Inserter supports 16 code blocks, Ad Inserter Pro supports up to 96 code blocks (depending on the license type). The settings page is divided into tabs - 16 code blocks and general plugin settings. Black number means inactive code block (code is not inserted anywhere), red number means block is using automatic insertion, blue number means block is using manual insertion while violet number means block is using automatic and manual insertion.

Few very important things you need to know in order to insert code and display some ad: Enable and use at least one display option (Automatic Display, Widget, Shortcode, PHP function call). Enable display on at least one Wordpress page type (Posts, Static pages, Homepage, Category pages, Search Pages, Archive pages). Single pages (posts and static pages) have also additional setting for individual exceptions. Use default blank value unless you are using individual post/page exceptions.