You can use output buffering like:
$output_settings .= '';
ob_start();
settings_fields('fahad_plugin_cpt_settings');
submit_button('Delete', 'btn btn-danger btn-sm', 'submit', false);
$output_settings .= ob_get_clean();
and use $output_settings
variable in your code like
// ...your code...
$data .= '<form method="post" action="options.php">';
$data .= $output_settings;
$data .= '</form>';
// ...your code...
Related Posts:
- Fatal error: Call to undefined function mysql_connect()
- How to Add Image to WordPress RSS-Feed with no Plug-in?
- Childs PHP files not overwriting Parent’s PHP files
- Is it safe to use $_SERVER[‘REQUEST_URI’]?
- How will php 7 affect WordPress?
- How to add active class to custom menu using while loop and wp_list_pages
- How can I run a .php file located in my site’s root folder?
- Get list of WP Updates Across Sites
- Switching between custom templates in a post type of the admin menu
- Woocommerce HTML email option unavailable
- Use template for posts with a particular category grandparent
- How to add a custom id to each post URL in wordpress
- How to start a script from cli within wordpress
- How do I display the function the_content in this loop?
- How to group 2 radio buttons in a widget?
- Custom Plugin For Converting CSV To MySQL
- What’s the best user registration library to integrate WordPress?
- Missing sidebar parameter “fix” – before_content
- WordPress add post format support not working
- Page Automatically Generated from Theme?
- Can I install/embed WordPress on a ‘single page’?
- Adding Custom Slider
- Displaying custom taxonomy on WooCommerce product page
- Don’t insert if permalink is the same?
- conditional logic for front-end custom field edits
- Custom posts in different columns style
- Can I use a jQuery Ajax request in Code Snippets Plugin for WordPress?
- php syntax : [ && ] between commands [closed]
- Insert custom PHP head above in WP pages
- need to insert php code in path Get Template Part [closed]
- Set Cache-Control header for 301 redirects
- Automatically set all tags to have a height of 0 if there is no content inside the tag [closed]
- if statement with is_active_sidebar()
- wp ajax return 0
- WordPress template page name displayed on screen
- How to add API security keys into JS of wordpress securely
- How to use theme function in post/page?
- Logic on a Gravity Forms redirect [closed]
- Warning: in_array() null given in PHP function
- Convert code – not work
- Environment to do updates to legacy (4.7) version of WP while staying on php 5.6?
- How can I count ACF sub_field with a certain value
- Adding function to child theme’s function.php
- Custom Registration username_exists / email_exists
- WordPress language switcher doesn’t work
- Custom posts password protect
- Search.php gets metadata from first post
- Hook on file upload
- Contact Form 7 WordPress, checking a few fields, if empty then invalid
- Using Ajax to submit a form, and run a SQL Select query based on user input from the form
- WordPress Multisite login_redirect to primary blog and specific page based on role
- Pagination at category doesnt work with same name of page
- Date translation doesn’t work
- Is it secure to use SMTP password in .php file in WordPress website?
- call to undefined function mysql_connect
- Can’t pass var from php wp_ajax into ajax script : result undefined or null
- How to move a post from one category to another
- WordPress add custom search
- How to get the url of the entry in which an image belongs
- How to override theme’s public static function inside of a trait?
- pass datetime using wp_localize_script to frontend from settings page
- Advanced Custom Forms PHP formatting for do_shortcode
- Infinite loop when logging out using custom login form
- add custom metabox to media library custom widget
- wp_signon works local, not on https
- Get WordPress username to customize url
- add_action in wp_head accessible from class
- WP_Query To Display Product Of Brand On Taxonomy Page
- Let user select the number of posts shown per page jquery error
- How can I export data without using any import/export plugin
- How to have more than one ID included in the exclude command?
- Search for images that width and height is more than 500
- How to create a php page to collect information from a html page
- Can’t make product images clickable
- wordpress ajax return 0
- I need help implement a Javascript code into the PHP file
- divide custom field values in div every two values
- Weird slug in archives permalink
- Admin bar nodes
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- Run insert if no entry otherwise run update with ajax
- WP Ecommerce: Display the “Order Notes” as column in the Sales Log [closed]
- Post Title Not showing up
- if is_home(), change class of menu-item-225 of wp_nav_menu
- WordPress most commented posts of last X days
- How to check if a value exists in one of two database tables
- A next page function with shortcode?
- How to dynamically change webcam photo timestamps
- How to improve wordpress site creation process to increase productivity.
- What is the wrong with this function to enqueue the scripts and styles to the theme? [closed]
- How to use multiple 404 Error Pages in WordPress
- Parse error: syntax error, unexpected ‘}’ in
- Implement OAuth2 in custom plugin
- login redirect based on user role not work as expected
- redirect user from login page if is logged
- How to set variable to specific field when querying
- How to lock users account until approvation
- Count custom posts type and filter by tag
- Error with PHP 8
- How to create a User Role and give permission to only use Web Stories plugin?