diff --git a/option-tree/includes/ot-functions-admin.php b/option-tree/includes/ot-functions-admin.php index 18c6ad24..59b162bc 100644 --- a/option-tree/includes/ot-functions-admin.php +++ b/option-tree/includes/ot-functions-admin.php @@ -511,7 +511,7 @@ function ot_validate_setting( $input, $type, $field_id, $wmpl_id = '' ) { } // Unset keys with empty values. - if ( empty( $value ) ) { + if ( empty( $value ) && strlen( $value ) == 0 ) { unset( $input[$key] ); } @@ -543,7 +543,7 @@ function ot_validate_setting( $input, $type, $field_id, $wmpl_id = '' ) { // Unset keys with empty values. foreach( $input as $key => $value ) { - if ( empty( $value ) ) { + if ( empty( $value ) && strlen( $value ) == 0 ) { unset( $input[$key] ); } } @@ -589,7 +589,7 @@ function ot_validate_setting( $input, $type, $field_id, $wmpl_id = '' ) { if ( ! empty( $value ) && ! is_numeric( $value ) && $key !== 'unit' ) { $errors[] = $key; } - if ( empty( $value ) ) { + if ( empty( $value ) && strlen( $value ) == 0 ) { unset( $input[$key] ); } } @@ -647,7 +647,7 @@ function ot_validate_setting( $input, $type, $field_id, $wmpl_id = '' ) { $input[0] = sanitize_text_field( $input[0] ); // No value; set to empty - if ( empty( $input[0] ) && empty( $input[1] ) ) { + if ( empty( $input[0] ) && strlen( $input[0] ) == 0 && empty( $input[1] ) ) { $input = ''; } @@ -658,7 +658,7 @@ function ot_validate_setting( $input, $type, $field_id, $wmpl_id = '' ) { if ( ! empty( $value ) && ! is_numeric( $value ) && $key !== 'unit' ) { $errors[] = $key; } - if ( empty( $value ) ) { + if ( empty( $value ) && strlen( $value ) == 0 ) { unset( $input[$key] ); } } @@ -3507,10 +3507,11 @@ function ot_insert_css_with_markers( $field_id = '', $insertion = '', $meta = fa // Measurement if ( $option_type == 'measurement' ) { - + $unit = ! empty( $value[1] ) ? $value[1] : 'px'; + // Set $value with measurement properties - if ( isset( $value[0] ) && isset( $value[1] ) ) - $value = $value[0].$value[1]; + if ( isset( $value[0] ) && strlen( $value[0] ) > 0 ) + $value = $value[0].$unit; // Border } else if ( $option_type == 'border' ) { @@ -3518,7 +3519,7 @@ function ot_insert_css_with_markers( $field_id = '', $insertion = '', $meta = fa $unit = ! empty( $value['unit'] ) ? $value['unit'] : 'px'; - if ( ! empty( $value['width'] ) ) + if ( isset( $value['width'] ) && strlen( $value['width'] ) > 0 ) $border[] = $value['width'].$unit; if ( ! empty( $value['style'] ) ) @@ -3542,10 +3543,10 @@ function ot_insert_css_with_markers( $field_id = '', $insertion = '', $meta = fa $unit = ! empty( $value['unit'] ) ? $value['unit'] : 'px'; - if ( ! empty( $value['width'] ) ) + if ( isset( $value['width'] ) && strlen( $value['width'] ) > 0 ) $dimension[] = $value['width'].$unit; - if ( ! empty( $value['height'] ) ) + if ( isset( $value['height'] ) && strlen( $value['height'] ) > 0 ) $dimension[] = $value['height'].$unit; // Set $value with dimension properties or empty string @@ -3557,16 +3558,16 @@ function ot_insert_css_with_markers( $field_id = '', $insertion = '', $meta = fa $unit = ! empty( $value['unit'] ) ? $value['unit'] : 'px'; - if ( ! empty( $value['top'] ) ) + if ( isset( $value['top'] ) && strlen( $value['top'] ) > 0 ) $spacing[] = $value['top'].$unit; - if ( ! empty( $value['right'] ) ) + if ( isset( $value['right'] ) && strlen( $value['right'] ) > 0 ) $spacing[] = $value['right'].$unit; - if ( ! empty( $value['bottom'] ) ) + if ( isset( $value['bottom'] ) && strlen( $value['bottom'] ) > 0 ) $spacing[] = $value['bottom'].$unit; - if ( ! empty( $value['left'] ) ) + if ( isset( $value['left'] ) && strlen( $value['left'] ) > 0 ) $spacing[] = $value['left'].$unit; // Set $value with spacing properties or empty string diff --git a/option-tree/includes/ot-functions.php b/option-tree/includes/ot-functions.php index 7dca6c1f..7a39d452 100644 --- a/option-tree/includes/ot-functions.php +++ b/option-tree/includes/ot-functions.php @@ -219,8 +219,25 @@ function ot_wpml_filter( $options, $option_id ) { function ot_load_dynamic_css() { /* don't load in the admin */ - if ( is_admin() ) + if ( is_admin() ) { + return; + } + + /** + * Filter whether or not to enqueue a `dynamic.css` file at the theme level. + * + * By filtering this to `false` OptionTree will not attempt to enqueue any CSS files. + * + * Example: add_filter( 'ot_load_dynamic_css', '__return_false' ); + * + * @since 2.5.5 + * + * @param bool $load_dynamic_css Default is `true`. + * @return bool + */ + if ( false === (bool) apply_filters( 'ot_load_dynamic_css', true ) ) { return; + } /* grab a copy of the paths */ $ot_css_file_paths = get_option( 'ot_css_file_paths', array() ); @@ -238,8 +255,16 @@ function ot_load_dynamic_css() { if ( '' != $path && file_exists( $path ) ) { $parts = explode( '/wp-content', $path ); - + if ( isset( $parts[1] ) ) { + + $sub_parts = explode( '/', $parts[1] ); + + if ( isset( $sub_parts[1] ) && isset( $sub_parts[2] ) ) { + if ( $sub_parts[1] == 'themes' && $sub_parts[2] != get_template() ) { + continue; + } + } $css = set_url_scheme( WP_CONTENT_URL ) . $parts[1]; diff --git a/option-tree/languages/option-tree-et.mo b/option-tree/languages/option-tree-et.mo index 3009b21f..a756f02f 100644 Binary files a/option-tree/languages/option-tree-et.mo and b/option-tree/languages/option-tree-et.mo differ diff --git a/option-tree/languages/option-tree-et.po b/option-tree/languages/option-tree-et.po index 321acafc..e4256d00 100644 --- a/option-tree/languages/option-tree-et.po +++ b/option-tree/languages/option-tree-et.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: OptionTree\n" -"POT-Creation-Date: 2015-04-21 22:11-0800\n" -"PO-Revision-Date: 2015-04-21 22:11-0800\n" +"POT-Creation-Date: 2015-05-01 00:04-0800\n" +"PO-Revision-Date: 2015-05-01 00:04-0800\n" "Last-Translator: Derek Herman \n" "Language-Team: Valen Designs\n" "Language: et_EE\n" @@ -136,7 +136,7 @@ msgstr "Midagi läks valesti. Tabelit %s ei kustutatud." #: ../includes/ot-functions-admin.php:50 ../includes/ot-functions-admin.php:51 #: ../includes/ot-functions-admin.php:169 -#: ../includes/ot-functions-admin.php:193 ../includes/ot-functions.php:363 +#: ../includes/ot-functions-admin.php:193 ../includes/ot-functions.php:388 msgid "Theme Options" msgstr "Teema seaded" @@ -294,7 +294,7 @@ msgstr "%s värvi valija lubab väärtuseid vaid kuueteistkümnendiksüsteemis." #: ../includes/ot-functions-admin.php:846 #: ../includes/ot-functions-docs-page.php:398 -#: ../includes/ot-functions-settings-page.php:170 ../ot-loader.php:782 +#: ../includes/ot-functions-settings-page.php:170 ../ot-loader.php:787 msgid "Send to OptionTree" msgstr "Saada OptionTree-le" @@ -500,7 +500,7 @@ msgid "Dimension" msgstr "Mõõtmed" #: ../includes/ot-functions-admin.php:2430 -#: ../includes/ot-functions-admin.php:5464 +#: ../includes/ot-functions-admin.php:5465 #: ../includes/ot-functions-docs-page.php:168 msgid "Gallery" msgstr "Galerii" @@ -681,7 +681,7 @@ msgstr "Kaks küljendusmenüüd paremal" #: ../includes/ot-functions-admin.php:3261 #: ../includes/ot-functions-admin.php:3317 -#: ../includes/ot-functions-admin.php:5504 +#: ../includes/ot-functions-admin.php:5505 msgid "Link" msgstr "Viide" @@ -714,47 +714,47 @@ msgstr "" "Sisesta link profiilile või lehele sellel sotsiaalmeedia veebilehel. Ära " "unusta lisada lingi ette %s osa." -#: ../includes/ot-functions-admin.php:3754 +#: ../includes/ot-functions-admin.php:3755 #, php-format msgid "Unable to write to file %s." msgstr "" -#: ../includes/ot-functions-admin.php:4024 +#: ../includes/ot-functions-admin.php:4025 msgid "edit" msgstr "muuda" -#: ../includes/ot-functions-admin.php:4025 -#: ../includes/ot-functions-admin.php:4093 +#: ../includes/ot-functions-admin.php:4026 #: ../includes/ot-functions-admin.php:4094 -#: ../includes/ot-functions-admin.php:4256 +#: ../includes/ot-functions-admin.php:4095 #: ../includes/ot-functions-admin.php:4257 -#: ../includes/ot-functions-admin.php:4322 +#: ../includes/ot-functions-admin.php:4258 #: ../includes/ot-functions-admin.php:4323 -#: ../includes/ot-functions-admin.php:4450 +#: ../includes/ot-functions-admin.php:4324 #: ../includes/ot-functions-admin.php:4451 -#: ../includes/ot-functions-admin.php:4603 +#: ../includes/ot-functions-admin.php:4452 #: ../includes/ot-functions-admin.php:4604 +#: ../includes/ot-functions-admin.php:4605 msgid "Edit" msgstr "Muuda" -#: ../includes/ot-functions-admin.php:4027 #: ../includes/ot-functions-admin.php:4028 -#: ../includes/ot-functions-admin.php:4096 +#: ../includes/ot-functions-admin.php:4029 #: ../includes/ot-functions-admin.php:4097 -#: ../includes/ot-functions-admin.php:4259 +#: ../includes/ot-functions-admin.php:4098 #: ../includes/ot-functions-admin.php:4260 -#: ../includes/ot-functions-admin.php:4325 +#: ../includes/ot-functions-admin.php:4261 #: ../includes/ot-functions-admin.php:4326 -#: ../includes/ot-functions-admin.php:4384 +#: ../includes/ot-functions-admin.php:4327 #: ../includes/ot-functions-admin.php:4385 -#: ../includes/ot-functions-admin.php:4453 +#: ../includes/ot-functions-admin.php:4386 #: ../includes/ot-functions-admin.php:4454 -#: ../includes/ot-functions-admin.php:4606 +#: ../includes/ot-functions-admin.php:4455 #: ../includes/ot-functions-admin.php:4607 +#: ../includes/ot-functions-admin.php:4608 msgid "Delete" msgstr "Kustuta" -#: ../includes/ot-functions-admin.php:4034 +#: ../includes/ot-functions-admin.php:4035 msgid "" "Section Title: Displayed as a menu item on the Theme " "Options page." @@ -762,7 +762,7 @@ msgstr "" "Sektsiooni pealkiri: Näidatakse menüü elemendina teema " "valikute lehel." -#: ../includes/ot-functions-admin.php:4042 +#: ../includes/ot-functions-admin.php:4043 msgid "" "Section ID: A unique lower case alphanumeric string, " "underscores allowed." @@ -770,7 +770,7 @@ msgstr "" "Sektsiooni ID: unikaalne väiketähtedega tähtnumbriline " "string, alakriipsud lubatud." -#: ../includes/ot-functions-admin.php:4103 +#: ../includes/ot-functions-admin.php:4104 msgid "" "Label: Displayed as the label of a form element on the " "Theme Options page." @@ -778,8 +778,8 @@ msgstr "" "Nimetus: Näidatakse kui vormi elemendi nimetust teema " "valikute lehel." -#: ../includes/ot-functions-admin.php:4111 -#: ../includes/ot-functions-admin.php:4340 +#: ../includes/ot-functions-admin.php:4112 +#: ../includes/ot-functions-admin.php:4341 msgid "" "ID: A unique lower case alphanumeric string, underscores " "allowed." @@ -787,14 +787,14 @@ msgstr "" "ID: unikaalne väiketähtedega tähtnumbriline string, " "alakriipsud lubatud." -#: ../includes/ot-functions-admin.php:4119 +#: ../includes/ot-functions-admin.php:4120 msgid "" "Type: Choose one of the available option types from the " "dropdown." msgstr "" "Tüüp: vali rippmenüüst üks pakutavatest valiku tüüpidest." -#: ../includes/ot-functions-admin.php:4130 +#: ../includes/ot-functions-admin.php:4131 msgid "" "Description: Enter a detailed description for the users to " "read on the Theme Options page, HTML is allowed. This is also where you " @@ -804,7 +804,7 @@ msgstr "" "saavad lugeda teema valikute lehel. HTML on lubatud. See on ühtlasi ka koht, " "kuhu sisestada tekstibloki ja pealkirjaga tekstibloki valikutüüpide sisu." -#: ../includes/ot-functions-admin.php:4138 +#: ../includes/ot-functions-admin.php:4139 msgid "" "Choices: This will only affect the following option types: " "Checkbox, Radio, Select & Select Image." @@ -812,21 +812,21 @@ msgstr "" "Valikud: mõjutab vaid järgnevaid valikutüüpe: valikkastid, " "raadiokastid, rippvalik ja pildi valik." -#: ../includes/ot-functions-admin.php:4143 +#: ../includes/ot-functions-admin.php:4144 msgid "Add Choice" msgstr "Lisa valik" -#: ../includes/ot-functions-admin.php:4149 +#: ../includes/ot-functions-admin.php:4150 msgid "" "Settings: This will only affect the List Item option type." msgstr "Sätted: mõjutab vaid nimekirja elemendi valikutüüpi." -#: ../includes/ot-functions-admin.php:4154 +#: ../includes/ot-functions-admin.php:4155 #: ../includes/ot-functions-settings-page.php:93 msgid "Add Setting" msgstr "Lisa säte" -#: ../includes/ot-functions-admin.php:4160 +#: ../includes/ot-functions-admin.php:4161 msgid "" "Standard: Setting the standard value for your option only " "works for some option types. Read the OptionTree->Documentation " @@ -836,7 +836,7 @@ msgstr "" "valikutüübile. Lisainfot leiad OptionTree->Dokumentatsioon " "lehelt." -#: ../includes/ot-functions-admin.php:4168 +#: ../includes/ot-functions-admin.php:4169 msgid "" "Rows: Enter a numeric value for the number of rows in your " "textarea. This will only affect the following option types: CSS, Textarea, & " @@ -846,7 +846,7 @@ msgstr "" "tekstiväljal. Mõjutab vaid järgnevaid valikutüüpe: CSS, tekstiväli ja lihtne " "tekstiväli." -#: ../includes/ot-functions-admin.php:4176 +#: ../includes/ot-functions-admin.php:4177 msgid "" "Post Type: Add a comma separated list of post type like " "'post,page'. This will only affect the following option types: Custom Post " @@ -857,7 +857,7 @@ msgstr "" "valikutüüpe: enda loodud postitüübi valikkastid ja enda loodud postitüübi " "rippvalik." -#: ../includes/ot-functions-admin.php:4184 +#: ../includes/ot-functions-admin.php:4185 msgid "" "Taxonomy: Add a comma separated list of any registered " "taxonomy like 'category,post_tag'. This will only affect the following " @@ -867,7 +867,7 @@ msgstr "" "taksonoomiatest nagu 'category,post_tag'. See mõjutab vaid järgnevaid " "valikutüüpe: taksonoomia valikukastid & taksonoomia rippvalik." -#: ../includes/ot-functions-admin.php:4192 +#: ../includes/ot-functions-admin.php:4193 msgid "" "Min, Max, & Step: Add a comma separated list of options in " "the following format 0,100,1 (slide from 0-100 in " @@ -880,12 +880,12 @@ msgstr "" "code> intervalliga 1 ). Need kolm väärtust näitavad miinimumi, " "maksimumi ja astme valikuid ning mõjutavad vaid numbriliuguri valikutüüpi." -#: ../includes/ot-functions-admin.php:4200 +#: ../includes/ot-functions-admin.php:4201 msgid "CSS Class: Add and optional class to this option type." msgstr "" "CSS klass: Soovi korral lisa sellele valikutüübile klass." -#: ../includes/ot-functions-admin.php:4208 +#: ../includes/ot-functions-admin.php:4209 #, php-format msgid "" "Condition: Add a comma separated list (no spaces) of " @@ -898,7 +898,7 @@ msgstr "" "tühjaks. Nendes näidetes on value kohahoidja teie tingimustele, " "mis võivad olla kujul %s." -#: ../includes/ot-functions-admin.php:4216 +#: ../includes/ot-functions-admin.php:4217 msgid "" "Operator: Choose the logical operator to compute the result " "of the conditions." @@ -906,30 +906,30 @@ msgstr "" "Operaator: vali loogiline operaator, millega arvutada välja " "tingimuste tulemus." -#: ../includes/ot-functions-admin.php:4219 +#: ../includes/ot-functions-admin.php:4220 #: ../includes/ot-functions-docs-page.php:111 #: ../includes/ot-functions-docs-page.php:378 msgid "and" msgstr "ja" -#: ../includes/ot-functions-admin.php:4220 +#: ../includes/ot-functions-admin.php:4221 msgid "or" msgstr "või" -#: ../includes/ot-functions-admin.php:4266 +#: ../includes/ot-functions-admin.php:4267 #: ../includes/ot-functions-docs-page.php:29 msgid "Label" msgstr "Nimetus" -#: ../includes/ot-functions-admin.php:4276 +#: ../includes/ot-functions-admin.php:4277 msgid "Value" msgstr "Väärtus" -#: ../includes/ot-functions-admin.php:4286 +#: ../includes/ot-functions-admin.php:4287 msgid "Image Source (Radio Image only)" msgstr "Pildi allikas ( ainult pildiga raadiovaliku jaoks )" -#: ../includes/ot-functions-admin.php:4332 +#: ../includes/ot-functions-admin.php:4333 msgid "" "Title: Displayed as a contextual help menu item on the " "Theme Options page." @@ -937,7 +937,7 @@ msgstr "" "Pealkiri: kuvatakse kui kontekstipõhine abimenüü element " "teema valikute lehel." -#: ../includes/ot-functions-admin.php:4348 +#: ../includes/ot-functions-admin.php:4349 msgid "" "Content: Enter the HTML content about this contextual help " "item displayed on the Theme Option page for end users to read." @@ -945,57 +945,57 @@ msgstr "" "Sisu: sisesta HTML sisu selle kontekstipõhise elemendi " "kohta. Näidatakse teema valikute lehel lõppkasutajatele." -#: ../includes/ot-functions-admin.php:4379 +#: ../includes/ot-functions-admin.php:4380 msgid "Layout" msgstr "Paigutus" -#: ../includes/ot-functions-admin.php:4381 #: ../includes/ot-functions-admin.php:4382 +#: ../includes/ot-functions-admin.php:4383 msgid "Activate" msgstr "Aktiveeri" -#: ../includes/ot-functions-admin.php:4418 ../includes/ot-meta-box-api.php:231 +#: ../includes/ot-functions-admin.php:4419 ../includes/ot-meta-box-api.php:231 #: ../includes/ot-settings-api.php:610 msgid "Title" msgstr "Pealkiri" -#: ../includes/ot-functions-admin.php:4758 +#: ../includes/ot-functions-admin.php:4759 msgid "New Layout" msgstr "Uus paigutus" -#: ../includes/ot-functions-admin.php:5513 +#: ../includes/ot-functions-admin.php:5514 msgid "Link URL" msgstr "Viide" -#: ../includes/ot-functions-admin.php:5520 +#: ../includes/ot-functions-admin.php:5521 msgid "Link Title" msgstr "Lingi pealkiri" -#: ../includes/ot-functions-admin.php:5550 +#: ../includes/ot-functions-admin.php:5551 msgid "Quote" msgstr "Tsitaat" -#: ../includes/ot-functions-admin.php:5559 +#: ../includes/ot-functions-admin.php:5560 msgid "Source Name (ex. author, singer, actor)" msgstr "Allika nimi (nt autor, laulja, näitleja)" -#: ../includes/ot-functions-admin.php:5566 +#: ../includes/ot-functions-admin.php:5567 msgid "Source URL" msgstr "Allika URL" -#: ../includes/ot-functions-admin.php:5573 +#: ../includes/ot-functions-admin.php:5574 msgid "Source Title (ex. book, song, movie)" msgstr "Allika pealkiri (nt raamat, laul, film)" -#: ../includes/ot-functions-admin.php:5580 +#: ../includes/ot-functions-admin.php:5581 msgid "Source Date" msgstr "Allika kuupäev" -#: ../includes/ot-functions-admin.php:5610 +#: ../includes/ot-functions-admin.php:5611 msgid "Video" msgstr "Video" -#: ../includes/ot-functions-admin.php:5619 +#: ../includes/ot-functions-admin.php:5620 #, php-format msgid "" "Embed video from services like Youtube, Vimeo, or Hulu. You can find a list " @@ -1006,16 +1006,16 @@ msgstr "" "Nimekirja toetatud oEmbed veebilehtedest leiad %1$s. Teine variant oleks " "kasutada sisse ehitatud lühikoodi %2$s." -#: ../includes/ot-functions-admin.php:5619 -#: ../includes/ot-functions-admin.php:5658 +#: ../includes/ot-functions-admin.php:5620 +#: ../includes/ot-functions-admin.php:5659 msgid "Wordpress Codex" msgstr "Wordpress Codex" -#: ../includes/ot-functions-admin.php:5649 +#: ../includes/ot-functions-admin.php:5650 msgid "Audio" msgstr "Audio" -#: ../includes/ot-functions-admin.php:5658 +#: ../includes/ot-functions-admin.php:5659 #, php-format msgid "" "Embed audio from services like SoundCloud and Rdio. You can find a list of " diff --git a/option-tree/languages/option-tree.po b/option-tree/languages/option-tree.po index e4ba6258..fb7fa044 100644 --- a/option-tree/languages/option-tree.po +++ b/option-tree/languages/option-tree.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: OptionTree\n" -"POT-Creation-Date: 2015-04-21 22:10-0800\n" -"PO-Revision-Date: 2015-04-21 22:10-0800\n" +"POT-Creation-Date: 2015-05-01 00:04-0800\n" +"PO-Revision-Date: 2015-05-01 00:04-0800\n" "Last-Translator: Derek Herman \n" "Language-Team: Valen Designs\n" "Language: en\n" @@ -117,7 +117,7 @@ msgstr "" #: ../includes/ot-functions-admin.php:50 ../includes/ot-functions-admin.php:51 #: ../includes/ot-functions-admin.php:169 -#: ../includes/ot-functions-admin.php:193 ../includes/ot-functions.php:363 +#: ../includes/ot-functions-admin.php:193 ../includes/ot-functions.php:388 msgid "Theme Options" msgstr "" @@ -272,7 +272,7 @@ msgstr "" #: ../includes/ot-functions-admin.php:846 #: ../includes/ot-functions-docs-page.php:398 -#: ../includes/ot-functions-settings-page.php:170 ../ot-loader.php:782 +#: ../includes/ot-functions-settings-page.php:170 ../ot-loader.php:787 msgid "Send to OptionTree" msgstr "" @@ -478,7 +478,7 @@ msgid "Dimension" msgstr "" #: ../includes/ot-functions-admin.php:2430 -#: ../includes/ot-functions-admin.php:5464 +#: ../includes/ot-functions-admin.php:5465 #: ../includes/ot-functions-docs-page.php:168 msgid "Gallery" msgstr "" @@ -659,7 +659,7 @@ msgstr "" #: ../includes/ot-functions-admin.php:3261 #: ../includes/ot-functions-admin.php:3317 -#: ../includes/ot-functions-admin.php:5504 +#: ../includes/ot-functions-admin.php:5505 msgid "Link" msgstr "" @@ -690,133 +690,133 @@ msgid "" "the %s part to the front of the link." msgstr "" -#: ../includes/ot-functions-admin.php:3754 +#: ../includes/ot-functions-admin.php:3755 #, php-format msgid "Unable to write to file %s." msgstr "" -#: ../includes/ot-functions-admin.php:4024 +#: ../includes/ot-functions-admin.php:4025 msgid "edit" msgstr "" -#: ../includes/ot-functions-admin.php:4025 -#: ../includes/ot-functions-admin.php:4093 +#: ../includes/ot-functions-admin.php:4026 #: ../includes/ot-functions-admin.php:4094 -#: ../includes/ot-functions-admin.php:4256 +#: ../includes/ot-functions-admin.php:4095 #: ../includes/ot-functions-admin.php:4257 -#: ../includes/ot-functions-admin.php:4322 +#: ../includes/ot-functions-admin.php:4258 #: ../includes/ot-functions-admin.php:4323 -#: ../includes/ot-functions-admin.php:4450 +#: ../includes/ot-functions-admin.php:4324 #: ../includes/ot-functions-admin.php:4451 -#: ../includes/ot-functions-admin.php:4603 +#: ../includes/ot-functions-admin.php:4452 #: ../includes/ot-functions-admin.php:4604 +#: ../includes/ot-functions-admin.php:4605 msgid "Edit" msgstr "" -#: ../includes/ot-functions-admin.php:4027 #: ../includes/ot-functions-admin.php:4028 -#: ../includes/ot-functions-admin.php:4096 +#: ../includes/ot-functions-admin.php:4029 #: ../includes/ot-functions-admin.php:4097 -#: ../includes/ot-functions-admin.php:4259 +#: ../includes/ot-functions-admin.php:4098 #: ../includes/ot-functions-admin.php:4260 -#: ../includes/ot-functions-admin.php:4325 +#: ../includes/ot-functions-admin.php:4261 #: ../includes/ot-functions-admin.php:4326 -#: ../includes/ot-functions-admin.php:4384 +#: ../includes/ot-functions-admin.php:4327 #: ../includes/ot-functions-admin.php:4385 -#: ../includes/ot-functions-admin.php:4453 +#: ../includes/ot-functions-admin.php:4386 #: ../includes/ot-functions-admin.php:4454 -#: ../includes/ot-functions-admin.php:4606 +#: ../includes/ot-functions-admin.php:4455 #: ../includes/ot-functions-admin.php:4607 +#: ../includes/ot-functions-admin.php:4608 msgid "Delete" msgstr "" -#: ../includes/ot-functions-admin.php:4034 +#: ../includes/ot-functions-admin.php:4035 msgid "" "Section Title: Displayed as a menu item on the Theme " "Options page." msgstr "" -#: ../includes/ot-functions-admin.php:4042 +#: ../includes/ot-functions-admin.php:4043 msgid "" "Section ID: A unique lower case alphanumeric string, " "underscores allowed." msgstr "" -#: ../includes/ot-functions-admin.php:4103 +#: ../includes/ot-functions-admin.php:4104 msgid "" "Label: Displayed as the label of a form element on the " "Theme Options page." msgstr "" -#: ../includes/ot-functions-admin.php:4111 -#: ../includes/ot-functions-admin.php:4340 +#: ../includes/ot-functions-admin.php:4112 +#: ../includes/ot-functions-admin.php:4341 msgid "" "ID: A unique lower case alphanumeric string, underscores " "allowed." msgstr "" -#: ../includes/ot-functions-admin.php:4119 +#: ../includes/ot-functions-admin.php:4120 msgid "" "Type: Choose one of the available option types from the " "dropdown." msgstr "" -#: ../includes/ot-functions-admin.php:4130 +#: ../includes/ot-functions-admin.php:4131 msgid "" "Description: Enter a detailed description for the users to " "read on the Theme Options page, HTML is allowed. This is also where you " "enter content for both the Textblock & Textblock Titled option types." msgstr "" -#: ../includes/ot-functions-admin.php:4138 +#: ../includes/ot-functions-admin.php:4139 msgid "" "Choices: This will only affect the following option types: " "Checkbox, Radio, Select & Select Image." msgstr "" -#: ../includes/ot-functions-admin.php:4143 +#: ../includes/ot-functions-admin.php:4144 msgid "Add Choice" msgstr "" -#: ../includes/ot-functions-admin.php:4149 +#: ../includes/ot-functions-admin.php:4150 msgid "" "Settings: This will only affect the List Item option type." msgstr "" -#: ../includes/ot-functions-admin.php:4154 +#: ../includes/ot-functions-admin.php:4155 #: ../includes/ot-functions-settings-page.php:93 msgid "Add Setting" msgstr "" -#: ../includes/ot-functions-admin.php:4160 +#: ../includes/ot-functions-admin.php:4161 msgid "" "Standard: Setting the standard value for your option only " "works for some option types. Read the OptionTree->Documentation " "for more information on which ones." msgstr "" -#: ../includes/ot-functions-admin.php:4168 +#: ../includes/ot-functions-admin.php:4169 msgid "" "Rows: Enter a numeric value for the number of rows in your " "textarea. This will only affect the following option types: CSS, Textarea, & " "Textarea Simple." msgstr "" -#: ../includes/ot-functions-admin.php:4176 +#: ../includes/ot-functions-admin.php:4177 msgid "" "Post Type: Add a comma separated list of post type like " "'post,page'. This will only affect the following option types: Custom Post " "Type Checkbox, & Custom Post Type Select." msgstr "" -#: ../includes/ot-functions-admin.php:4184 +#: ../includes/ot-functions-admin.php:4185 msgid "" "Taxonomy: Add a comma separated list of any registered " "taxonomy like 'category,post_tag'. This will only affect the following " "option types: Taxonomy Checkbox, & Taxonomy Select." msgstr "" -#: ../includes/ot-functions-admin.php:4192 +#: ../includes/ot-functions-admin.php:4193 msgid "" "Min, Max, & Step: Add a comma separated list of options in " "the following format 0,100,1 (slide from 0-100 in " @@ -825,11 +825,11 @@ msgid "" "type." msgstr "" -#: ../includes/ot-functions-admin.php:4200 +#: ../includes/ot-functions-admin.php:4201 msgid "CSS Class: Add and optional class to this option type." msgstr "" -#: ../includes/ot-functions-admin.php:4208 +#: ../includes/ot-functions-admin.php:4209 #, php-format msgid "" "Condition: Add a comma separated list (no spaces) of " @@ -838,98 +838,98 @@ msgid "" "placeholder for your condition, which can be in the form of %s." msgstr "" -#: ../includes/ot-functions-admin.php:4216 +#: ../includes/ot-functions-admin.php:4217 msgid "" "Operator: Choose the logical operator to compute the result " "of the conditions." msgstr "" -#: ../includes/ot-functions-admin.php:4219 +#: ../includes/ot-functions-admin.php:4220 #: ../includes/ot-functions-docs-page.php:111 #: ../includes/ot-functions-docs-page.php:378 msgid "and" msgstr "" -#: ../includes/ot-functions-admin.php:4220 +#: ../includes/ot-functions-admin.php:4221 msgid "or" msgstr "" -#: ../includes/ot-functions-admin.php:4266 +#: ../includes/ot-functions-admin.php:4267 #: ../includes/ot-functions-docs-page.php:29 msgid "Label" msgstr "" -#: ../includes/ot-functions-admin.php:4276 +#: ../includes/ot-functions-admin.php:4277 msgid "Value" msgstr "" -#: ../includes/ot-functions-admin.php:4286 +#: ../includes/ot-functions-admin.php:4287 msgid "Image Source (Radio Image only)" msgstr "" -#: ../includes/ot-functions-admin.php:4332 +#: ../includes/ot-functions-admin.php:4333 msgid "" "Title: Displayed as a contextual help menu item on the " "Theme Options page." msgstr "" -#: ../includes/ot-functions-admin.php:4348 +#: ../includes/ot-functions-admin.php:4349 msgid "" "Content: Enter the HTML content about this contextual help " "item displayed on the Theme Option page for end users to read." msgstr "" -#: ../includes/ot-functions-admin.php:4379 +#: ../includes/ot-functions-admin.php:4380 msgid "Layout" msgstr "" -#: ../includes/ot-functions-admin.php:4381 #: ../includes/ot-functions-admin.php:4382 +#: ../includes/ot-functions-admin.php:4383 msgid "Activate" msgstr "" -#: ../includes/ot-functions-admin.php:4418 ../includes/ot-meta-box-api.php:231 +#: ../includes/ot-functions-admin.php:4419 ../includes/ot-meta-box-api.php:231 #: ../includes/ot-settings-api.php:610 msgid "Title" msgstr "" -#: ../includes/ot-functions-admin.php:4758 +#: ../includes/ot-functions-admin.php:4759 msgid "New Layout" msgstr "" -#: ../includes/ot-functions-admin.php:5513 +#: ../includes/ot-functions-admin.php:5514 msgid "Link URL" msgstr "" -#: ../includes/ot-functions-admin.php:5520 +#: ../includes/ot-functions-admin.php:5521 msgid "Link Title" msgstr "" -#: ../includes/ot-functions-admin.php:5550 +#: ../includes/ot-functions-admin.php:5551 msgid "Quote" msgstr "" -#: ../includes/ot-functions-admin.php:5559 +#: ../includes/ot-functions-admin.php:5560 msgid "Source Name (ex. author, singer, actor)" msgstr "" -#: ../includes/ot-functions-admin.php:5566 +#: ../includes/ot-functions-admin.php:5567 msgid "Source URL" msgstr "" -#: ../includes/ot-functions-admin.php:5573 +#: ../includes/ot-functions-admin.php:5574 msgid "Source Title (ex. book, song, movie)" msgstr "" -#: ../includes/ot-functions-admin.php:5580 +#: ../includes/ot-functions-admin.php:5581 msgid "Source Date" msgstr "" -#: ../includes/ot-functions-admin.php:5610 +#: ../includes/ot-functions-admin.php:5611 msgid "Video" msgstr "" -#: ../includes/ot-functions-admin.php:5619 +#: ../includes/ot-functions-admin.php:5620 #, php-format msgid "" "Embed video from services like Youtube, Vimeo, or Hulu. You can find a list " @@ -937,16 +937,16 @@ msgid "" "built-in %2$s shortcode." msgstr "" -#: ../includes/ot-functions-admin.php:5619 -#: ../includes/ot-functions-admin.php:5658 +#: ../includes/ot-functions-admin.php:5620 +#: ../includes/ot-functions-admin.php:5659 msgid "Wordpress Codex" msgstr "" -#: ../includes/ot-functions-admin.php:5649 +#: ../includes/ot-functions-admin.php:5650 msgid "Audio" msgstr "" -#: ../includes/ot-functions-admin.php:5658 +#: ../includes/ot-functions-admin.php:5659 #, php-format msgid "" "Embed audio from services like SoundCloud and Rdio. You can find a list of " diff --git a/option-tree/ot-loader.php b/option-tree/ot-loader.php index a3f71231..148da156 100644 --- a/option-tree/ot-loader.php +++ b/option-tree/ot-loader.php @@ -3,7 +3,7 @@ * Plugin Name: OptionTree * Plugin URI: https://github.com/valendesigns/option-tree/ * Description: Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes. - * Version: 2.5.4 + * Version: 2.5.5 * Author: Derek Herman * Author URI: http://valendesigns.com * License: GPLv3 @@ -178,7 +178,7 @@ private function constants() { /** * Current Version number. */ - define( 'OT_VERSION', '2.5.4' ); + define( 'OT_VERSION', '2.5.5' ); /** * For developers: Theme mode. @@ -689,7 +689,12 @@ public function add_social_links() { * @since 2.2.0 */ public function shortcode( $settings, $post ) { - + global $pagenow; + + if ( in_array( $pagenow, array( 'upload.php', 'customize.php' ) ) ) { + return $settings; + } + // Set the OptionTree post ID if ( ! is_object( $post ) ) { $post_id = isset( $_GET['post'] ) ? $_GET['post'] : ( isset( $_GET['post_ID'] ) ? $_GET['post_ID'] : 0 ); diff --git a/option-tree/readme.txt b/option-tree/readme.txt index 648ed460..7df323fc 100644 --- a/option-tree/readme.txt +++ b/option-tree/readme.txt @@ -4,7 +4,7 @@ Donate link: http://bit.ly/NuXI3T Tags: options, theme options, meta boxes Requires at least: 3.8 Tested up to: 4.2 -Stable tag: 2.5.4 +Stable tag: 2.5.5 License: GPLv3 Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes. @@ -126,6 +126,12 @@ The most likely scenario is your theme already has OptionTree installed in Theme == Changelog == += 2.5.5 = +* Hotfix - Allow a `0` value to be saved with certain option types. Contributors via github @BassemN. +* Hotfix - Stop media from being attached to the OptionTree post type when uploaded from the media manager or customizer. Contributors via github @earnjam, and @valendesigns. +* Hotfix - Added filter `ot_load_dynamic_css` to explicitly turn the feature off if desired. +* Hotfix - Stopped `dynamic.css` created with other themes from being loaded elsewhere. + = 2.5.4 = * Hotfix - Support for WordPress 4.2 term splitting. * Hotfix - Removed any potential XSS security issues with `add_query_arg` by escaping it.