WP Rest API convert permalink to post ID for fetch

The core rewrite API does offer the function url_to_postid() (as mentioned by @stephen-sabatini) which can find a post ID from a URL. However it seems less than ideal to have to make a request up front just to determine the post ID…… Source: https://wordpress.stackexchange.com/questions/282716/wp-rest-api-convert-permalink-to-post-id-for-fetch

What is the difference between public, private, and protected?

When and why should I use public, private, and protected functions and variables inside a class? What is the difference between them? Outsider members cannot access those variables. “Outsiders” in the sense that they are not object instances of the declared class itself…. Source: http://stackoverflow.com/questions/4361553/what-is-the-difference-between-public-private-and-protected

Visibility

The visibility of a property, a method or (as of PHP 7.1.0) a constant can be defined by prefixing the declaration with the keywords public, protected or private. Class members declared public can be accessed everywhere…. Source: http://php.net/manual/en/language.oop5.visibility.php

Prop Drilling

NOTE: This is a cross-post from my newsletter. I publish each email two weeks after it’s sent. Subscribe to get more content like this earlier right in your inbox! ?… Source: https://blog.kentcdodds.com/prop-drilling-bb62e02cb691

Testing React Apps with Cypress

When I was a junior dev I used to cringe at the thought of testing my apps. Testing is not easy. But with the help of right tools, writing tests can certainly be simpler and more fun…. Source: https://blog.bitsrc.io/testing-react-apps-with-cypress-658bc482678