Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: devinsays/options-framework-theme
base: 37719ac857
...
head fork: devinsays/options-framework-theme
compare: f8eda75754
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 2 contributors
Commits on Apr 22, 2012
@satrya satrya fully translation support 8de4fea
Commits on Apr 29, 2012
@devinsays Merge pull request #34 from satryabima/master
Full translation support
f8eda75
View
14 admin/options-framework.php
@@ -164,7 +164,13 @@ function optionsframework_setdefaults() {
if ( !function_exists( 'optionsframework_add_page' ) ) {
function optionsframework_add_page() {
- $of_page = add_theme_page('Theme Options', 'Theme Options', 'edit_theme_options', 'options-framework','optionsframework_page');
+ $of_page = add_theme_page(
+ __('Theme Options', 'optionsframework'),
+ __('Theme Options', 'optionsframework'),
+ 'edit_theme_options',
+ 'options-framework',
+ 'optionsframework_page'
+ );
// Load the required CSS and javscript
add_action('admin_enqueue_scripts', 'optionsframework_load_scripts');
@@ -233,8 +239,8 @@ function optionsframework_page() {
<?php optionsframework_fields(); /* Settings */ ?>
<div id="optionsframework-submit">
- <input type="submit" class="button-primary" name="update" value="<?php esc_attr_e( 'Save Options' ); ?>" />
- <input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e( 'Restore Defaults' ); ?>" onclick="return confirm( '<?php print esc_js( __( 'Click OK to reset. Any theme settings will be lost!' ) ); ?>' );" />
+ <input type="submit" class="button-primary" name="update" value="<?php esc_attr_e( 'Save Options', 'optionsframework' ); ?>" />
+ <input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e( 'Restore Defaults', 'optionsframework' ); ?>" onclick="return confirm( '<?php print esc_js( __( 'Click OK to reset. Any theme settings will be lost!', 'optionsframework' ) ); ?>' );" />
<div class="clear"></div>
</div>
</form>
@@ -363,7 +369,7 @@ function optionsframework_adminbar() {
$wp_admin_bar->add_menu( array(
'parent' => 'appearance',
'id' => 'of_theme_options',
- 'title' => __( 'Theme Options' ),
+ 'title' => __( 'Theme Options', 'optionsframework' ),
'href' => admin_url( 'themes.php?page=options-framework' )
));
}
View
4 admin/options-medialibrary-uploader.php
@@ -23,7 +23,7 @@
function optionsframework_mlu_init () {
register_post_type( 'optionsframework', array(
'labels' => array(
- 'name' => __( 'Options Framework Internal Container' ),
+ 'name' => __( 'Options Framework Internal Container', 'optionsframework' ),
),
'public' => true,
'show_ui' => false,
@@ -125,7 +125,7 @@ function optionsframework_medialibrary_uploader( $_id, $_value, $_mode = 'full',
if ( $value ) { $class = ' has-file'; }
$output .= '<input id="' . $id . '" class="upload' . $class . '" type="text" name="'.$name.'" value="' . $value . '" />' . "\n";
- $output .= '<input id="upload_' . $id . '" class="upload_button button" type="button" value="' . __( 'Upload' ) . '" rel="' . $int . '" />' . "\n";
+ $output .= '<input id="upload_' . $id . '" class="upload_button button" type="button" value="' . __( 'Upload', 'optionsframework' ) . '" rel="' . $int . '" />' . "\n";
if ( $_desc != '' ) {
$output .= '<span class="of_metabox_desc">' . $_desc . '</span>' . "\n";
View
38 admin/options-sanitize.php
@@ -215,10 +215,10 @@ function of_sanitize_font_face( $value ) {
*/
function of_recognized_background_repeat() {
$default = array(
- 'no-repeat' => 'No Repeat',
- 'repeat-x' => 'Repeat Horizontally',
- 'repeat-y' => 'Repeat Vertically',
- 'repeat' => 'Repeat All',
+ 'no-repeat' => __('No Repeat', 'optionsframework'),
+ 'repeat-x' => __('Repeat Horizontally', 'optionsframework'),
+ 'repeat-y' => __('Repeat Vertically', 'optionsframework'),
+ 'repeat' => __('Repeat All', 'optionsframework')
);
return apply_filters( 'of_recognized_background_repeat', $default );
}
@@ -231,15 +231,15 @@ function of_recognized_background_repeat() {
*/
function of_recognized_background_position() {
$default = array(
- 'top left' => 'Top Left',
- 'top center' => 'Top Center',
- 'top right' => 'Top Right',
- 'center left' => 'Middle Left',
- 'center center' => 'Middle Center',
- 'center right' => 'Middle Right',
- 'bottom left' => 'Bottom Left',
- 'bottom center' => 'Bottom Center',
- 'bottom right' => 'Bottom Right'
+ 'top left' => __('Top Left', 'optionsframework'),
+ 'top center' => __('Top Center', 'optionsframework'),
+ 'top right' => __('Top Right', 'optionsframework'),
+ 'center left' => __('Middle Left', 'optionsframework'),
+ 'center center' => __('Middle Center', 'optionsframework'),
+ 'center right' => __('Middle Right', 'optionsframework'),
+ 'bottom left' => __('Bottom Left', 'optionsframework'),
+ 'bottom center' => __('Bottom Center', 'optionsframework'),
+ 'bottom right' => __('Bottom Right', 'optionsframework')
);
return apply_filters( 'of_recognized_background_position', $default );
}
@@ -252,8 +252,8 @@ function of_recognized_background_position() {
*/
function of_recognized_background_attachment() {
$default = array(
- 'scroll' => 'Scroll Normally',
- 'fixed' => 'Fixed in Place'
+ 'scroll' => __('Scroll Normally', 'optionsframework'),
+ 'fixed' => __('Fixed in Place', 'optionsframework')
);
return apply_filters( 'of_recognized_background_attachment', $default );
}
@@ -327,10 +327,10 @@ function of_recognized_font_faces() {
*/
function of_recognized_font_styles() {
$default = array(
- 'normal' => 'Normal',
- 'italic' => 'Italic',
- 'bold' => 'Bold',
- 'bold italic' => 'Bold Italic'
+ 'normal' => __('Normal', 'optionsframework'),
+ 'italic' => __('Italic', 'optionsframework'),
+ 'bold' => __('Bold', 'optionsframework'),
+ 'bold italic' => __('Bold Italic', 'optionsframework')
);
return apply_filters( 'of_recognized_font_styles', $default );
}
View
2  functions.php
@@ -8,6 +8,6 @@
*/
if ( !function_exists( 'optionsframework_init' ) ) {
- define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_bloginfo('template_directory') . '/admin/' );
+ define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/admin/' );
require_once dirname( __FILE__ ) . '/admin/options-framework.php';
}
View
206 options.php
@@ -10,7 +10,7 @@ function optionsframework_option_name() {
// This gets the theme name from the stylesheet (lowercase and without spaces)
$themename = get_theme_data(STYLESHEETPATH . '/style.css');
$themename = $themename['Name'];
- $themename = preg_replace("/\W/", "", strtolower($themename) );
+ $themename = preg_replace('/\W/', '', strtolower($themename) );
$optionsframework_settings = get_option('optionsframework');
$optionsframework_settings['id'] = $themename;
@@ -19,20 +19,20 @@ function optionsframework_option_name() {
/**
* Defines an array of options that will be used to generate the settings page and be saved in the database.
- * When creating the "id" fields, make sure to use all lowercase and no spaces.
+ * When creating the 'id' fields, make sure to use all lowercase and no spaces.
*
*/
function optionsframework_options() {
// Test data
- $test_array = array("one" => "One","two" => "Two","three" => "Three","four" => "Four","five" => "Five");
+ $test_array = array('one' => __('One', 'optionsframework'), 'two' => __('Two', 'optionsframework'), 'three' => __('Three', 'optionsframework'), 'four' => __('Four', 'optionsframework'), 'five' => __('Five', 'optionsframework'));
// Multicheck Array
- $multicheck_array = array("one" => "French Toast", "two" => "Pancake", "three" => "Omelette", "four" => "Crepe", "five" => "Waffle");
+ $multicheck_array = array('one' => __('French Toast', 'optionsframework'), 'two' => __('Pancake', 'optionsframework'), 'three' => __('Omelette', 'optionsframework'), 'four' => __('Crepe', 'optionsframework'), 'five' => __('Waffle', 'optionsframework'));
// Multicheck Defaults
- $multicheck_defaults = array("one" => "1","five" => "1");
+ $multicheck_defaults = array('one' => '1','five' => '1');
// Background Defaults
@@ -59,127 +59,127 @@ function optionsframework_options() {
$options = array();
- $options[] = array( "name" => "Basic Settings",
- "type" => "heading");
+ $options[] = array( 'name' => __('Basic Settings', 'optionsframework'),
+ 'type' => 'heading');
- $options[] = array( "name" => "Input Text Mini",
- "desc" => "A mini text input field.",
- "id" => "example_text_mini",
- "std" => "Default",
- "class" => "mini",
- "type" => "text");
+ $options[] = array( 'name' => __('Input Text Mini', 'optionsframework'),
+ 'desc' => __('A mini text input field.', 'optionsframework'),
+ 'id' => 'example_text_mini',
+ 'std' => 'Default',
+ 'class' => 'mini',
+ 'type' => 'text');
- $options[] = array( "name" => "Input Text",
- "desc" => "A text input field.",
- "id" => "example_text",
- "std" => "Default Value",
- "type" => "text");
+ $options[] = array( 'name' => __('Input Text', 'optionsframework'),
+ 'desc' => __('A text input field.', 'optionsframework'),
+ 'id' => 'example_text',
+ 'std' => 'Default Value',
+ 'type' => 'text');
- $options[] = array( "name" => "Textarea",
- "desc" => "Textarea description.",
- "id" => "example_textarea",
- "std" => "Default Text",
- "type" => "textarea");
+ $options[] = array( 'name' => __('Textarea', 'optionsframework'),
+ 'desc' => __('Textarea description.', 'optionsframework'),
+ 'id' => 'example_textarea',
+ 'std' => 'Default Text',
+ 'type' => 'textarea');
- $options[] = array( "name" => "Input Select Small",
- "desc" => "Small Select Box.",
- "id" => "example_select",
- "std" => "three",
- "type" => "select",
- "class" => "mini", //mini, tiny, small
- "options" => $test_array);
+ $options[] = array( 'name' => __('Input Select Small', 'optionsframework'),
+ 'desc' => __('Small Select Box.', 'optionsframework'),
+ 'id' => 'example_select',
+ 'std' => 'three',
+ 'type' => 'select',
+ 'class' => 'mini', //mini, tiny, small
+ 'options' => $test_array);
- $options[] = array( "name" => "Input Select Wide",
- "desc" => "A wider select box.",
- "id" => "example_select_wide",
- "std" => "two",
- "type" => "select",
- "options" => $test_array);
+ $options[] = array( 'name' => __('Input Select Wide', 'optionsframework'),
+ 'desc' => __('A wider select box.', 'optionsframework'),
+ 'id' => 'example_select_wide',
+ 'std' => 'two',
+ 'type' => 'select',
+ 'options' => $test_array);
- $options[] = array( "name" => "Select a Category",
- "desc" => "Passed an array of categories with cat_ID and cat_name",
- "id" => "example_select_categories",
- "type" => "select",
- "options" => $options_categories);
+ $options[] = array( 'name' => __('Select a Category', 'optionsframework'),
+ 'desc' => __('Passed an array of categories with cat_ID and cat_name', 'optionsframework'),
+ 'id' => 'example_select_categories',
+ 'type' => 'select',
+ 'options' => $options_categories);
- $options[] = array( "name" => "Select a Page",
- "desc" => "Passed an pages with ID and post_title",
- "id" => "example_select_pages",
- "type" => "select",
- "options" => $options_pages);
+ $options[] = array( 'name' => __('Select a Page', 'optionsframework'),
+ 'desc' => __('Passed an pages with ID and post_title', 'optionsframework'),
+ 'id' => 'example_select_pages',
+ 'type' => 'select',
+ 'options' => $options_pages);
- $options[] = array( "name" => "Input Radio (one)",
- "desc" => "Radio select with default options 'one'.",
- "id" => "example_radio",
- "std" => "one",
- "type" => "radio",
- "options" => $test_array);
+ $options[] = array( 'name' => __('Input Radio (one)', 'optionsframework'),
+ 'desc' => __('Radio select with default options "one".', 'optionsframework'),
+ 'id' => 'example_radio',
+ 'std' => 'one',
+ 'type' => 'radio',
+ 'options' => $test_array);
- $options[] = array( "name" => "Example Info",
- "desc" => "This is just some example information you can put in the panel.",
- "type" => "info");
+ $options[] = array( 'name' => __('Example Info', 'optionsframework'),
+ 'desc' => __('This is just some example information you can put in the panel.', 'optionsframework'),
+ 'type' => 'info');
- $options[] = array( "name" => "Input Checkbox",
- "desc" => "Example checkbox, defaults to true.",
- "id" => "example_checkbox",
- "std" => "1",
- "type" => "checkbox");
+ $options[] = array( 'name' => __('Input Checkbox', 'optionsframework'),
+ 'desc' => __('Example checkbox, defaults to true.', 'optionsframework'),
+ 'id' => 'example_checkbox',
+ 'std' => '1',
+ 'type' => 'checkbox');
- $options[] = array( "name" => "Advanced Settings",
- "type" => "heading");
+ $options[] = array( 'name' => __('Advanced Settings', 'optionsframework'),
+ 'type' => 'heading');
- $options[] = array( "name" => "Check to Show a Hidden Text Input",
- "desc" => "Click here and see what happens.",
- "id" => "example_showhidden",
- "type" => "checkbox");
+ $options[] = array( 'name' => __('Check to Show a Hidden Text Input', 'optionsframework'),
+ 'desc' => __('Click here and see what happens.', 'optionsframework'),
+ 'id' => 'example_showhidden',
+ 'type' => 'checkbox');
- $options[] = array( "name" => "Hidden Text Input",
- "desc" => "This option is hidden unless activated by a checkbox click.",
- "id" => "example_text_hidden",
- "std" => "Hello",
- "class" => "hidden",
- "type" => "text");
+ $options[] = array( 'name' => __('Hidden Text Input', 'optionsframework'),
+ 'desc' => __('This option is hidden unless activated by a checkbox click.', 'optionsframework'),
+ 'id' => 'example_text_hidden',
+ 'std' => 'Hello',
+ 'class' => 'hidden',
+ 'type' => 'text');
- $options[] = array( "name" => "Uploader Test",
- "desc" => "This creates a full size uploader that previews the image.",
- "id" => "example_uploader",
- "type" => "upload");
+ $options[] = array( 'name' => __('Uploader Test', 'optionsframework'),
+ 'desc' => __('This creates a full size uploader that previews the image.', 'optionsframework'),
+ 'id' => 'example_uploader',
+ 'type' => 'upload');
- $options[] = array( "name" => "Example Image Selector",
- "desc" => "Images for layout.",
- "id" => "example_images",
- "std" => "2c-l-fixed",
- "type" => "images",
- "options" => array(
+ $options[] = array( 'name' => __('Example Image Selector', 'optionsframework'),
+ 'desc' => __('Images for layout.', 'optionsframework'),
+ 'id' => 'example_images',
+ 'std' => '2c-l-fixed',
+ 'type' => 'images',
+ 'options' => array(
'1col-fixed' => $imagepath . '1col.png',
'2c-l-fixed' => $imagepath . '2cl.png',
'2c-r-fixed' => $imagepath . '2cr.png')
);
- $options[] = array( "name" => "Example Background",
- "desc" => "Change the background CSS.",
- "id" => "example_background",
- "std" => $background_defaults,
- "type" => "background");
+ $options[] = array( 'name' => __('Example Background', 'optionsframework'),
+ 'desc' => __('Change the background CSS.', 'optionsframework'),
+ 'id' => 'example_background',
+ 'std' => $background_defaults,
+ 'type' => 'background');
- $options[] = array( "name" => "Multicheck",
- "desc" => "Multicheck description.",
- "id" => "example_multicheck",
- "std" => $multicheck_defaults, // These items get checked by default
- "type" => "multicheck",
- "options" => $multicheck_array);
+ $options[] = array( 'name' => __('Multicheck', 'optionsframework'),
+ 'desc' => __('Multicheck description.', 'optionsframework'),
+ 'id' => 'example_multicheck',
+ 'std' => $multicheck_defaults, // These items get checked by default
+ 'type' => 'multicheck',
+ 'options' => $multicheck_array);
- $options[] = array( "name" => "Colorpicker",
- "desc" => "No color selected by default.",
- "id" => "example_colorpicker",
- "std" => "",
- "type" => "color");
+ $options[] = array( 'name' => __('Colorpicker', 'optionsframework'),
+ 'desc' => __('No color selected by default.', 'optionsframework'),
+ 'id' => 'example_colorpicker',
+ 'std' => '',
+ 'type' => 'color');
- $options[] = array( "name" => "Typography",
- "desc" => "Example typography.",
- "id" => "example_typography",
- "std" => array('size' => '12px','face' => 'verdana','style' => 'bold italic','color' => '#123456'),
- "type" => "typography");
+ $options[] = array( 'name' => __('Typography', 'optionsframework'),
+ 'desc' => __('Example typography.', 'optionsframework'),
+ 'id' => 'example_typography',
+ 'std' => array('size' => '12px','face' => 'verdana','style' => 'bold italic','color' => '#123456'),
+ 'type' => 'typography');
return $options;
}

No commit comments for this range

Something went wrong with that request. Please try again.