upthemes / upthemes-framework Goto Github PK
View Code? Open in Web Editor NEWA simple, extensible WordPress theme options framework with Theme Customizer support.
Home Page: http://upthemes.com
License: GNU General Public License v2.0
A simple, extensible WordPress theme options framework with Theme Customizer support.
Home Page: http://upthemes.com
License: GNU General Public License v2.0
Maybe I'm doing it wrong, that's entirely possible, but I've tried everything I can think of. I'm using WP 3.4.1. I'm trying to add multiple image fields to the same tab/section. When I click the "select or upload image" button, find the image I want from the media library, and hit "insert into post" it updates the last item in the list of image fields instead of the one I selected. Also, FWIW I liked the old image upload interface much better...
Something is wrong, i got this error with newest upthemes-framwrork.
Warning: Invalid argument supplied for foreach() in options\library\custom.php on line 144
Currently, custom image fields are unsupported. These need to be added in such a way that they can easily be previewed without a page refresh.
I am trying to create 1 option page with only necessary options for clients and i dont want to show them default WordPress settings panels but clients need to edit Site Title and Tagline..
Is there any chance to edit Site Title and Tagline from UpThemes Framework settings? Basically those are just textboxes :S
I tried adding the image option to the Theme Customizer when I first implemented the TC stuff but for some reason the image options don't save properly from the Theme Customizer. Need to add this in.
Reference Old School Issue #5. Some framework fixes are necessary to resolve that issue; namely:
We need to add the ability to turn options on or off in the Theme Customizer. This should be a part of the options array.
If the array item does not exist, the option should not be present in the Theme Customizer. If the array item exists, then we should add the option to the Customizer.
I just noticed that when I export the settings, the code contained in the generated text file is a little different resulting in an error when you try to import it back.
Here is an example,
From the option panel:
cmFkaXVtX3RoZW1lc19idXNieX5+
bG9nb3xodHRwOi8vMTkyLjE2OC4xLjEzMy9UaGVtZURldmVsb3BtZW50L1dvcmRwcmVzcy9SYWRpdW1UaGVtZXMvQWdlbmNpL2FnZW5jaS10aGVtZXRlc3QtdW5pdC93cC1jb250ZW50L3RoZW1lcy9idXNieTEvaW1nL2xvZ28ucG5nfHxzbGlkZXJ8dmlzaWJsZXx8c2xpZGVyX3RpbWVvdXR8MzAwMA==
From the text file:
cmFkaXVtX3RoZW1lc19idXNieX5 bG9nb3xodHRwOi8vMTkyLjE2OC4xLjEzMy9UaGVtZURldmVsb3BtZW50L1dvcmRwcmVzcy9SYWRpdW1UaGVtZXMvQWdlbmNpL2FnZW5jaS10aGVtZXRlc3QtdW5pdC93cC1jb250ZW50L3RoZW1lcy9idXNieTEvaW1nL2xvZ28ucG5nfHxzbGlkZXJ8dmlzaWJsZXx8c2xpZGVyX3RpbWVvdXR8MzAwMA==
Notice the missing + in the first line of the text file?
I would appreciated some help getting to the bottom of this.
Thanks.
There is no support for child themes
We need to document the functions in the framework for easy XREF output.
Hi there,
I'm trying to make a couple of widgetized sections dynamic based on chosen options. I have bootstrapped the framework at the top of the functions.php file and I have globalized $up_options object variable, but I cannot use it and I get a "Trying to get property of non-object" notice.
How do I solve this issue?
Add inline PHPDOC comments to entire framework.
$up_options -> {k} = $v;
Had to remove the $ before the k to get the framework to work on my site. The framework works fine on other themes on the same site on the same server, just not this specific theme I'm working on. I'm sure it's something stupid with my theme but I have no idea what.
would be really nice if we could add a filter to the theme options menu slug,
and also replicate this with the sub menu pages hash tags.
its a really great options framework, but it really difficult to adjust these small details (im currently rremoving the action, then creating another function thats identical but with different menu slugs)
(id do this myself and pull/fork whatever, but im new to git so will learn the ropes before doing that)
Currently, we use a third-party image uploader with a custom image gallery. Images should be handled through the standard media uploader and attached by attachment ID rather than image URL.
When the framework files are placed in the child theme, it enques some of the js files based on the parent theme.
I recommend replacing the get_bloginfo function with the get_stylesheet_directory_uri() function...it defaults the parent theme, when the child theme doesn't exist.
wp_enqueue_script('jquery-ui-slider', get_bloginfo('template_directory').'/admin/js/jquery.ui.slider.js', array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-mouse'));
wp_enqueue_style('up-slider', get_bloginfo('template_directory').'/admin/css/ui-themes/smoothness/style.css');
http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri
Framework needs fully formed phpDoc-compliant inline documentation, in preparation for php Xref docs.
Each custom selector should be able to be added/deleted without saving the page and reloading.
Why not transition away from get_option to get_theme_mod? I'd rather prefer that API and save yourself some code. ;)
I'm working on a site where I want to use my own font that I made, have installed cufon into the code, but am finding it overwritten by the Typography part of upthemes framework. Is there an easy way to disable it? Adding a cufon support option would also be a lovely improvement. Thanks!
Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in ...\admin\library\engines\typography-engine.php on line 76
1- How do you make the tabs show vertical like they are in your video (part 2 of 3)? I have several tabs and it looks, to me, bad when the tabs wrap to a second line.
2- Do you have a sample options file with all the copions setup? For example, the page/post drop down lists, etc?
3- Is there a reason the example.txt file is misson closing comment tags?
4- On step at this page: http://upthemes.com/upthemes-framework/ the closing comma is missing for the theme_color_scheme=> array.
5- In the 3 part help videos...they do not match the current configuration, is that correct?
Hi Guys,
Love the upthemes framework :)
I have been working with it for some time now, but recently I have stumbled across one main issue I have not been able to resolve myself and hoping for some assistance.
When I import the theme options I am getting some strange results.
After I import the theme options, I get the following javascript error.
"A is not defined"
Looking in the code I see all font slider values are set to "A" .. the first letter in "Array"
/* Font Size Slider */
$( "#font_h4-font-size" ).slider({
range: "min",
value: A,
Also the actual css selectors in the font css are all
A {
font-family:Arial;
}
The same thing is happening with all elements that outputs an array instead of string. Like the repeatable text field. After an import the default values are gone and there is only one text input with the value set to "Array"
I have done some digging to try and see what the cause is and also tried to fix it but had no luck unfortunately.
It appears to be that when an import is done any value that was an array before (checkbox, text_list, fonts etc) will get its value set as a string of "Array" instead of the actual array values after the "$new_options" is created.
I managed to work around this so I dont get any errors by adding a check to import-export.php
if($v):
$encoded .= $k.'|'.$v.'||';
endif;
To
if($v && !is_array($v)):
$encoded .= $k.'|'.$v.'||';
endif;
Now when I import the settings, I dont get any errors as all array values are ignored and when I save for the first time, it adds the default values. Obviously not ideal but a workaround for now, so things dont completely break.
I really wanted to try fix this and provide the solution, but after much digging, I just could not figure it out, so over to you guys. Hopefully you can provide a fix for it.
Many thanks,
Andy
in admin/library/options/options.php line 319:
Hide Gallery
replace with:
<?php _e("Hide Gallery","upfw"); ?>
in admin/library/options/options.php line 335:
Select from the UpThemes Gallery
replace with:
<?php _e("Select from the UpThemes Gallery","upfw"); ?>
Allright, so I have set up the theme options, created and edited the options and changed them in the wordpress but how do I output them on the page?
I find generally settings_1.php file to see all the options???
Just came across this error/bug while testing out the master branch
Fatal error: Cannot use object of type WP_Error as array in /Wordpress/wp-content/themes/twentyeleven/admin/library/engines/typography-engine.php on line 170
I can get Text Options and Image uploads to work and output on my site just fine, but I'm having a little trouble with what code and where I need to put it for the Color Picker. How would I go about doing that? For instance, the link color. What do I need to do to get that to work. I've got it showing up on my options panel, I just need to know how to output it.
(I hope what I'm asking makes sense)
The biggest gripe I have always had with the UpThemes Framework is the fact that all paths are hardcoded, which means that you must place the admin
, theme-options
and other folders within the template directory.
I would much rather hide all the back-end code away into a separate folder.
The folder structure of the themes I develop is as follows:
/CustomThemeName
/css/
/js/
/img/
/includes/
Now, with UpThemes, one must add admin
, theme-options
and since the latest iteration, library
and images
.
Would it be possible to define the path variables in the admin.php file once and have it reflect across the system?
For instance,
define(UPTHEMES_INSTALL_PATH, TEMPLATEPATH. '/includes/admin/');
define(UPTHEMES_THEME_OPTIONS, TEMPLATEPATH. '/includes/theme-options/');
define(UPTHEMES_THEME_LIBRARY, TEMPLATEPATH. '/includes/library/');
define(UPTHEMES_THEME_IMAGES, TEMPLATEPATH. '/includes/admin/images');
Instead of using the STYLESHEETPATH and TEMPLATEPATH variables repeatedly throughout (which makes moving the files impossible), just define the setup directory in the start and use the custom variables for including/manipulating files.
How does it sound? Cheers.
I thought the framework use to have this but I don't see it anymore.
It would be great to be able to hook into some of the functions to add in your own custom field types needed.
I would be willing to take a stab at it or at least help.
I just upgraded a site to WordPress 3.3 and the image upload no longer works.
I know WP changed some things with the media uploader, so I'm guessing it will be an easy fix. . .
I'm looking into it for my own sake, but thought I would post here so you could check it out as well.
Thanks,
Jason
Just added latest version to TwentyEleven : LiftUX-UpThemes-Framework-v2.0.1-41-g8ed7bb6
on a MultiSite WordPress(obviusly) installation and as soon as I write:
* Bootstrap the Theme Options Framework
*/
if( file_exists(get_template_directory().'/options/options.php') )
include_once(get_template_directory().'/options/options.php');
/**
* Set up General Options
*/
if( file_exists(get_template_directory().'/theme-options.php') )
include_once(get_template_directory().'/theme-options.php');
At the beginning of my functions.php here it is the error that I receive:
Warning: Invalid argument supplied for foreach() in /home/maiscami/public_html/wp-content/themes/camilliani/options/library/options-register.php on line 207
Warning: Cannot modify header information - headers already sent by (output started at /home/maiscami/public_html/wp-content/themes/camilliani/options/library/options-register.php:207) in /home/maiscami/public_html/wp-includes/option.php on line 563
Warning: Cannot modify header information - headers already sent by (output started at /home/maiscami/public_html/wp-content/themes/camilliani/options/library/options-register.php:207) in /home/maiscami/public_html/wp-includes/option.php on line 564
I followed this guide: http://upthemes.com/upthemes-framework/ and renamed
theme-options-example.txt
in :
theme-options.php
just forked the repo to find the master or the rest of the branches are not actually a working framework?
whats wrong here?
i have the timelaph theme which has a working copy, both have the same version number 2.0.2
Make the custom typography selectors customizable by clicking and editing them. Simple inline text field editor will do.
Hi, a great framework! How can I activate checkbox ("type" => "checkbox")? When I type this nothing shows up in my dashboard theme options. Thank you!
I'm not able to integrate UpTheme Framework with Gallery Theme. Please Help. I tried all tutorials, but all fail. I dont know php, Please help.
The old method of doing this doesn't seem to work anymore. How do I access the options using the new version?
Warning: Invalid argument supplied for foreach() in E:\www\wordpress_demo\wp-content\themes\twentyeleven\options\library\options-register.php on line 207
Warning: Invalid argument supplied for foreach() in E:\www\wordpress_demo\wp-content\themes\twentyeleven\options\library\custom.php on line 144
Transition images over to WP standard for background images and header images.
With hundreds of fonts available in the font family dropdown, it would be much better if each font family name displayed in its own font family.
Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.
Using the settings-api branch here's what I did:
After completing the above steps, I do get a "theme options" tab under "appearance" but when I click on it, i get the following error:
Warning: Invalid argument supplied for foreach() in /home/45458/mysite.com/squeeze/wp-content/themes/theme/admin/library/custom.php on line 223
I'm no expert when it comes to php (probably obvious). If anyone could set me straight I would appreciate it.
Would it be possible to add drag and drop re-order for images (useful when customizing sliders)?
I'd like to use this framework in a child theme, but there are some functions, which want to load from the parent theme because of the get_template_directory function.
I understand, that it is needed if somebody wants to make a theme with this framework and than child themes can use of its settings as well, but there are situations, when it needs upside down. Like my situation. I'd like to add it to a child theme without bothering the parent theme.
Is it possible? Maybe a setting in the theme-options.php file?
So I've tried implementing numerous branches and I keep getting errors like:
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\wp2\wp-content\themes\CSSGallery\admin\options-register.php on line 158
and
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\wp2\wp-content\themes\CSSGallery\admin\custom.php on line 480
I saw you are busy with an overall, this still in the working and is there any working copy I can use?
In options-register.php
, $submittab
is declared as an empty string and then $up_tabs
is iterated over in a foreach loop to determine the tab. I'm getting an Invalid argument
error, and after debugging, it looks like the following conditional is false
if ( ! empty( $input[$submitname] ) || ! empty($input[$resetname] ) ) {
$submittab = $tab['name'];
}
because $submittab
logs as empty (per it's initial declaration) prior to the function choking on
foreach ( $tabsettings as $setting ) {
because it's iterating over an empty array. The part that's most baffling to me is that when I use the settings page (e.g. NOT "Live Preview") it behaves fine, but when setting things in Live Preview, the error is thrown. It seems to be looking for the current tab when it chokes, but I'm not sure if that's correct given that the Live Preview mode flattens all tabs. Not sure if that's the problem or something else... Any ideas would be great!
Need to review and update any outdated sanitization functions being used for theme options. May want to look at Options Framework since they have some pretty solid code for this.
looks like the current page structure of the download has changed so the documentation at http://liftux.github.com/UpThemes-Framework/ has become outdated. For example, there is no longer any theme-options folder in admin but the documentation still seems to refer to it.
Hey Chris. Great work with this. Here's a few improvement requests. I might even pitch in at some point.
When I have multiple color fields on one page, I can update every single field with a unique color, but when saving all the fields get the last color I applied. Could be my mistake, but I saw the same issue on the solved bugs with the image field. Any tips?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.