rtCamp notes, day 56 of undefined
Blocks edit and save properties When registering our block in the entry file [ index.js ], we pass the edit and save functions to the second parameter [in JS ]. Now these specify the functions to be called at the…
Blocks edit and save properties When registering our block in the entry file [ index.js ], we pass the edit and save functions to the second parameter [in JS ]. Now these specify the functions to be called at the…
Why is JSX used? JSX is Javascript -> with some added functionalities or benefits. In JSX we can add HTML or XML code which can be used to render elements. It’s great in terms of security wise because the react…
WP Templates WordPress provides us with WP Templates to create underscore js styled function, which can be used to generate parameterized HTML -> we can add data to the HTML dynamically and assign it to items. Now we could have…
Singleton Pattern The singleton pattern is not a WordPress feature, but a normal feature which most of the programming languages support [ idk if we call it a feature or something ].What it exactly does?As the name suggests -> Singleton…
Asset Building Webpack Webpack is a javascript module bundler, the main purpose or feature of the weback is javascript bundler, but it can also help us generate modules for other scripts such as css, html etc front end assets. It…
Theme Security NEVER TRUST USER INPUT There are two main keywords you must keep in mind when considering security for input. VALIDATION Validation refers to the checking of data, if it meets certain datatype or certain data formats, for example,…
Customizer Components Panels In customizer panel is the front section that you get panel -> this would contain the section and controls internally to allow you to interact with the settings. Create a new panel We can use the function…
Pagination WordPress by default provides us with the pagination functions and handles the pagination automatically internally. In our theme template files we can use the function like, next_posts_link and previous_posts_link to get the links of next and previous posts.In both…
Theme Functionality WordPress provides us the ability to fully customize the viewing experience for the theme, most of the features can be customized using the function add_theme_support() Let’s look at some of the customizations. Custom Headers Custom headers can be…
WP CLI Default Commands We can use command wp help to display the list of all the available commands in our wp-cli and a short description about them. The wp help command can also be used to check the help…
WP CLI Creating Custom Commands WP CLI gives us ways to add custom commands to its interface. WP CLI has the function WP_CLI::add_command() where the first parameter is the command name and the second parameter is a callable, a function,…
Custom Endpoints To add endpoints to our API we must first have a route to which we will be adding the endpoints, basically routes are the URLs and endpoints are the methods and the function it will perform on particular…