Giter Club home page Giter Club logo

framework's Introduction

Laravel Logo

Build Status Total Downloads Latest Stable Version License

About WpStarter

WpStarter is a Laravel port framework for WordPress with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. WpStarter bring all Laravel features to WordPress, such as:

WpStarter is accessible, powerful, and provides tools required for large, robust applications.

Getting Started

Check WpStarter documentation

framework's People

Contributors

as247 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mobber007

framework's Issues

Example with Livewire

It would be great if you could provide an example of using Livewire. I have done some research, but I couldn't find a clear way to use it.

Thank you in advance.

Not possible to register more than one shortcode

It seems that registering more than one shortcode is not possible, or at least it is not working for me.

Let's consider a scenario where we declare two shortcodes in the routes/wp.php file. For simplicity, we intentionally bind both shortcodes to the same controller.

Route::get('welcome-shortcode', [\App\Http\Controllers\WelcomeController::class, 'shortcode']);
Route::get('foo-shortcode', [\App\Http\Controllers\WelcomeController::class, 'shortcode']);

Now, on any WordPress page, let's declare two shortcodes as follows: [welcome-shortcode] and [foo-shortcode]. Only the first shortcode is interpreted by me. The other stay as not "interpreted" (e.g. [foo-shortcode]) We can experiment by swapping the routes in routes/wp.php, and we'll observe the shortcodes interpretation.

Am I missing a point?

Thanks BTW by your great work!

Problem with blade @auth and @guest

Description: Great idea for this project!

I've been playing around with it and just found out that the @auth and the @guest directives do not work, just like the auth and the guest middleware. Also using the Livewire integration provided by you.

Transmit multiple parameters in shortcodes

Suppose we have a shortcode with two parameters, "foo" and "title". Currently, we can retrieve their values by adding arguments to the shortcode method. However, this approach has limitations. The parameters must be provided in the exact order, which can be inconvenient. Additionally, if we have a large number of parameters, it becomes cumbersome to write them all.

How can we improve? An associative array or an object to pass the shortcode parameters. This allows us to specify the parameter names along with their values, making it more flexible and easier to manage? I'm sure Laravel / you have some nice idea.

[welcome-shortcode foo="bar" title="world"]

    // actually the name of the parameter does matter as they are filled by order.
    public function shortcode($foo = '', $title = '') 
    {
        return shortcode_view('welcome.shortcode', [], [])->add('section1', function () {
            return 'welcome to section 1';
        });
    }

Using the latest version of wpstarter: v1.4.15

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.