1. Nebula Nebula
  2. /
  3. PHP
  4.  (Page 3)

is_do_not_track()

This looks for the HTTP header "HTTP_DNT" which may not be present in Microsoft Edge even when DNT is enabled. This feature, while technically supported in all browsers, is not consistently implemented across them yet. Remember: A return of "false" means the browser is allowing tracking. A return of "true" means the user has requested Read More »

limit_image_size()

Original size of this test image is 7360x4545. This image is loaded via the WYSIWYG editor from the media library. When this will not control output image sizes: This function listens for sizes to be used and limits them. Therefore there are plenty of situations where this will not limit output image sizes. If the Read More »

lazy_iframe()

This is a convenient alias of lazy_load(). Note: this function does not need to use echo as it prints immediately. This uses JavaScript to load iframes after the page has finished loading. Any iframes above the fold will be loaded immediately and any below the fold will wait for the user to scroll. These iframes Read More »

lazy_load()

If you are simply trying to lazy load a single tag, consider using the native browser lazy load with the following attribute: Note: this function does not need to use echo as it prints immediately. This uses JavaScript to load HTML after the page has finished loading. Any element above the fold will be loaded Read More »

timer()

Timings are stored in and categories are separated into a array. Timings will automatically appear for developers, but the query string must be used for non-developers (or logged-out users). Server Timing API Timings are sent via the HTTP header and can be viewed in Chrome DevTools under Network by clicking the page resource and choosing Read More »

finalize_timings()

By calling this function you may prematurely end full execution timings and decrease accuracy. It's best to let Nebula call this when it is ready. Read More »

move_jquery_to_footer()

This function wouldn't be called directly, but becomes important when squeezing every millisecond out of performance. The Nebula Option for jQuery allows for it to be moved to the footer. Doing so will cause an error for any embedded tags in page templates that are placed before the footer. When this happens, Nebula will output Read More »