I you think you need it. For example, you are using the title in a URL and you are getting the title dinamically; so you never know exactly if the title is valid to be used in URL or not. So, it is better to use it.
Just one example: it is very common that titles contain white spaces and white spaces need to be enconded to be used in URLs.
I would build the full URL string first and then I would use esc_url()
at moment it is used for some attribute value.
$url_params = array(
'url' => get_the_permalink(),
'media' => $thumbnail,
'description' => get_the_title()
);
$url = "http://pinterest.com/pin/create/button/?" . http_build_query( $url_params );
echo '<a href="' . esc_url( $url ) . '">Pinterest</a>';
Related Posts:
- Should `get_template_directory_uri()` be escaped?
- Is it good to rename theme folder downloaded from WordPress.org?
- correct tags for validating input types
- Should we escape the values of constants?
- How to add CSS class to custom logo?
- theme path in javascript file
- The proper way to include/require PHP files in WordPress
- How to insert a logo in the header?
- Why doesn’t default WordPress page view use force_balance_tags?
- Theme Customizer : how to create multiple-level panel
- What is the problem if I use CDN in my WordPress parent theme(built using bootstrap)?
- Automatic Updates For Private And Commercial Themes?
- What can I hook into after_setup_theme?
- Where i should not use if (!defined(‘ABSPATH’)) { exit; }?
- add_image_size is scaling, even though crop is set to true
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- Which is the simplest theme for WordPress to use it as your base?
- get_post() function returns post even if it is trashed
- How to highlight the current page in the nav menu?
- How to use bloginfo( ‘template_directory’ ) in array
- Should I update my _s theme?
- Setting a Default ‘Theme Location’ When Creating a Menu
- How to set page template on front using starter content?
- Different Admin Theme – Based on Role?
- Whats the safest way to output custom JavaScript and Css code entered by the admin in the Theme Settings?
- Finding Page Template and Displaying Content
- Override Constants in Child theme
- How to correctly add JQuery in a WP theme?
- how to change a theme slug
- Same theme name issue with wordpress repository theme
- Removing feeds from header using a function?
- I want to get the home root path
- How to add code in the content area in a WordPress theme?
- How to add theme support?
- Translation Issue with WordPress Theme Check in comment_form function
- Storefront child theme not applying parent theme [closed]
- What is the safe way to print tracking code / pixel code before tag or tag
- How to add Space between sidebar and footer widget in WordPress theme [closed]
- Theme Inspector “X-Ray”
- Acivate all themes multisite wide automatically
- Call to undefined function add_menu_page() on theme activation
- How to place HTML tags in content from the_content()?
- WordPress Theme Creation [closed]
- What is the meaning of WordPress’s recommended css classes and where are they applied?
- Integrate WooCommerce theme with a WordPress theme [closed]
- Automated Footer information
- How do you use WordPress for a website that’s not in a blog format?
- Is it acceptable for a WordPress theme to not accept widgets?
- Should all references to a text domain be to my current theme?
- How to escape multiple attribute at once in WordPress?
- Managing WordPress Theme
- Simple child theme modification but links are broken
- Making a WordPress theme based on twentyten
- How to track a users last visited page?
- In a Gallery with limited image posts, how do I not limit images on single post?
- LESS not working in WordPress [closed]
- How to add custom page elements to the WYSIWYG editor?
- best practices for updating wordpress theme
- Why I obtain different visualization when I run the website on my local machine and on remote server?
- How to use the _S framework
- Open portfolio image in light box
- Let visitors show/hide a type of content
- Best practice for implementing a blog page / section in wp_menu_nav()
- how to add a badge on product based on filter?
- how to create/register menu items that can be added to menus later
- Why nav_menu_css_class doesn’t work with apply_filters?
- Strict Folder and File Permissions for WordPress Themes Folder
- WordPress and Semantic UI
- Copying a modified theme from one wordpress site to another wordpress site [closed]
- Theme does not allow shortcodes
- Text widget is placing everything side by side. I want to post it above
- What is an alternative to not using child theme to customize a WordPress theme?
- How to show some of category in wordpress
- using themename_the_custom_logo() in template-tags?
- Menu names not getting translated
- How to generate a rtl.css file for themes?
- Get property of non-object on theme activation
- change wordpress website logo url [duplicate]
- Custom page template not showing on page creation
- wp_editor some functionality not working on custom theme
- Update modified Shopify third-party theme [closed]
- hide/show a div in wordpress
- Providing updates to your WordPress theme
- One-Page WordPress Template
- How one category can have different fields?
- How do child themes work?
- Fail to install theme on development copy of WordPress on Webmatrix
- How to prevent XSS attack in wordpress theme?
- Featured Image Module Randomly Disappears
- adding navigation to genesis themes
- Show post thumbnail only if it exists using timthumb
- Add Dynamic Sidebar to Exisiting WordPress Theme [closed]
- How can I install my custom-made theme on a wordpress.com blog? [closed]
- Getting all months in one year WordPress Archive
- .submenu class missing in output from wp_nav_menu
- How to show associated fields if checkbox is checked in customize widget screen using wp_customize?
- Dynamic nav menu with icons [closed]
- How do I send out an update for my custom wordpress theme?
- TItle In Latest Post is not using H1 Tag [closed]
- Is via.placeholder.com a good site to auto-generate placeholder images?