Use the ABSPATH
constant defined in the wp-config.php
:
$filename = ABSPATH . 'wp-content/uploads/webcam/webcamimage.jpg';
You don’t have to use basename()
function since it would return only the last component from the full file path, i.e. webcamimage.jpg
, and it isn’t what you want to use with filemtime()
function.
Related Posts:
- All shortcodes not working on custom theme
- Plugin Handle URL With Custom Theme
- Where are theme codes located for WordPress?
- using do_shortcode
- How to activate a plugin on the activation of a theme?
- Override/ignore CSS from active theme as not to interfere with my custom CSS
- Load CSS files in header of Bones theme?
- how to display a template.php in a shortcode
- do_shortcodes() isn’t working
- WP Customer Reviews call short code on another page [closed]
- Custom Plugin not Displaying in the Website Production environment (Divi)
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- Nested shortcode functions accessing variable
- Advanced Custom Field DatePicker [closed]
- Calling an attribute from a plugin shortcode
- Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()
- Best place for short bio,image and button [closed]
- Insert content of a post into another
- All sites themes functions.php have been changed
- Homemade plugin while using Themify Ultra
- Why namespaces are rarely used in WordPress plugins?
- What will happen if i deactivate my visual composer plug in? [closed]
- accessing wp.media api from a tinymce plugin
- Finding the URL to be used to check if plugin is installed with a theme
- Creating shortcodes in plugin
- Visual Composer shortcode for child theme dir
- get_post_title is not working on homepage
- Some code in shortcode function being ignored
- Theme/Plugin installation through url on button click
- (Big issue) Blog is Getting Down Each day.. what should i do.?
- Custom wordpress Theme and Plugin repository
- How to create a custom shortcode based on the layout?
- WordPress 3.8.3. custom theme – sliders won’t load js/css files
- How can I position ShareThis buttons manually when using the plug-in? [closed]
- How to require users to login when not logged in
- Unable to add TAB character to post?
- plugin shortcode output
- Error when using plugin QuickCache with plugin Mobile Smart ? [closed]
- How to Create a shortcode to this php function
- Inject HTML meta tag inside wordpress tag using add_shortcode
- How do I apply style to each category of a list?
- Does WP delete deprecated plugin/theme files on plugin/theme upgrade?
- Create shortcode to echo javascript
- Is there any hook for theme activation ? or something similar?
- How to use get_template part in the plugin?
- How can I use get header from within my plugin?
- Redirect to another page using contact form 7? [closed]
- What is @Action in WordPress?
- Custom Shortcode Broken in WordPress 3.1
- How do I find out what is in control over a certain part of a website?
- “No Add Button” for me to customize my WordPress with themes and pluggins
- Use $_GET inside a shortcode print empty Array
- Namespaced shortcode?
- How do I combine a theme with a plugin
- How can I list all installed plugins/themes/versions from CLI/API?
- My single.php page does not show the related data to the post which is clicked
- Overwrite category head title
- My plugin won’t return anything [closed]
- Anyway to convert a plugin to become a shortcode?
- Basic gallery plugin suggestion [closed]
- Render Modula Plugin Shortcode On Ajax Request
- Shortcode to update user meta
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- How to check if my wordpress websiste is nulled or not?
- Why does my file_exist check fail?
- Remove specific plugins and themes from the Dashboard->Updates page [duplicate]
- Create a single website with 3 theme options in wordpress
- Why shortcode always displayed after footer not in body
- How to have sample page for each new register users in a membership website
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- Why am I unable to load scripts in head in plugin?
- Create custom pages with a plugin
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- Deactivate JS Script in Plugin Shortcode
- How to write “alt” tag in image for wordpress code?
- Does heavy theme and plugins affect server’s response time? [closed]
- plugin shortcode not working on ajax request call
- Displayed content disappears when adding attributes to shortcode
- Modify page title and subtitle with a plugin
- How to protect WordPress from security scanner [closed]
- How to load different homepage on Mobile.?
- How do I pass custom shortcode-extracted variables (taxonomy) into a query function for WordPress RoyalSlider?
- Where to find the code used to render a page that has a shortcode and a template defined?
- Shortcode not working after move wordpress website files
- Shortcode not getting replaced
- How to get menu location in wp_update_nav_menu hook
- Proper way to use plugin functions in functions.php
- Add Shortcode tag in Widget/Sidebar
- Flipping Book PHP Code? Any experience?
- Theme Custom Pages
- Use different single.php file based on condition
- how can I query all wordpress users of a blog
- how can I do something on new user registration?
- WPTouch – how to remove shortcodes or make shortcodes function
- WordPress plugin won’t show on some themes
- convert more tag to shortcode
- Making that Admin Bar transparent or a blue color
- Which wordpress theme is compatible Optima Express theme (real estate inventory) plugin?
- How to Include File from Plugins into Template?
- Shortcode does not expand in Facebook like