plugin_dir_path(__FILE__).'review-preview.php'
//this is the culprit!!
Above line works for PHP code on a plugin directory file. But the function I assume is in functions.php file of your theme directory. So you may have to give full directory path in your code like:
/home/user/var/www/wordpress/wp-content/plugins/my-plugin/review-preview.php
Related Posts:
- New WP_Customize API – how does it work under the hood?
- Data sanitization: Best Practices with code examples
- Prevent WordPress from automatically installing a new theme each year
- Can we use one WordPress installation for multiple databases, domains and content directories
- how to override woocommerce specific loop or archive-product.php [closed]
- How to Add Customizer Setting in Child Theme
- When adding a custom REST endpoint, where do you put the endpoint function, and where do you put the function registration call?
- global menus made from master site’s custom menus wpmu network
- Capability to edit own posts and not others
- Make page template that is just an “include” of another?
- Is there a way to create invisible pages?
- How to handle security on a wordpress site? [closed]
- Which freelance sites are recommended to find WordPress developers/programmers, etc
- Count widgets of a certain type
- Custom widget select options needs to stay selected after save
- Syncing Avatars across multisite
- How to move the wordpress site from test url to main url? [duplicate]
- How can I get the intended URL in a 404?
- Creating user relationships
- Multiple sites/domains with content all managed by single installation of WordPress
- Paginate Author’s Post List on Custom Author Page (ANOTHER THEORY)
- Loop through custom fields with similar label / common chars in label
- title, content, feature images
- How can I make site-wide content editable, for example footer content
- Custom Facebook share button with custom title,url,image in wordpress
- Sort posts by multiple meta key values
- How to Call a static page in WordPress
- How Do I Remove The Right Hand Block On The Main Header?
- Category selectable homepage
- Create custom dashboard for Multisite admins
- Add custom profile field only for site admins?
- Integrate wordpress into index page
- Highlight comments of all the site authors
- Development environment
- Allow guests to use WP Customizer but disable save button
- Can I add/replace the WordPress image in the Dashboard
- Post thumbnails not working in my new install of WP 3.1 with Twenty Ten theme
- Adding comments to my custom theme
- Add content in between of foreach
- How to insert a writing panel between the title and the page content?
- Woocommerce product permalink not working
- Show custom message/info for authors in add/edit post page
- Data won’t save if metabox within conditional in admin. What am I missing?
- I w’d like to know If there are simple solutions to integrate other CMSs to wordpress
- add_feed rewrite overwriting standard permalinks
- Create a page that dynamically loads data
- Editing a post template
- Gravity Forms – gform_field_value – query custom table breaks functions.php
- How can I apply custom sanitization to new usernames?
- Customizer – How to get theme mod range value?
- How to create custom layouts and static pages in themes for clients
- Let author add field to metabox by pressing a button
- Date Ordered Archive Page for single category?
- GUID URL Question
- Usage of custom post types in a custom admin menu
- How to set up conditionals in page templates?
- How do I change my permalink structure to a custom structure on an established blog?
- Customize Widget Navigation
- I found this code to be very useful, how can I change it to a text that display “Product versions and period of last update” rather than a button?
- Select input in metabox not updated
- display text generated via custom get query string
- Add admin page for specific post status (for example)
- Bootstrap slider not working
- How can I style the Comment Section of a blog post
- Custom Meta Box: Value saved in WordPress DB, but not shown in input field on Edit Screen
- Custom post-type working except for Selecting page-parent
- How could I change contact details in the footer?
- Editing a website made with wordpress
- How do I make elements in mobile only reverse order?
- Cannot replace header & footer using “the_content”
- Custom Route Returns 301/Passing Variable from Input
- Menu selection for header
- How to display custom admin pointers (tips/notifications) in Dashboard until dismissed?
- Custom password set/reset link in same URL format as default does’t work
- Two color in one Heading
- Creating custom setting in add media popup
- Still desperate about multiple TinyMCEs in widgets – is there any good solution to this yet?
- Upload image without resizing but insert in post with resizing
- Expressions and str_replace
- How to create a new blog in wordpress?
- How to implement custom Javascript to my site
- Best way to move a site to a subfolder for testing purposes?
- Wonderflux Framework Static Homepage
- Creating Action Hooks For Automatic File Inclusion
- Define excerpt length by inserting read more tag
- Integrate non-wordpress site into a wordpress site
- Taxonomy template by post type
- Custom user fields validation on registration
- Pre_Get_Posts order DESC not registering
- Custom terms in custom category taxonomy
- Adding pages to the Admin panel
- Setting Custom WordPress “Posts page” AS “Front page”
- What capability is required to view posts, scheduled in the future, by someone else?
- Custom Query Arguments
- Adding page Title in a custom coded page
- Reached end of document without finding – using mod_pagespeed
- Gallery Pagination by Row
- use another theme for just one page
- Instead of Custom CSS Theme CSS is loading
- How can I make a search term redirect to a page