What it means is that there is no galleria function for the elements that have the class gallery.
Have a read through this http://galleria.io/docs/getting_started/beginners_guide/ and check the docs to see how to do what you want to do properly.
Maybe something like this
Galleria.loadTheme('galleria/themes/classic/galleria.classic.min.js');
Galleria.run('.gallery');
instead of
jQuery('.gallery').galleria({
extend: function(options) {
var gallery = this;
}
});
You are using wordpress though so if this is a plugin I'm not sure you should be messing with its code. You have probably done something wrong with your shortcodes or something.
EDIT:
On a quick skim of the docs http://galleria.io/docs/references/extending/#using-the-extend-option it seems like what you want is this:
Galleria.run('.gallery', {
extend: function(options) {
var gallery = this;
}
});