Use a simple variable to store the value.
$a_val = stripslashes(get_option('a'));
$var = array( 'foo' => $a_val);
Related Posts:
- Where to get information about array fields in $_REQUEST?
- Is it safe to use $_SERVER[‘REQUEST_URI’]?
- Namespacing WordPress project according to FIG standards
- Redirect to Page after Post Submit
- How will php 7 affect WordPress?
- automated tests as a user?
- WordPress Wysiwyg Content not being displayed
- How to get the post_id from postmeta
- Problems with function on function.php
- Want to create Child theme, but already edited Parent theme css files and some php files
- Adding code to child theme functions.php to override parent theme behaviour doesn’t work
- How to retrieve the content (with a specific ID) via ajax by clicking a link tag
- WordPress: Remove link in the_tags
- How do I display the function the_content in this loop?
- Set WP_MAX_MEMORY_LIMIT higher than PHP.ini memory_limit
- Custom category code not showing all posts
- Custom Plugin For Converting CSV To MySQL
- How to add clearfix class according to to the posts number?
- AJAX request status 200 but no actual “response”
- Multiple options not staying selected after saving
- How to enable Zend Optimiser+ with Batcache
- Importing Geo data into wordpress database
- how to add three default images to wordpress?
- Create own WordPress shortcode gallery
- Loading the same WP_Query in two different wordpress .php templates
- How to prevent WP_Query function from returning all posts when empty?
- Save Search System
- foreach loop still echoes array
- dynamic dependent select dropdown
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- Hide menu items in WordPress
- Best way to schedule daily change in CSS parameter
- wp-comments-post.php file returns a blank page
- wp_mail file attachment not being placed in upload folder?
- WordPress Child Themes
- List posts that don’t have a specific tag?
- Email address not displaying where I expect it to
- 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]
- Returning data instead of echoing/printing
- Correct way to enqueue page specific CSS file
- Wrapping a Sidebar within
- WordPress template page name displayed on screen
- How to add API security keys into JS of wordpress securely
- update_post_meta only updating on last loop of foreach
- Link blogname and blogdescription to the Options Framework
- Why does the post_type_link hook everything twice?
- Adding conditional text to a PHP Shortcode Template
- How to deal with too many $_POST variable conditions from ajax request at backend? [closed]
- wp_nav_menu not working correctly in my underscores theme
- use loop to return blog details
- PHP error when using newer PHP versions
- Customizer: How to change Header Image description
- Fetching Initials of the Commentator in the WordPress Website
- fetch woocommerce product with custom taxonomy
- WP_Query with AJAX returning empty array
- How to add post meta in while loop?
- Adding function to child theme’s function.php
- How can I Use 2 databases with one WordPress install
- How to set a featured image (thumbnail) with PHP?
- Output custom text field as unordered list
- Using Conditionals when homepage is a page and blog is /blog
- Can not call .php files after switching to %postname%
- WP Container Displaying Only on First Page of Archive
- Hook on file upload
- Contact Form 7 WordPress, checking a few fields, if empty then invalid
- Update Images after edit via php
- Drop down question
- How to move a post from one category to another
- Using wpdb to connect to a different database is not working
- custom mailchimp form using HTTP API
- 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?
- ACF under category name in shop page [closed]
- WordPress Recent Posts – Loop
- Changing default WPMU emails to be send thorugh Campaign Monitor Transactional emails
- Can’t add to time? [closed]
- not able to access $_POST on backend profile update
- WordPress Single Post Pagination Numbered and Navigational
- Displaying 3 Category Posts differently
- How can I export data without using any import/export plugin
- I changed the password for the database user of my website, updated wp-config.php and wordpress asks to be reinstalled
- Post formating on Home page
- Category – “No content found”
- divide custom field values in div every two values
- How can I correctly POST to a WordPress page?
- WordPress – Image href for home menu nav not working
- Search box background on a different page template
- Cron job to call php to email last 24 hours posts
- WP Ecommerce: Display the “Order Notes” as column in the Sales Log [closed]
- Load php function with AJAX on modal window
- Hide page title
- Edit Image/Image Details – Replace button missing
- A next page function with shortcode?
- How to dynamically change webcam photo timestamps
- get user role. parameter id return type string [closed]
- How to improve wordpress site creation process to increase productivity.
- how to display tables via ajax
- How to get posts by a certain author in inner loop using outer loop variable or post title WordPress