GithubHelp home page GithubHelp logo

Comments (4)

khacoder avatar khacoder commented on July 20, 2024

I have this sniff ready to go and will upload after final testing.

from wpthemereview.

justintadlock avatar justintadlock commented on July 20, 2024

Somewhat related but might need its own ticket is that I sometimes see themes directly outputting the search form content within other templates rather than using get_search_form(). Just wanted to make a quick note.

from wpthemereview.

jrfnl avatar jrfnl commented on July 20, 2024

From: #82 (comment)

I have run the sniff on the some of the theme of the repo and got some false positives

I don't think limiting the sniff to certain files is the way to go per se.
Let's take a step back and try to get a crystal clear definition of what this sniff should do and catch.
Let's write unit tests to match.
And only once that's done, let's look at the actual sniff again.

Let's continue this discussion here.

from wpthemereview.

dingo-d avatar dingo-d commented on July 20, 2024

We agreed in the theme triage that we should check for usage of

require 'searchform.php'; // include and the _once counterparts

and

get_template_part( 'searchform.php')

And if these are found, we should throw a warning that users should use get_search_form() instead.

This falls under use core functionality category.

An ok case can be:

echo do_blocks( '<!-- wp:search {"label":""} /-->' ); 
get_search_form();
get_search_form(
  array(
    'label' => _x( '404 not found', 'Label', 'twentytwenty' ),
  )
);

from wpthemereview.

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.