As in many things wordpress, inertia has a lot to do with why things are done in specific way. Early core themes were written using those constructs and later developers copied them because they either did not know better or thought there was some non obvious reason to prefer them.
As @Howdy_McGee said, it is just a style preference but I would avoid the endif
, endwhile
as curly braces are standard block delimiters across many languages and therefor are in general easier to read even if we will ignore the benefit of syntax highlighting and block collapsing in general editors.
Related Posts:
- How to add product in woocommerce with php code [closed]
- What’s the best way to use the Featured Image for responsive web design?
- Hide php Notices in Dashboard
- How to correctly submit a search form and display the result in an independent page
- Show the most popular post per week
- Add a class to links in the visual editor (how to get old dialog back)
- Creating custom Woocommerce attribute taxonomies from a plugin
- What is the most efficient way to search users by their display name?
- Passing JSON data from WP Query into AJAX causing NULL errors
- Display all comments post not work in Edit comment page
- Infinite-Scroll Plugin and Jetpack Infinite Scroll Plugin – Adding to “Thoughts” Theme
- conditional statement expressing that current user didn’t logout (is still in the same login session)?
- Adding Image Count to Multigallery
- is_page(id) not working for blog page
- PHP Customization: Taxonomies and Queries, why? [closed]
- How to clear WordPress Cache from Server/FTP/Remote location
- wp-admin/index.php gives a “500 Internal Server Error [closed]
- Get ID of child from child slug, while knowing parent ID
- Custom excerpt function re-factoring
- Limit get_pages to only show 5 items
- Is there a built in function to see if a URLis oEmbed Compatible?
- How to get media objects
- Why use the Settings API over a new administration menu?
- How Display Posts on category
- How does this WordPress Plugin (Thrive Comments) apply their custom comment sort? [closed]
- WP-PageNavi is showing the first page only
- Parent theme CSS overriding child CSS rules
- Only Show Link If div Exists
- A solution to set metatags with my page generating plugin?
- Maximum file upload limit in php.ini have no effect on wordpress
- Using WP-API and SSE not authenticating user ID
- Output ACF repeater on frontend user’s profile page (created with Ultimate Member) [closed]
- Validate functions before inserting then into functions.php
- How to get all first images of posts in same category?
- Why does wordpress only look at certain child theme pages, but not all of them?
- Incorrect MIME type for assets with Valet
- Can you use a WordPress front-end only and have rest of pages as pure PHP
- Security: blocking direct access of php files
- Woocommerce Show Single Product on Homepage
- Woocommerce change prices for a certain country [closed]
- Adding PHP in the menu
- Reason to add a name of the theme like (‘menu-1’ => __( ‘Primary’, ‘twentynineteen’ ),) in PHP?
- Display Data in Table from External Database in WP using Shortcodes
- How to check if a Customizer setting is set?
- persist a variable set in header.php all the way down to footer.php
- What is the alternative code to if (isset ($_POST) && !empty ($_POST) to avoid warnings?
- Remove item in Checkout
- How to Update post_modified of all wordpress post
- echo esc_url( get_permalink($post->ID) + complete the ID’s url
- how to Update 15k products on plugin activation with meta_option
- How to add a rewrite endpoint to unattached media?
- WordPress cron is running with previously set time intervals and not the updated one
- Accessing an API with jQuery and AJAX
- Create special button on WP Tiny MCE Posts Editor for Shortcodes
- Good RSS Feed Parser to use on php file?
- Client cant see the Updated dynamic content
- Post ID wrong in Functions.php
- Obfuscate links (for SEO purpose) [closed]
- Sortable custom product taxonomy terms via drag and drop
- get value from get_post_meta then reuse it in another get_post_meta
- How to remove Login from in my account page
- Header is not displaying on certain pages of wordpress theme [closed]
- Retrieve the whole widget sidebar and pass it inside an html
- Include custom fields in search
- Creating multiple tables with Plugin
- How to access specific product id on other pages/posts?
- Intermittent 503 Service Unavailable Error
- ACF – Get ID of relationship field in flexible content
- Return newly created category by code
- Pulling Products from an API
- Automatically delete posts one by one depending on published time
- Meta Box clears saved field content
- Woocommerce remove menu item on myaccount dashboard
- Hook into all password resets in WordPress and get password before hashing?
- WordPress select query issue
- How to sort (orderby) a query done by a template function before the ‘foreach’ loop?
- Dropdown menu on custom menu
- Pagination in WP Queries
- woocommerce plugin bugs
- How can the searchform.php know if it’s used on a registered sidebar id ‘sidebar-1’ or ‘sidebar-2’?
- Display product_brand with get_the_terms function
- Getting most popular posts based on Facebook comments count
- WordPress get_post_meta issue
- Woocommerce Price Text
- If Elseif Query
- Querying multiple meta_keys in WordPress SQL query
- Enabling XSendFile causes 404 for images on WordPress Multisite / Network
- 3 domains, 1 wordpress install, redirecting and changing domains on live site
- Cannot Upload Custom Header Image into WordPress Dashboard
- Generating a number based on post ID
- Add comma between variables [closed]
- Ajax Load More or View More functionality for woocommerce category layout by template overriding
- echo vs output variable [closed]
- Display Post Titles on top of the_post_thumbnail()
- Properly process a custom WP REST API request (Authenticate, Authorize + Validate)?
- Losing Session ID and sessionStorage when navigating to other domains on Multisite
- Contact form with dynamic dropdown and filter
- Critical Error customiser
- Custom Filtering date with newsletter
- WordPress critical error after trying to update to 6.2 – Fatal error: Allowed memory size of 268435456 bytes exhausted