API / Minn\Admin / IframeMarkup

IframeMarkup final class

Minn\Admin\IframeMarkup · public/minn/src/Minn/Admin/IframeMarkup.php · 41 lines

The fixed markup of the two bare admin documents plugins print into, as iframe_header and wp_iframe print it on the reference (probe admin-doubts): the globals the admin scripts read (ajaxurl, pagenow and the rest), the body's opening with the no-js switch, and the onload call at the end. What hooks print goes between these pieces.

Constants and properties

privateLOAD_EVENT = 'addLoadEvent = function(func){if(typeof jQuery!==\'undefined\')jQuery(function(){func();});else if(typeof wpOnload!==\'function\'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};'

Public

staticheaderScript(string $title, array $page): string#

iframe_header's head after its title: the load-event helper, the thickbox closer and the admin globals.

$pagearray{ajaxurl: string, pagenow: string, typenow: string, adminpage: string, thousands: string, decimal: string, rtl: int}
staticheaderBody(string $idAttribute, string $classes): string#

iframe_header's body opening, the no-js class switched to js.

staticiframeScript(string $title, string $ajaxurl, int $rtl): string#

wp_iframe's head after the document opening: its title, the load-event helper and the media popup's globals.

staticiframeBody(string $idAttribute, string $classes): string#

wp_iframe's body opening, the no-js class switched to js.

staticiframeEnd(): string#

The onload call that closes wp_iframe's document.