plugin

In part 3 we discussed the general best practice of separating your plugin out into multiple files. Today we're going to look at how you actually do that and also go into more depth about why this is a good practice that you should be adopting for all of your plugins once they begin to become even remotely complex.

You must be logged in and have an active premium membership to view the rest of this content. Register or login from the sidebar.

Join now to gain access to this tutorial and more.

Join Now
  1. Andrew Crystal

    Hi Pippin,

    I’ve been following along with this series but can’t get this video or the next one to play, all the others in the series seem to work fine?

    Thanks

    Andrew

    • Pippin

      My embedded video player has been having trouble. I’ve been working on getting the videos all moved over to Vimeo. This one should be moved by Monday.

    • Andrew Crystal

      Thanks Pippins that’s great :-)

    • Pippin

      The video has been moved to Vimeo and should be live withing 15 minutes.

    • Andrew Crystal

      Thanks Pippin, any chance of doing the next video too at some point as that seems the same :-)

    • Pippin

      Working on it now!

    • Andrew Crystal

      Thanks Pippin ;-)

    • Andrew Crystal

      :-)

    • Pippin

      Finished!

  2. Andrew Rickards

    Hi Pippin,
    Really enjoying this series. Quick question. How far do you take the conditional loading of scripts/styles concept? For example, if you have a plugin with a dozen or so shortcodes and you don’t know where they will be used, should you do check for each one and only load the scripts if it is used?
    Also, in this case, should you separate your Javascript and CSS for each shortcode into multiple files and load them conditionally? Or is that overkill?

  3. Dan Jørgensen

    Dear Pippin,
    The video quality is too bad to see the codes it can be hard to see if you use “[]” or “()” and when wordpress codex is rather difficult for a beginner to read it makes it very hard . wordpress codex changed since you made your videos. so it is quite impossible to find the same as you, shown in your videos. This together makes it extremely difficult to get the most out of your videos

    • Dan Jørgensen

      sorry I found the problem, it’s not your problem

    • Pippin

      Glad to hear you can see it better now!