Giter VIP home page Giter VIP logo

atp's People

Contributors

gmazzap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

atp's Issues

Post Content/Excerpt not showing unless setup_postdata() is called manually

I stumbled on your ATP plugin yesterday evening and gave it a try. Whenever I tried to render any form of post content (namely excerpt and, well, post content), it came back blank. The reason for that is that get_the_content() needs global $pages, which is set by setup_postdata(). ATP does handle that, of course, I found it here:
https://github.com/Giuseppe-Mazzapica/ATP/blob/ebb4808429da97028aa24db93597ec7d4dfb7d9f/src/Loader.php#L106-L107

But in my case, it never actually goes into that if clause. Does that ring a bell for you? Right now, I have to setup_postdata()myself right in the template part to make it work

Question: Is it possible to programatically invalidate the cache for a specific template

Hi Giuseppe,

Again, thanks so much for making this. It's really, really excellent.

As the title says, I was wondering if I'm able to invalidate the cache manually when a certain thing happens. i.e. Ii'd love to be able to invalidate the cache during a manual AJAX call so that on next page reload, the template part that is affected loads from fresh, rather than the cache.

Any thoughts, here?

Undefined callback function when user not logged in

Hi,
when a user is not logged in I get the following error message and the templates are not being loaded:

PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, function ' GM\ATP\ajax_callback' not found or invalid function name in /.../wp-includes/class-wp-hook.php on line 298

Any idea why this might be happening and what a possible solution would look like?

templates in subdirectories not loaded via ATP, forward slashes stripped in request

Hi Giuseppe,

Firstly, thanks so much for this, it is awesome.

I've come across a slight issue with regards to loading template files that are in sub directories. get_template_part() allows you to pass a path as the first argument. i.e.

get_template_part( 'templates/tha_entry_top/entry', 'test' );

would load a file called entry-test.php in my theme's templates/tha_entry_top/ directory.

However, it appears that THA strips the forward slashes. I tried both

ajax_template_part( 'templates/tha_entry_top/entry', 'test' );

and

ajax_template_part( 'templates\/tha_entry_top\/entry', 'test' );

to see if I could manually unescape them, but both produced the following POST request form data;

action:ajaxtemplatepart
files_data[ajaxtemplate-templatestha_entry_topentry-test-1][]:templatestha_entry_topentry
files_data[ajaxtemplate-templatestha_entry_topentry-test-1][]:test
posts_data[ajaxtemplate-templatestha_entry_topentry-test-1]:1

Which, naturally, leads to the template not loading.

I'm a bit of a sucker for having a clean theme root directory, so I'd absolutely love ATP to allow templates to be loaded from sub directories. Again, thanks so much for writing this. It. Is. Awesome.

Error on activation

Hi
Thank for this plugin but I have got this error while activating

The plugin generated 2139 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

Any idea?

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.