Code Monkey home page Code Monkey logo

upthemes-framework's Introduction

Welcome to the UpThemes Framework, a GPL 2.0-licensed theme options framework for WordPress.

To get started using the framework, you simply need your own WordPress theme.

Read the documentation for more details: UpThemes Framework Documentation

upthemes-framework's People

Contributors

chipbennett avatar cointilt avatar cyberwani avatar dcneiner avatar johnfischelli avatar matthewsimo avatar retgef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

upthemes-framework's Issues

Accessing Up themes

The old method of doing this doesn't seem to work anymore. How do I access the options using the new version?

Setup Issue

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?

Multiple image uploads only updates last item?

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...

Checkboxes

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!

Change CSS

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)

Implement Standard WP Image Handling for Images

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.

Add Theme Customizer enable/disable option toggle

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.

Cant enable theme options

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

Language

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"); ?>

How to output the settings?

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?

import options not working with elements that output an array

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

Fatal WP_Error as array

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

master repo not a working copy of framework???

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

Add cufon support? Or just ability to turn off Typography?

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!

Cannot use $up_options in the functions page

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?

Make it child theme compatible

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?

Header already sent error

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

Fatal error on line 429 in admin.php

$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.

Multiple color fields

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?

Site Title and Tagline

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

Getting Error like

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

Misc...

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?

Add hooks to enable custom field types

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.

error in typography-engine.php

Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in ...\admin\library\engines\typography-engine.php on line 76

Typography Improvements

Hey Chris. Great work with this. Here's a few improvement requests. I might even pitch in at some point.

  1. Allow definition of which typography attributes to support. I might only want font family and weight chosen for a partcular selector, for instance.
  2. Allow relative units ( 1.2 ) rather than absolute pixel units for line-height
  3. Query the Google Fonts Developer API (and cache in a transient that lives for a couple of days) to build the Google Fonts list.
  4. When linking to Google fonts, put multiple fonts in one call. Eg: http://fonts.googleapis.com/css?family=Tangerine:bold,bolditalic|Inconsolata:italic will grab Tangerine bold and bold italic, and Inconsolata italic. Having a separate element for each font is a performance hit.

Add Image Fields to Theme Customizer

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.

Error with Settings-api branch

Using the settings-api branch here's what I did:

  1. Downloaded the latest version of the settings api branch
  2. Created an admin folder in the theme root
  3. Uploaded everything in the settings-api zip into the admin folder EXCEPT for the theme-options folder
  4. Uploaded the theme-options folder to the theme root
  5. Added the following to functions.php: require_once('admin/admin.php'); include 'admin/library/theme-options.php';

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.

Add image options to Theme Customizer

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.

Import/Export bug

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.

Live Preview Not Working ( Invalid argument foreach() options-register.php )

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!

Category Option Type Broken

Reference Old School Issue #5. Some framework fixes are necessary to resolve that issue; namely:

  • Create a custom function to return the category list
  • Clean up category handling; replace raw SQL query with get_categories()

ERROR, ENQUEUE ERRORS WHEN OPTION FRAMEWORK INSTALLED IN CHILD THEME

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

add_filter for menu slug of options

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)

Gallery Theme and UpTheme Framework

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.

get_option to get_theme_mod

Why not transition away from get_option to get_theme_mod? I'd rather prefer that API and save yourself some code. ;)

WordPress 3.3 - Image Upload

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

Customisable Paths

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.