GithubHelp home page GithubHelp logo

Comments (4)

bradvin avatar bradvin commented on August 23, 2024

you need to hook into the following filter:

add_filter( 'foogallery_gallery_template_field_lightboxes', array($this, 'add_lightbox') );

and then add your lightbox:

function add_lightbox($lightboxes) { $lightboxes['foobox-free'] = __( 'FooBox Free', 'foobox-image-lightbox' ); return $lightboxes; }

from foogallery.

PedroMSimoes avatar PedroMSimoes commented on August 23, 2024

Thanks for the quick answer,

Ye i already have that.

function __construct() {
                add_filter( 'foogallery_gallery_template_field_lightboxes', array($this, 'add_lightbox') );
        }

        function add_lightbox($lightboxes) {
            $lightboxes['my_extension_directory'] = __( 'Name', 'my-extension-directory/file' );
            return $lightboxes;
        }

Is that what is needed? I replaced the "strings" needed in the function add_lightbox to what i thinks its needed to write. Can you confirm?

from foogallery.

bradvin avatar bradvin commented on August 23, 2024

I am not sure 'my_extension_directory' is correct. Surely it should be the name of your lightbox? So, 'prettyphoto' for example? It is the key that will be used in the classname that is generated to the front end. When the gallery is output to the front-end, the container will include a new class 'foogallery-lightbox-{key}'. E.g 'foogallery-lightbox-prettyphoto'.

And the localization domain string should be your plugin slug. So not 'my-extension-directory/file' but rather 'my-extension-slug'

Other than those changes, that is all you really need.

from foogallery.

PedroMSimoes avatar PedroMSimoes commented on August 23, 2024

Ok thks for the help. I will try fix it, i think that i alredy got the solution. So thanks for the help

from foogallery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.