Line 49: $data = file_get_contents ( 'http://example.com');
Don’t use file_get_contents to download web page. WordPress has HTTP API for such needs. In your case, I would suggest you to use wp_remote_get( 'http://example.com' ); function instead of file_get_contents.
Further reading:
- WordPress HTTP API
wp_remote_getfunction.
Related Posts:
- Add a dropdown to theme customizer
- Editing the custom background CSS
- What is the problem if I use CDN in my WordPress parent theme(built using bootstrap)?
- What, specifically, should be included in theme_name_setup()?
- How to get gallery images?
- Is it possible to use line break in theme description?
- Grab the first paragraph of each post
- Symlink a directory to wp-content/themes
- How to check if post has any tag?
- What are WooCommerce starter themes? [closed]
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- How to disable the gradient and font size internal CSS added by WordPress when using theme.json
- Is there an error in get_the_tag_list()?
- Which is the simplest theme for WordPress to use it as your base?
- “Cheatin’ uh?” error message on multple theme directories
- Adding WordPress colorpicker in widget settings
- A theme that follows all the best practices to learn from?
- How do I display the “Archives” widget layout (sidebar) in WordPress by ‘year’ then by ‘months’?
- get_post() function returns post even if it is trashed
- How to highlight the current page in the nav menu?
- How do you protect a premium theme from being copied?
- “Display Site Title and Tagline” checkbox not working?
- Add social icons in a theme through custom admin menu
- How can a Theme Contain no Header File or Footer File?
- Custom Nav Walker Displaying Values in Sub Menu
- How to configure wordpress to work with Vuejs with SSR and without hashbang
- How can one update a theme on a live site without interruption?
- Sub folder CSS that’s read by Admin panel
- Some doubts about how to show posts in a custom theme?
- Dequeue a style file which is making website load slow!
- WordPress not registering Theme Customization Section
- Can’t delete theme
- How to add a second stylesheet to the editor
- Stylesheet not linking
- How to control layout of posts on page?
- Single Page theme [closed]
- Include Parent functions.php in Child Theme functions.php
- Can I have two different theme for two different language?
- WP_Comment_Query – Get comments and answers separately
- excerpt() shows different result between remote and localhost(development environment)
- Prefix best practice, should we use framework name or theme name?
- Theme Javascript.php Overwritten Nightly [closed]
- Where am I doing wrong in my theme menu?
- How to add Space between sidebar and footer widget in WordPress theme [closed]
- 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?
- 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?
- 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
- 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 make a multilingual wordpress site to be translated one-to-one without much effort and without using translate?
- Is there a way to have WordPress autodetect page templates in the page-templates directory and any sub-folders?
- How to automatically set a Template Page Name next to a page in menu screen such as WooCommerce pages, front page, or posts page in wordpress?
- WP Update Messages get cut off during Theme update