Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author finnj

    (@finnj)

    I will have a look at it.

    Would make sense only to enque media scipts on Frontier Post add/edit page.

    Plugin Author finnj

    (@finnj)

    Hi,

    If you are using WordPress version > 4.3, it should be possible to not to preload the wp_media scripts, and thereby reduce the load of scripts.

    You can test it this way:
    1: open frontier-post.php
    2: Navigate to line 414
    3: Comment out wp_enqueue_media(); by adding // in front – ex: //wp_enqueue_media();
    4: Save the file.

    I am a bit cautious to implement this without a lot of testing.

    The alternative is a conditional load of the media script, but this involves checking for the shortcode on each page load, and that is not good for performance either.

    Plugin Author finnj

    (@finnj)

    Hi,

    I changed the code so media scripts only will be loaded on frontier post pages.

    You can download version 4.0.6 from the developer tab (or here)

    It needs some more testing before I can make it a stable version.

    Please test and let me know, if it solves your issue

    Thanks

    Thread Starter Ed G

    (@ed-g)

    Beautiful! That was exactly what I wanted and it seems to work perfectly. Thank you very much.

    Ed

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Size of code added to pages’ is closed to new replies.