Could it be that you forgot to comment the Exit if accessed directly
part?
//Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
Related Posts:
- Dynamic URL to reference custom PHP files
- Why is PHP Cookie via plugin only set when logged in as Admin and not regular users? and other questions
- Disable External Pingacks on WordPress Posts and Only Allow ‘Self Pings’
- Custom plugin issue when trying to use the shortcode twice on a page [closed]
- Using wp_get_image_editor in a standalone script
- New Plugin Review
- Making Quote Plugin more efficient
- How to access function from outside of a class within this class in WP plugin?
- PHP can I add line numbers to file_get_contents()
- Adding Default Settings to Theme My Login plugin
- Swapping wp_dropdown_categories function with wp_category_checklist
- How to access global variable $menu inside a class function
- How can I remove a function that has been added to wordpress with add_filter?
- what is the best practice to add new field to an api route
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- How to call plugin function per site in a multisite?
- WordPress Custom field Colors
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- How to use html inside a functions.php code?
- Plugin Generate Unexpected output during activation
- Using data sent via AJAX in multiple functions on a WP plugin
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- Custom meta box values are not getting saved for my custom post type
- how to save checkbox data for custom setting?
- Call to undefined function error in plugin
- Execute Jquery when a specific page in my plugin is loading
- send popup after wp_redirect()
- Using ACF Relationship field to set post type to draft or published status
- How to change basename url for wp-admin?
- How to Send Pingbacks for all Posts in WordPress?
- Reliable way to add nonce to HTTP Header in WordPress?
- Only the first image uploads
- Add Pre-Defined Value to Click Counter in WordPress
- Illegal string offset checkbox
- ssl redirect function is not working
- Custom plugin: how do I call a PHP file if settings option is set to true?
- How can i avoid duplicate same post in wp?
- Display a custom name when the user has no name settle in his account
- In a foreach loop, how can I add a meta value if it doesn’t exist?
- How to override theme’s public static function inside of a trait?
- Enqueue sripts and styles only if function is called
- post_exists stops working in a scheduled event
- Taxonomy Child Term, Counter is staying on 0
- PHP get_category() function redeclared
- How to Request a User to Register on Landing at a Site, Then Automatically Delete the Users Password on Logout?
- Private messaging – Getting and displaying the avatar/url of a message recipient
- Permission error on plugin save
- Trouble using wordpress functions in a pop-up modal form
- Issues separating my Plugin pages into different files
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- display php code in header using wp_head()
- How do I change the Go To Categories link in the term_updated_messages
- WP Custom tables query
- How can I save a multiple select array with the settings API for a plug-in options page?
- class=”parent” for wp_list_pages?
- Remove css styles from specific page
- When is is_admin() available?
- Custom excerpt function re-factoring
- wordpress plugin is not activating from widget
- developing a wordpress plugin, have a few PHP Woocommerce related coding questions
- How to pick the default selected value in wordpress dropdown?
- Using WP-API and SSE not authenticating user ID
- Validate functions before inserting then into functions.php
- WordPress Environment: Dynamic Page using shortcode – how to change the page name for sharing
- Display Data in Table from External Database in WP using Shortcodes
- How to check if a Customizer setting is set?
- zip unzip attachments in wordpress
- Remove item in Checkout
- How to get current post category details inside “loop”?
- how to Update 15k products on plugin activation with meta_option
- Adding Additional Variables on Menus Page
- Create special button on WP Tiny MCE Posts Editor for Shortcodes
- How to add custom function to pluggable.php
- Add Block Before Entry Title Using PHP
- How to correctly escape an echo
- Dynamically populate parameter in Gravity Forms using PHP
- Store ajax data in PHP variable
- comment_post (if comment is approved OR $comment_approved === 1) not working?
- How can i create a function tag in my plugin
- Including user data in “new user notification email”
- get Woocommerce product format json for WP_Query
- Refresh page after login with litespeed cache
- Return newly created category by code
- The plugin generated 225 characters of unexpected output during activation
- Hook into all password resets in WordPress and get password before hashing?
- remove_action() not working in page template – Genesis
- How to sort (orderby) a query done by a template function before the ‘foreach’ loop?
- Dropdown menu on custom menu
- How can the searchform.php know if it’s used on a registered sidebar id ‘sidebar-1’ or ‘sidebar-2’?
- WordPress get_post_meta issue
- Woocommerce Price Text
- Display custom meta box in my template file
- base64_encode conflict with convert_smilies in wordpress
- Properly process a custom WP REST API request (Authenticate, Authorize + Validate)?
- Contact form with dynamic dropdown and filter
- Too few arguments at registering new templates in my plugin
- Automatically change insurance quantity based on cart total [closed]
- I want to lists posts in wordpress to nearest location entered by the user
- hiddenQuestions.find is not a function