Hetz: I am, for the first time, realizing I should be enqueuing my scripts.
Hetz: So I have wp_enqueue_script’jquery’; in a function and it appears just fine in the wp_head;
Hetz: That link states that jQuery-UI has a dependency of jQuery which makes sense.
Hetz: So here’s what I am working on.
Hetz: Wp_enqueue_script’jquery-ui-core’, ”, array’jquery’ ;
Hetz: The problem is that second argument which is for Source, but is also “optional”.
Hetz: Since jQuery-ui is “included in the box”, I shouldn’t have to include the source, afterall I didn’t with jquery.
Hetz: But my PHP Foo is weak, and I don’t know how to skip that second argument while including the dependecy arguement.
Hetz: It doesn’t like being blank, and it doesn’t like being left out if there’s a third.
Hetz: But it’s “optional”. :/
Hetz: I _thought_ that the ” was the proper way to include, but skip, and argument that’s a string
Hetz: But if I leave it out I get an error, and if I have it in. it does Kahahane.
Savaria: Jquery comes with wordpress, you should not be adding it again.
Hetz: Well, yes. But I SHOULD be enqueuing it.
Hetz: I am not registering it.
Hetz: But after I enqueue jQuery, I’m not able to also enqueue jQuery-ui-core :/
Bogart: I think opsec is saying you shouldn’t be enqueing it because it is included in wp-includes
Hetz: Hmmm. not saying I’m right; but everything I’ve read says that I NEED to enqueue it, or how else is my theme supposed to know I want to use it?
Hetz: This shows a TON of scripts that are “included in the box” but not all of them are initialized.
Hetz: This is all so I can then begin calling some scripts I DO want to register, custom ones, but I need to get jQuery, Ui, and ui-effects running first.
Hetz: IF I understand correctly.
Lauderman: My understanding is that you enqueue the .js files that which are in your theme. these files can be written in jquery
Hetz: I mean, before tonight, I just hard-coded that **** right into the head but found out that’s bad-joojoo
Schroyer: Hetz: Please help us keep Orchard a family friendly room, and avoid using foul language.
Vincent: And because jquery is loaded with wordpress, you don’t have to enqueue jquery itself
Hetz: You MIGHT be right, but while it’s packaged, everything I’ve read says it’s not initialized by default. :/
Hetz: Anywho I can enqueue IT just fine, and it shows up in the source under head where the wp_head; would be.
Hetz: But jQuery-ui-core. not so much.
Hetz: Essentially this should just work.
Hetz: And without the UI line it does. WITH the UI line jquery shows up encapsulated in script/script properly in the head
Purvines: What are you trying to do with jQuery-ui-core
Hetz: Firstly, enqueue it. So I can then register other scripts that are dependant on it.
Hetz: Only I am taking this one step at a time.
Hetz: So without even DOING anything with it, that code SHOULD make it show up in the head
Wrinkle: Have you tried using jquery without enqueuing jquery
Hetz: Indeed. A new theme, without hardcoding a path in the head, or properly enqueuing it, doesn’t know to use it.
Hetz: As I said, before tonight I’ve always just hard-coded them. But I found out that’s not “best practices”.
Hetz: So I am trying to do things the “right” way, but hitting a wall as to why this won’t work.
Steinhour: Have you seen any other themes explicitly do what you’re trying to do
Huy: Hi everyone. Question. How can I create a many to many relationship between users? I know it can’t be done by default. So the question is. what do I need to extend or hack? I’m open to any article or plugin with a similar aproach. in order to test some posibilities