Title: JonathanAlphonso's Replies | WordPress.org

---

# JonathanAlphonso

  [  ](https://wordpress.org/support/users/jonathanalphonso/)

 *   [Profile](https://wordpress.org/support/users/jonathanalphonso/)
 *   [Topics Started](https://wordpress.org/support/users/jonathanalphonso/topics/)
 *   [Replies Created](https://wordpress.org/support/users/jonathanalphonso/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/jonathanalphonso/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/jonathanalphonso/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/jonathanalphonso/engagements/)
 *   [Favorites](https://wordpress.org/support/users/jonathanalphonso/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/users/jonathanalphonso/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/jonathanalphonso/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Forms send an unexpected BCC](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/#post-15415689)
 * I think I found the issue.
 * There was a BBC: [your-email] in one of the other forms, and this is the form
   that was being targeted.
 * I had overlooked this, but I’ve removed the BBC and its all good now.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Forms send an unexpected BCC](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/#post-15396919)
 * Our theme was custom developed around 2 years ago
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Forms send an unexpected BCC](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/#post-15396918)
 * Here are my active plugins
 * Advanced Custom Fields PRO
    Better Search Replace Contact Form 7 Contact Form
   7 Google Analytics Integration Geolocation IP Detection Google Analytics for 
   WordPress by MonsterInsights Health Check & Troubleshooting Honeypot for Contact
   Form 7 Lead info with country for Contact Form 7 Max Mega Menu Really Simple 
   CAPTCHA Really Simple SSL Redirection Simple History Smush Pro What The File 
   WP Google Maps WP Mail SMTP WP Realtime Sitemap WPMU DEV Dashboard Yoast Duplicate
   Post Yoast SEO Yoast SEO Premium Yoast SEO: Video`
    -  This reply was modified 4 years, 3 months ago by [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Forms send an unexpected BCC](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/#post-15391711)
 * Thanks [@takayukister](https://wordpress.org/support/users/takayukister/)
 * I’ve removed those codes from additional settings
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Forms send an unexpected BCC](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/#post-15379589)
 * I don’t think the additional settings are working properly right now, but here
   they are
 * [Link to screenshot of additional settings](https://imgur.com/a/tmq8VrS)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Forms send an unexpected BCC](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/#post-15376412)
 * [@takayukister](https://wordpress.org/support/users/takayukister/) I’ve taken
   screenshots, and I’ve changed the email addresses as per your advice.
 * [Link to the screenshots on imgur](https://imgur.com/a/sVO1AzS)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Forms send an unexpected BCC](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/#post-15371845)
 * Thanks for the tip [@jdembowski](https://wordpress.org/support/users/jdembowski/)
 * I wasn’t aware of the spam filter rules. Here is the requested website:
    _[ Again,
   the link field has been updated ]_
    -  This reply was modified 4 years, 4 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
    -  This reply was modified 4 years, 4 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] Forms send an unexpected BCC](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/forms-send-an-unexpected-bcc/#post-15371779)
 * Here is the website: _[ use the link field next time ]_
    -  This reply was modified 4 years, 4 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Defaults while using Options Framework](https://wordpress.org/support/topic/defaults-while-using-options-framework/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/defaults-while-using-options-framework/page/2/#post-5293741)
 * Hmmm, I used to have the require_once(‘options.php’); outside of the function
   alongside the rest of the require_once commands. But this broke the site giving
   me this error:
 * Fatal error: Call to undefined function wp_reset_vars() in C:\xampp\htdocs\wordpress\
   wp-admin\options.php on line 25
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Defaults while using Options Framework](https://wordpress.org/support/topic/defaults-while-using-options-framework/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/defaults-while-using-options-framework/page/2/#post-5293736)
 * OK, getting ready to launch my theme!
 * One pretty important note though…
 * The function for getting defaults is located in funtions.php, so you have to 
   include options.php in the of_get_default function.
 * For example, this will render your WP install unusable
 *     ```
       require_once('options.php');
       function of_get_default( $option ) {
            $defaults = optionsframework_options();
            if ( isset( $defaults[$option]['std'] ) ) {
                 return $defaults[$option]['std'];
            }
            return false; // default if no std is set
       }
       ```
   
 * What you need to put is this:
 *     ```
       function of_get_default( $option ) {
            require_once('options.php');
            $defaults = optionsframework_options();
            if ( isset( $defaults[$option]['std'] ) ) {
                 return $defaults[$option]['std'];
            }
            return false; // default if no std is set
       }
       ```
   
 * Just worked this out and didn’t want anyone else to make the same mistake
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Defaults while using Options Framework](https://wordpress.org/support/topic/defaults-while-using-options-framework/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/defaults-while-using-options-framework/#post-5293678)
 * Ahhhh you are 1000% right Devin!
 * I just noticed you are the author of options framework, and I totally should 
   have read your blog posts first before any of this.
 * Your method is way better and less hacky so I am for sure going to use it.
 * This was the last issue I had with making my WordPress theme so I can release
   it now 🙂
 * A huge thank you to you Devin, for both the framework and the help you’ve provided
   in this thread.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Defaults while using Options Framework](https://wordpress.org/support/topic/defaults-while-using-options-framework/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/defaults-while-using-options-framework/#post-5293676)
 * Ok! I figured it out, I am not super great with PHP so it took a bit of time.
   Here is my function
 *     ```
       //Find which item in the array has a matching id value, then return the std (default) value
       require_once('options.php');
       function of_get_default( $option ) {
           $defaults = optionsframework_options();
           $result = 'default not set';
           for ($i = 0; $i <= count($defaults); $i++) {
               if($defaults[$i]['id'] === $option)
                   {
                       $result = $defaults[$i]['std'];
                       break;
                   }
           }
            return $result; // default if no std is set
       }
       ```
   
 * Not super optimal but it works
 * I kind of don’t like how this sort of thing is required though, I use frameworks
   not to get messy with code 😛
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Defaults while using Options Framework](https://wordpress.org/support/topic/defaults-while-using-options-framework/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/defaults-while-using-options-framework/#post-5293659)
 * OK! I’ve figured some of it out…
 * return $defaults[$option][‘std’];
 * This will return a false, because $option is will only accept numbers, but it
   is being set as a string.
 * So to get my social_media_editor std value I can write
    return $defaults[8][‘
   std’];
 * I just need to write a script that will find what position my id values are in
   the array.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Defaults while using Options Framework](https://wordpress.org/support/topic/defaults-while-using-options-framework/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/defaults-while-using-options-framework/#post-5293655)
 * Hmm yeah a dump of $defaults is what I would expect…
 * Something along the lines of:
    `array(17) { [0]=> array(2) { ["name"]=> string(
   19) "Front-Page Settings" ["type"]=> string(7) "heading" } [1]=> array(6) { ["
   name"]=> string(29) "Core Competency 1 Text Editor" ["desc"]=> string(184) "This
   should include a heading 3 and a short bit of text about one of your company's
   primary offerings. Let visitors know what you are good at and consider adding
   a Read More... link. " ["id"]=> string(10) "cc1_editor" ["std"]=> string(311)`
 * Yeah I’ll have to check whats up with that isset…
 * Thank you so much for the help Devin!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Defaults while using Options Framework](https://wordpress.org/support/topic/defaults-while-using-options-framework/)
 *  Thread Starter [JonathanAlphonso](https://wordpress.org/support/users/jonathanalphonso/)
 * (@jonathanalphonso)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/defaults-while-using-options-framework/#post-5293652)
 * Ok! Getting closer,
 * SO I’ve imported the options.php file in my fuctions.php file, so now I can access
   the function optionsframework_options
 * My code is like this
 *     ```
       require_once('options.php');
       function of_get_default( $option ) {
            $defaults = optionsframework_options();
            if ( isset( $defaults[$option]['std'] ) ) {
                 return $defaults[$option]['std'];
            }
            return 'false'; // default if no std is set
       }
       ```
   
 *     ```
       <?php echo of_get_option( 'social_media_editor', of_get_default('social_media_editor')); ?>
       ```
   
 * This still returns a ‘false’ though

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/users/jonathanalphonso/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/jonathanalphonso/replies/page/2/?output_format=md)