Devin Price
Forum Replies Created
-
Forum: Plugins
In reply to: Defaults while using Options FrameworkIf you set your options up like this:
$options['example_text_mini'] = array( 'name' => __('Input Text Mini', 'options_check'), 'desc' => __('A mini text input field.', 'options_check'), 'id' => 'example_text_mini', 'std' => 'Default', 'class' => 'mini', 'type' => 'text');Rather than this:
$options[] = array( 'name' => __('Input Text Mini', 'options_check'), 'desc' => __('A mini text input field.', 'options_check'), 'id' => 'example_text_mini', 'std' => 'Default', 'class' => 'mini', 'type' => 'text');My method should work for you, and be a bit cleaner.
I also mention that in this post about the customizer:
http://wptheming.com/2012/07/options-framework-theme-customizer/Forum: Plugins
In reply to: Defaults while using Options FrameworkTry doing a var_dump of $defaults after it’s called and see what you get.
var_dump( $defaults );Perhaps you could debug why isset( $defaults[$option][‘std’] ) doesn’t have a value.
Forum: Plugins
In reply to: Defaults while using Options FrameworkThe function “optionsframework_options” is in your theme. That’s how the options are defined and used by the framework. Look in “options.php”.
You need to pull the array from there, because that’s where the “std” definitions are for each option.
Forum: Plugins
In reply to: Defaults while using Options FrameworkWhy does that solution not work in your case? It allows the ‘std’ default to be pulled directly from the options array without them having to be saved in the database.
Core developers (like @otto42) recommend that theme options that are not set on activation. It is *possible* tie to the theme activation hook in order to set them, but I’m not sure how that plays out with the theme previewer.
Forum: Plugins
In reply to: Defaults while using Options FrameworkYou could write a function to help you get it.
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 }Then use something like this:
of_get_option( 'option', of_get_default('option' ) );Forum: Plugins
In reply to: Defaults while using Options FrameworkHi. It’s best if you can pass the default value when you request the option.
e.g.: of_get_option( $option, $default);
Forum: Themes and Templates
In reply to: [Visual] Title overflowing on Mobile DevicesThis will go out in the next release:
https://github.com/devinsays/visual/issues/12Forum: Plugins
In reply to: [Options Framework] How to get Uploading File URL ?Forum: Plugins
In reply to: [Portfolio Post Type] More than one portfoliosCan you rephrase the question? I’m not quite sure what you mean.
Forum: Themes and Templates
In reply to: [Portfolio Press] Inconsistent image sizes on home pageYou should upload the largest size images you have. WordPress will auto-crop them.
If you’re using images that were uploaded before the theme was installed, you’ll need to regenerate the thumbnails as mentioned in the FAQ:
http://ww.wp.xz.cn/plugins/regenerate-thumbnails/
If your images don’t resize after running that plugin, there might be an issue with your server environment (specifically the PHP ImageMagick library).
Forum: Plugins
In reply to: [Options Framework] Import And Export Dummy DataThis is an unsupported third party plugin, but it may work for you:
https://github.com/helgatheviking/options-framework-importer/Forum: Themes and Templates
In reply to: [Portfolio Press] Gallery attachment descriptions missingDescriptions now show in the latest version.
Forum: Themes and Templates
In reply to: [Portfolio Press] Featured SlideshowIf you’re using it with galleries you’ve inserted into posts, I recommend the Carousel Module in JetPack.
Forum: Themes and Templates
In reply to: [Portfolio Press] Image Grid external linksPortfolio+ has that option.
Forum: Themes and Templates
In reply to: [Portfolio Press] Two questions for v 2.31. It’s in a function in template-helpers.php: https://github.com/devinsays/portfolio-press/blob/master/extensions/template-helpers.php#L138
2. http://wptheming.com/2012/07/chrome-developer-tools-wordpress/