WordPress.org

Make WordPress Themes

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#18705 closed theme (live)

THEME: OnTheSide - 1.5.3

Reported by: tradesouthwest@… Owned by: catchthemes
Priority: new theme Keywords: theme-ontheside
Cc: tradesouthwest@…

Description

OnTheSide - 0.1

Full width and responsive full-size image background support. Custom front page allows visitors to admire the photo image on your home page while listing your Posts as a Table of Contents without distracting view of you full page image. The default widget, on the left, will show your Menu and a Log In Meta box. Creating a new "Left Sidebar" widget from WP Admin will take precedence over the defaults but Pages-Menu will still be at top of the sidebar. Also supports image upload for logo, up to 200 x 180 pxs., top left. With opacity control for pages/posts.

Theme URL - http://arizonatechgroup.com/ots
Author URL - http://tradesouthwest.com

SVN - https://themes.svn.wordpress.org/ontheside/0.1
ZIP - https://wordpress.org/themes/download/ontheside.0.1.zip?nostats=1

History:

Ticket Summary Status Resolution Owner
#18705 THEME: OnTheSide - 1.5.3 closed live catchthemes

(this ticket)

#20452 THEME: OnTheSide - 1.5.6 closed live jcastaneda
#23846 THEME: OnTheSide – 1.6.2 closed live jcastaneda


https://themes.svn.wordpress.org/ontheside/0.1/screenshot.png


Change History (73)

#1 follow-up: @tradesouthwest@…
4 years ago

Please check if there is a better way I should be calling custom-style.css for each option of the theme options in folder "inc" - I am using theme-options.php to get form values for the opacity of a main div.

I know there is a more better approved way of doing this but I could not figure it out other than to create a single custom(style).css file for each opacity setting.

There is a file I left in inc folder called "custom-style.php." I wanted to $_GET[] or $_POST[] each option from the dropdown select form for its value but WP would not let me parse any of the css in this custom-style.php file... and Yes I used

header('Content-type: text/css');
  header('Cache-control: must-revalidate');

in the file but it is removed for now in this Theme

  • I know it is unorthodox to leave a un-need file in a theme put up for review but I was hoping I could get some help with this styles option, to allow an Admin to change the opacity of the Post background... (the purpose of the Theme Option).

#2 follow-up: @tradesouthwest@…
4 years ago

I also forgot to set a default value as "selected" in the select option array. I am not too sure where is the best place to create this, possibly before the form validation some place such as

if( isset($_POST['opacity'])) { $opacity = get_option('opacity') } else { $opacity = 0.9 } 

and I need sanitization but I do not know if WP has this sanitization built into the backend or not. Can anyone show me a link or two about validation techniques for WP?
Any help would be fantastic.

#3 in reply to: ↑ 1 @catchthemes
4 years ago

Replying to tradesouthwest@…:

Please check if there is a better way I should be calling custom-style.css for each option of the theme options in folder "inc" - I am using theme-options.php to get form values for the opacity of a main div.

I know there is a more better approved way of doing this but I could not figure it out other than to create a single custom(style).css file for each opacity setting.

There is a file I left in inc folder called "custom-style.php." I wanted to $_GET[] or $_POST[] each option from the dropdown select form for its value but WP would not let me parse any of the css in this custom-style.php file... and Yes I used

header('Content-type: text/css');
  header('Cache-control: must-revalidate');

in the file but it is removed for now in this Theme

  • I know it is unorthodox to leave a un-need file in a theme put up for review but I was hoping I could get some help with this styles option, to allow an Admin to change the opacity of the Post background... (the purpose of the Theme Option).

I checked the theme and found you are not saving the setting in database. Save the setting in options table, then retrieve it and display the css according to the value of the data stored in database rather than displaying out each css for each setting.
To add inline css view http://codex.wordpress.org/Function_Reference/wp_add_inline_style

#4 in reply to: ↑ 2 @catchthemes
4 years ago

Replying to tradesouthwest@…:

I also forgot to set a default value as "selected" in the select option array. I am not too sure where is the best place to create this, possibly before the form validation some place such as

if( isset($_POST['opacity'])) { $opacity = get_option('opacity') } else { $opacity = 0.9 } 

and I need sanitization but I do not know if WP has this sanitization built into the backend or not. Can anyone show me a link or two about validation techniques for WP?
Any help would be fantastic.

Sanitization list is here. Validation techniques are at http://codex.wordpress.org/Settings_API

Please view theme guidelines here and make sure you follow steps.

#5 @emiluzelac
4 years ago

@catchthemes, please feel free to assign this ticket to yourself, since you already started with the review :)

#6 @catchthemes
4 years ago

  • Owner set to catchthemes
  • Status changed from new to reviewing

#7 @catchthemes
4 years ago

Hi tradesouthwest,
Please let me know if there are any further confusions. Then we can begin the review process.

#8 @themetracbot
4 years ago

  • Summary changed from THEME: OnTheSide - 0.1 to THEME: OnTheSide - 1.1

OnTheSide - 1.1

Full width and responsive full-size image background support. Custom front page allows visitors to admire the photo image on your home page while listing your Posts as a Table of Contents without distracting view of you full page image. The default widget, on the left, will show your Menu and a Log In Meta box. Creating a new "Left Sidebar" widget from WP Admin will take precedence over the defaults but Pages-Menu will still be at top of the sidebar. Also supports image upload for logo, up to 200 x 180 pxs., top left. With opacity control for pages/posts.

Theme URL - http://arizonatechgroup.com/ots
Author URL - http://tradesouthwest.com

SVN - https://themes.svn.wordpress.org/ontheside/1.1
ZIP - https://wordpress.org/themes/download/ontheside.1.1.zip?nostats=1

Diff with previous version: https://themes.trac.wordpress.org/changeset?old_path=/ontheside/0.1&new_path=/ontheside/1.1

History:

Ticket Summary Status Resolution Owner
#18705 THEME: OnTheSide - 1.5.3 closed live catchthemes

(this ticket)

#20452 THEME: OnTheSide - 1.5.6 closed live jcastaneda
#23846 THEME: OnTheSide – 1.6.2 closed live jcastaneda


https://themes.svn.wordpress.org/ontheside/1.1/screenshot.png

#9 @tradesouthwest@…
4 years ago

Change Log

1

  • original version

1.1

  • added options function for posts opacity Theme Options
  • adjusted styles for wide images and some default elements

#10 @tradesouthwest@…
4 years ago

@catchthems - thanks, this should be good enough for review process to start on.
I cleaned up style sheet and found the theme options functions not too hard to understand so i am rather sure it is implemented correctly.

#11 @catchthemes
4 years ago

I will begin the review process shortly :)

#12 @catchthemes
4 years ago

Code Quality:

  • Themes are required to use theme-slug ( or a reasonably unique slug) as a prefix for anything in the public namespace, including all custom function names, classes, hooks, public/global variables, database entries (Theme options, post custom metadata, etc.) . You have missed theme-slug in most of the function please check function.php file and theme-option.php.

Theme Check:

  • Themes are required to use get_template_directory() rather than TEMPLATEPATH to return the template path.

Security and Privacy:

  • Themes are required to validate and sanitize all untrusted data before entering data into the database, and to escape all untrusted data before being output in the Settings form fields or in the Theme template files. No sanitization found.

Licensing, Theme Name, Credit Links, Up-Sell Themes:

  • The format you have used for declaring copyright is not valid. See the format should add in your readme.txt file
    Twenty Fourteen WordPress Theme, Copyright 2014 WordPress.org
    Twenty Fourteen is distributed under the terms of the GNU GPL
    
  • For ThemeURI, a mere demo site is insufficient; the URI must include content predominately related to the Theme. The content must be related to the theme itself.

Other Issues:

  • Your responsive view is not valid it does not fits the screen.

https://www.diigo.com/item/p/qspqoqqzcbdrpcrpazbdrcqaor

  • Debug:Undefined index: update_themeoptions on line 20 of C:\ontheside\include\theme-options.php

Debug: Use of undefined constant None - assumed 'None' on line 47 of C \ontheside\include\theme-options.php

  • In theme option page even after different number is saved it always shows 1. This needs to be fixed.

Before submitting update please make sure you go though Theme Review guidelines.
Here is the link: Guidelines

If you confused with anything feel free to ask.

#13 follow-up: @tradesouthwest@…
4 years ago

Reviewer,
This is not a mobile theme so it is not to be optimized for any mobile styles. The whole idea of the theme is to make a front page that can hold a very large photograph for display. I do not think any mobile device is designed for this purpose. When the theme says responsive, you must read in context; it means the background image is responsive and will fit the template, it does not represent a mobile or media screen. I will change the wording so no one gets confused.

I am not familiar with sanitizing inputs. there is only one input from a select options form and I was under the impression that WordPress options.php covered all of this, so sanitization is not needed. If you need it sanitized to approve it then I will need to know what it is you want sanitized. I can escape attributes or the $_POST string but that is all there is to sanitize or even validate. The input string is an integer so I could simpley use int and it would be done.

Please expand on "theme-slug. I use ontheside as a theme slug which works fine. Maybe you are talking about something I do not know about. So far I have not seen this in any of my past approved themes and it may be something new that you are requiring but I have no idea what you are talking about or what to "change."

I need at least these answers before I can proceed.

#14 follow-up: @tradesouthwest@…
4 years ago

Also, the theme URL is for testing at this time. When the theme is approved I will put public stuff in there. I am not selling this theme so there is no need to have anything other than a display of content.

....predominately related to the Theme. The content must be related to the theme itself. 

I can not see creating any content that is related to this theme - it is a theme and not a magazine or a newspaper with some specific stories or content that relates to the theme. A theme is a theme in this case and I am not going to waste a bunch of time making up some story about "My great WordPress blog" or whatever you think it should contain. My other themes are just a support page and some demo data. What more would anyone want to see that is related to the theme The theme is named on the side because it has a menu on the side. That is about it. I do not think that would make much of a cover story. lol.

#15 in reply to: ↑ 13 @catchthemes
4 years ago

Replying to tradesouthwest@…:

Reviewer,
This is not a mobile theme so it is not to be optimized for any mobile styles. The whole idea of the theme is to make a front page that can hold a very large photograph for display. I do not think any mobile device is designed for this purpose. When the theme says responsive, you must read in context; it means the background image is responsive and will fit the template, it does not represent a mobile or media screen. I will change the wording so no one gets confused.

If this is not optimized for mobile theme, the responsive word in theme description gives an impression that the theme is responsive. Ignore this issue, I got confused.

I am not familiar with sanitizing inputs. there is only one input from a select options form and I was under the impression that WordPress options.php covered all of this, so sanitization is not needed. If you need it sanitized to approve it then I will need to know what it is you want sanitized. I can escape attributes or the $_POST string but that is all there is to sanitize or even validate. The input string is an integer so I could simpley use int and it would be done.

No, wordpress options.php doesn't do things for you. It has this feature but you have to use it. You can use absint() to validate your input. There is a third parameter in <?php register_setting( $option_group, $option_name, $sanitize_callback ); ?> that you can use to sanitize your inputs. Give register_setting a reading.

Please expand on "theme-slug. I use ontheside as a theme slug which works fine. Maybe you are talking about something I do not know about. So far I have not seen this in any of my past approved themes and it may be something new that you are requiring but I have no idea what you are talking about or what to "change."

All your functions and public facing variables(including global variables) need to be properly prefixed with theme slug. See line number 24, 49, 58, 99, 105, etc in functions.php, these are just a few you have missed. There are a lot others too in theme_option.php file. Make sure you get them all.

Last edited 4 years ago by catchthemes (previous) (diff)

#16 in reply to: ↑ 14 @catchthemes
4 years ago

Replying to tradesouthwest@…:

Also, the theme URL is for testing at this time. When the theme is approved I will put public stuff in there. I am not selling this theme so there is no need to have anything other than a display of content.

....predominately related to the Theme. The content must be related to the theme itself. 

We wont be able to work with testing. Once the theme is approved, it will go live in WordPress Repo. Please keep this in mind.

I can not see creating any content that is related to this theme - it is a theme and not a magazine or a newspaper with some specific stories or content that relates to the theme. A theme is a theme in this case and I am not going to waste a bunch of time making up some story about "My great WordPress blog" or whatever you think it should contain. My other themes are just a support page and some demo data. What more would anyone want to see that is related to the theme The theme is named on the side because it has a menu on the side. That is about it. I do not think that would make much of a cover story.

Please make sure you follow the guidelines. View following theme URIs as example:

Theme URI, if used, is required to link to a page specifically related to the Theme. If a demonstration site or page is being used, the content must be related to the theme itself.
If you don't want theme URI, you can just leave it blank, it will be OK, But keeping invalid link is not acceptable.

Last edited 4 years ago by catchthemes (previous) (diff)

#17 follow-up: @tradesouthwest@…
4 years ago

@"Theme URI, if used, is required to link to a page specifically related to the Theme. If a demonstration site or page is being used, the content must be related to the theme itself. "

What is content related to theme???? I can not write anything specific other than it is a Wordpress theme that has a few options. That would not make for very good content that a user can look at if they are interested in how well the theme works. Ultimately theme test articles are perfect for "about the theme" if anything it would provide a perfect reflection on how well the theme looks and works with various HTML and blog related elements. so in general I disagree with your opinion on what is "related to the theme" for this URL.

If you do not want Theme-Check authors and content then I can push those as an admin author content. Otherwise there is no reason to spend time with "custom" content unless I am selling a theme or expecting some service in return.

The site URI provides a place to see the theme and submit feedback for support.

#18 in reply to: ↑ 17 @catchthemes
4 years ago

Replying to tradesouthwest@…:

@"Theme URI, if used, is required to link to a page specifically related to the Theme. If a demonstration site or page is being used, the content must be related to the theme itself. "

What is content related to theme???? I can not write anything specific other than it is a Wordpress theme that has a few options. That would not make for very good content that a user can look at if they are interested in how well the theme works. Ultimately theme test articles are perfect for "about the theme" if anything it would provide a perfect reflection on how well the theme looks and works with various HTML and blog related elements. so in general I disagree with your opinion on what is "related to the theme" for this URL.

If you do not want Theme-Check authors and content then I can push those as an admin author content. Otherwise there is no reason to spend time with "custom" content unless I am selling a theme or expecting some service in return.

The site URI provides a place to see the theme and submit feedback for support.

Please view the theme check guidelines from review team here
You can disagree with me all you want.
Just keep theme installation notes or even theme description there and it will be enough.

#19 @catchthemes
4 years ago

  • Cc emiluzelac added

Hi emil,
Can you help me out with the theme URI declaration?

#20 @tradesouthwest@…
4 years ago

Howdy,
I am grateful for the help, so far and have learned a few things about public facing variables and theme review in general. I know your time is valuable so please bear with me as I update this next version.

So far this is where I am at:

1.2

  • moved instructions into Theme Options.
  • fixed menu list style to expand without showing hidden lists
  • updated public facing variables with name slug
  • fixed several style issues with titles and other word-wrap

Some time this evening I should be able to tackle the sanitizing and security issues with my theme options module.

As per Change Log item one above, I removed the "special instructions" from the theme altogether and integrated them into the Theme Options page.

#21 @catchthemes
4 years ago

Thanks for the updates. The theme review team is here to help. Please feel free to ask anything else if you are in confusion, I will be glad to help. :)

#22 @themetracbot
4 years ago

  • Summary changed from THEME: OnTheSide - 1.1 to THEME: OnTheSide - 1.2

OnTheSide - 1.2

Full-size image background support. Custom front page allows visitors to admire the photo image on your home page while listing your Posts as a Table of Contents without distracting view of you full page image. The default widget, on the left, will show your Menu and a Log In Meta box. Creating a new "Left Sidebar" widget from WP Admin will take precedence over the defaults but Pages-Menu will still be at top of the sidebar. Also supports image upload for logo, up to 200 x 180 pxs., top left. With opacity control for pages/posts.

Theme URL - http://arizonatechgroup.com/ots
Author URL - http://tradesouthwest.com

SVN - https://themes.svn.wordpress.org/ontheside/1.2
ZIP - https://wordpress.org/themes/download/ontheside.1.2.zip?nostats=1

Diff with previous version: https://themes.trac.wordpress.org/changeset?old_path=/ontheside/1.1&new_path=/ontheside/1.2

History:

Ticket Summary Status Resolution Owner
#18705 THEME: OnTheSide - 1.5.3 closed live catchthemes

(this ticket)

#20452 THEME: OnTheSide - 1.5.6 closed live jcastaneda
#23846 THEME: OnTheSide – 1.6.2 closed live jcastaneda


https://themes.svn.wordpress.org/ontheside/1.2/screenshot.png

#23 @tradesouthwest@…
4 years ago

@reviewer: Can I ask you what app or what website you use to test the mobile and responsive testing with???

I saw your screenshot you were showing me from this thread and I need to find a way to test my future themes since everything SHOULD be responsive/mobile/tablet ready now days.

Hopefully i can create a build framework or template for my styles and divs which will assist creating mobile friendly sites, down the road.

#24 @catchthemes
4 years ago

hi tradesouthwest,

I used the Resize option in Web Developer addon/extension for mozilla firefox. Although this method works, make sure it works on major devices too.

Last edited 4 years ago by catchthemes (previous) (diff)

#25 @catchthemes
4 years ago

Theme Check Plugin Errors and Recommendations:
No issues found.

Depreciated Functions:
No issues found.

Plugin Territory:

No issues found.

Code Quality:

  • Your theme options page falls under doing_it wrong. You are doing it wrong. Please view following code and compare, This is how Settings API in WordPress must be used. And there were plenty of unnested and unclosed html tags too.
    /*
     * Admin Options for Theme
     * File Name: theme-options.php
     */
    
        function ontheside_theme_options_init()
        {
            register_setting( 'ontheside_theme_options', 'ontheside_theme_options', 'ontheside_validate_options');
        }
    
        function ontheside_theme_options_add_page()
        {
            add_theme_page( __( 'Theme Options', 'ontheside' ), __( 'Theme Options', 'ontheside'),
            'edit_theme_options',
            'theme_options',
            'theme_options_do_page'
            );
        }
         function theme_options_do_page() {
       // if (isset( $_POST['formSubmit'] )) { ontheside_theme_options_update(); }
    ?>
    <div>
        <form method="POST" action="options.php">
            <?php settings_fields( 'ontheside_theme_options' );?>
    
            <fieldset style="width:440px;border:3px solid #ccc;border-radius:5px;background: #fafafa;">
    
                <div style="padding: 15px;">
    
                    <table width="400px">
                        <tr>
                            <td>
                                <h3>Change Opacity of Posts Background</h3>
    
                                <h4>The higher the value the less visibility there is to the<br /> background image. 8 should be optimal.</h4>
    
                                <h4 style="color:#788">Values are: 1 thru 9 and 0 is white.</span></h4>
                            </td>
                        </tr>
    
                        <tr>
                            <td align="right" style="background:#ececec;padding:3px;border:3px solid #ccc;border-radius:3px">
                                <select name="ontheside_theme_options[opacity]">
                                    <?php $ontheside_theme_options = get_option('ontheside_theme_options');?>
                                    <option value="0.1" <?php selected( $ontheside_theme_options['opacity'], 0.1 ); ?>> 1 </option>
                                    <option value="0.2" <?php selected( $ontheside_theme_options['opacity'], 0.2 ); ?>> 2 </option>
                                    <option value="0.3" <?php selected( $ontheside_theme_options['opacity'], 0.3 ); ?>> 3 </option>
                                    <option value="0.4" <?php selected( $ontheside_theme_options['opacity'], 0.4 ); ?>> 4 </option>
                                    <option value="0.5" <?php selected( $ontheside_theme_options['opacity'], 0.5 ); ?>> 5 </option>
                                    <option value="0.6" <?php selected( $ontheside_theme_options['opacity'], 0.6 ); ?>> 6 </option>
                                    <option value="0.7" <?php selected( $ontheside_theme_options['opacity'], 0.7 ); ?>> 7 </option>
                                    <option value="0.8" <?php selected( $ontheside_theme_options['opacity'], 0.8 ); ?>> 8 </option>
                                    <option value="0.9" <?php selected( $ontheside_theme_options['opacity'], 0.9 ); ?>> 9 </option>
                                    <option value="1" <?php selected( $ontheside_theme_options['opacity'], 0 ); ?>> 0 </option>
                                </select>
                            </td>
                        </tr>
                    </table>
    
                    <p><?php submit_button();?><!-- <input type="submit" name="formSubmit" value="Save Value" /> --></p>
    
                    <p style="width:380px;background:#fffffc;padding:6px;border:3px solid #ccc;border-radius:3px;">
    
                        <strong>Selected: opacity = </strong>
    
                        <span style="color:royalblue;font-weight: 800;font-size:1.128em">
                            <?php echo get_option('ontheside_theme_opacity'); ?>
                        </span>
                    </p>
    
                    <small>(Saved value shows with leading 0., 1 represents white. These are the CSS attributes. The Number 8 will always display in drop-down above.)</small>
                </div>
            </fieldset>
        </form>
    
    
        <table width="640px" style="margin-top: 0;">
            <tr>
                <td><h3>Instructions on Displaying Front Page Options</h3></td>
            </tr>
    
            <tr>
                <td align="right" style="text-align: left;border:3px solid #ccc;padding:3px;background:#e6e6e6;border-radius:3px;">
                    <?php get_template_part('/include/ots-instructions'); ?>
                </td>
            </tr>
        </table>
    
        <div style="clear: both; margin:0; padding:0;"></div>
    
        <h5>TSW =|= Tradesouthwest - On The Side &copy; 2014</h5>
    
    </div>
    <?php
    }
    
        function ontheside_validate_options( $input )
        {
            $valid_options = array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9);
            if( in_array($input['opacity'], $valid_options) )
                return $input;
            else
                return false;
        }
    
        add_action( 'admin_init', 'ontheside_theme_options_init' );
    
        add_action( 'admin_menu', 'ontheside_theme_options_add_page' );
    
        function ontheside_styles_method()
        {
    	wp_enqueue_style(
    		'custom-style',
    		get_template_directory_uri() . '/inc/custom.css'
    	);
            $mainopacity = get_option('ontheside_theme_opacity');
            $custom_css = "
                    #main{
                            opacity: {$mainopacity};
                    }";
            wp_add_inline_style( 'custom-style', $custom_css );
        }
        add_action( 'wp_enqueue_scripts', 'ontheside_styles_method' );
    
  • There are plenty of inline styles used above which is a no no. Please make a seperate css file and hook it to admin_print_scripts-appearance_page_$menu_slug(in this case admin_print_scripts-appearance_page_theme_options.php)


Template Tags and Hooks:

  • wp_enqueue_script( "comment-reply" ); is found in file header.php. No need to include in header.php file it is already in function.php.
  • Please replace the codes in function.php from line 25 to 57 with following code or something similar. Following code will work, but its just to give basic idea.
    // add ie conditional html5 shim to header
    function ontheside_add_ie_html5_shim () {
        echo '<!--[if lt IE 9]>';
        echo '<script src="js/html5.js"></script>';
        echo '<![endif]-->';
    }
        add_action('wp_head', 'ontheside_add_ie_html5_shim');
    
    // Register scripts and styles
    
    add_action( 'wp_enqueue_scripts', 'ontheside_custom_enqueue_scripts' );
    
    function ontheside_custom_enqueue_scripts() {
        // Register StyleSheet
        wp_enqueue_style( 'ontheside-style', get_stylesheet_uri() );
    
        // enable threaded comments
        if (is_singular() AND comments_open() AND (get_option('thread_comments') == 1))
            wp_enqueue_script('comment-reply');
    
        //* Load scripts only if custom background is being used
        if ( ! get_background_image() )
            return;
            wp_enqueue_script( 'custom-backstretch', get_stylesheet_directory_uri() . '/js/backstretch.js', array( 'jquery' ), '1.0.0' );
            wp_enqueue_script( 'custom-backstretch-set', get_stylesheet_directory_uri().'/js/backstretch-set.js' , array( 'jquery', 'custom-backstretch' ), '1.0.0' );
            wp_localize_script( 'custom-backstretch-set', 'BackStretchImg', array( 'src' => get_background_image() ) );
    }
    
    You can add all scripts that is used to wp_enqueue_scripts hook at once.

Theme Check:

  • wp_title not found Template tags and hooks are required to be included where appropriate.

Please fix above and reupload. Theme contains lots of issues. Please view Wordpress Coding standards and then only reupload.

#26 @tradesouthwest@…
4 years ago

thanks, There is a lot of stuff in the WordPress Coding Standards of which I never knew about, so thanks for the link. Will get spacing and formatting correct for next upload. Wish I had the link before I started on WP Themes. I looked around but there are so many (mis)leading links and most of them are deprecated code so I think I will stick to WP.org for my coding search support.

Should be a few days before next upload. Will polish everything including CSS.

#27 @tradesouthwest@…
4 years ago

Also I can not thank you enough for the validation of my options select coding in the theme options form. I looked everywhere for a way to validate this and only found sanitize_text_field or intval as the "third" variable. I knew there was a way to do this with PHP but could not find the function name to validate in WordPress.

What you included as a ...validate_options ( $inputs; ); will be invaluable and I can use this as a template to move forward on other validation.

#28 @catchthemes
4 years ago

You are welcome :). I will keep the ticked open for a few days. Sticking to WordPress Codes is the best possible way to be up to date with the codes. Please let me know if there is any confusion.

#29 follow-up: @tradesouthwest@…
4 years ago

Nothing even closely related to this works for me:

  <select name="ontheside_theme_options[opacity]">
     <?php $ontheside_theme_options = get_option('ontheside_theme_options'); ?>
                                <option value="0.1" <?php selected( $ontheside_theme_options['opacity'], 0.1 ); ?>> 1 </option>

I tried every statement parser I could find including putting php start and close tags in the name="" call, I thought maybe you left this out but I am not even sure how this works for HTML and not for PHP as it is just an elongated name(convention). it could have been named "opacity[]" and did the same thing... No???

So no matter what combination of selected( $ontheside_theme_options['opacity'], 0.2 ) I used I would always get an Illegal String Offset error and nothing saves to options.php.

Also I can not get the form to save an option if I have <form method="POST" action="options.php"> I have to remove the file name and then it works fine as <form method="POST" action="">

I am having other problems with getting the form Select element to keep the option highlighted that is selected "selected" The code you snipped to me is giving the Offset error and it never saves any of the option (opacity setting) while that line of code is in the statement for the select option.

I am Just kind of touching-base to see if you had any particulars you would add (or remove/replace) to the page function. I am on a hunt to figure this out. If it were JUST PHP then I would be loving it but so far I have to keep with in the guidlines of WP so this is a little more confusing to me than normal.

I would hope to ditch the "Opacity Control" for the Theme options altogether but that would be just plain giving up and I would hate to do that seeing as I need to learn this part.

I hope it is not a PHP version thing - running WordPress 3.9.1 and PHP 5.4 (not single or CGI).

#30 in reply to: ↑ 29 @catchthemes
4 years ago

Replying to tradesouthwest@…:

Nothing even closely related to this works for me:

  <select name="ontheside_theme_options[opacity]">
     <?php $ontheside_theme_options = get_option('ontheside_theme_options'); ?>
                                <option value="0.1" <?php selected( $ontheside_theme_options['opacity'], 0.1 ); ?>> 1 </option>

I tried every statement parser I could find including putting php start and close tags in the name="" call, I thought maybe you left this out but I am not even sure how this works for HTML and not for PHP as it is just an elongated name(convention). it could have been named "opacity[]" and did the same thing... No???

So no matter what combination of selected( $ontheside_theme_options['opacity'], 0.2 ) I used I would always get an Illegal String Offset error and nothing saves to options.php.

Also I can not get the form to save an option if I have <form method="POST" action="options.php"> I have to remove the file name and then it works fine as <form method="POST" action="">

I am having other problems with getting the form Select element to keep the option highlighted that is selected "selected" The code you snipped to me is giving the Offset error and it never saves any of the option (opacity setting) while that line of code is in the statement for the select option.

I am Just kind of touching-base to see if you had any particulars you would add (or remove/replace) to the page function. I am on a hunt to figure this out. If it were JUST PHP then I would be loving it but so far I have to keep with in the guidlines of WP so this is a little more confusing to me than normal.

I would hope to ditch the "Opacity Control" for the Theme options altogether but that would be just plain giving up and I would hate to do that seeing as I need to learn this part.

I hope it is not a PHP version thing - running WordPress 3.9.1 and PHP 5.4 (not single or CGI).

Before you do anythng, did you give a detailed reading to Setting API. You need to go through this thoroughly.
The code i provided isn't meant to work of the bat. However, i think that it is because the value previously is not set to that variable. You can use isset() or something similar to check if the value exists or not. Please read Setting API carefully from top to bottom. This will really clear up a lot of things.

To use the variable stored, use

$whatever = get_option('ontheside_theme_options');//fetch data from database
// $whatever['opacity'] is the variable that contains your opacity number (0, 0.1, so on)

The offset error is due to the variable not being set by default. In your functions.php you can add

$whatever = get_option('ontheside_theme_options');//fetch data from database
if( !isset($whatever['opacity']) || '' == $whatever['opacity'] ) {
     $whatever['opacity'] = 8; //default option
     update_option( 'ontheside_theme_options', $whatever )
}

This is just an example. Please use your own ideas to make code work and debug.

#31 @catchthemes
4 years ago

  • Cc emiluzelac removed

About <form action = 'option.php'>, please read this and understand how it works. It might look daunting at first but this is the right way to go. Even if i allow it, the Review Admin team will reject it on the basis of doing_it_wrong.

#32 @tradesouthwest@…
4 years ago

Anytime I add the form action as ="options.php" I get the wp-options page that appears on my admin screen. If I remove "" then the form saves just fine. I have read the two pages you suggested and there was nothing on those pages that were of help. They mad sense to me but did not help in any way to build my simple select form.

I admired your energy and helpfulness to apply the code from the last threads but so far I am not able to find the basic information I am looking for. Is there not a page with APIs pre made of sorts? The codex on WordPress.org has some "snippets" that are not really useful in any applicable manner.

I tried to find a theme that had an options page which was similar in usage but had no luck there either. The form submits and works without the options.php page being called, so it must be the settings or do settings that I am not doing correctly.

Will keep you posted and not sure how long you leave a theme up for review but it may be a few more days until I can find time to dedicate to this theme option. I do not want to give up so please just stand by and I will get this.

#33 @catchthemes
4 years ago

I used the code provided by me and its working fine.
I can give you a link that can help you with settings API:

This is a very good tutorial on how to properly use Settings API.

I usually close a ticked after 5 days of inactivity. If you are active, i won't close the ticket.

#34 @tradesouthwest@…
4 years ago

Thanks for the update on time limits. I will take a look at the kovshenin site sometime this week.

#35 @tradesouthwest@…
4 years ago

Howdy,
hate to bother you but I am having the hardest time with this error: options page not found it just will not go away unless I remove the action location.
This is what I have. If you are have any suggestions I would be glad to send you a starbucks gift card for your time, otherwise I still think I need to calback my settings correctly but can not seem to grasp what WP is looking for.

/*
 * Admin Options for Theme 
 * File Name: theme-options.php
 */

    function ontheside_theme_settings_init()
    {
        register_setting( 'ontheside_options', 'ontheside_theme_options', 'validate_theme_options' );
    } 
    add_action( 'admin_init', 'ontheside_theme_settings_init' );

    // create parameters for options page
    function ontheside_theme_options_add_page() 
    {
        add_theme_page( __( 'Theme Options', 'ontheside' ), __( 'Theme Options', 'ontheside'),
        'edit_theme_options',
        'theme_options', 
        'theme_options_do_page'
        );
    }    
    add_action( 'admin_menu', 'ontheside_theme_options_add_page' );

    // connect stylesheet to options page
    add_action('admin_init', 'ontheside_add_init');
    function ontheside_add_init() 
    {
    wp_enqueue_style( 'ontheside-admin-style', get_template_directory_uri() . '/include/admin-style.css', false, '1.0');
    }

    

    function theme_options_do_page() {
     if (!isset($_REQUEST['settings-updated']))
    $_REQUEST['settings-updated'] = false;
    ?>

    <div class="options-container">

    <?php echo "<h2>" . wp_get_theme() . __( ' Theme Options', 'ontheside' ) . "</h2>"; ?>
    <?php if (false !== $_REQUEST['settings-updated']): ?>
    <div class="updated fade">
        <p><strong><?php _e( 'Options saved', 'ontheside' ); ?></strong></p>
    </div>
    <?php endif; ?>
        <form method="post" action="options.php">
        <?php 
        // Option to change opacity value of posts background 
        settings_fields( 'ontheside_theme_options' ); ?>
        <?php // do_settings_sections( 'ontheside_theme_options' );  ?>
        
        
        
            <table id="options-table-1"><tbody class="fieldset">
            <tr>
            <td><h3><?php _e( 'Change Opacity of Posts Background' ); ?></h3>
            </td>
            </tr>
                <tr>
                <td class="select-options-dropdown">
                <select name="opacity[]" class="select-options-box">
                    <option value="0.1"> 1 </option>
                    <option value="0.2"> 2 </option>
                    <option value="0.3"> 3 </option>
                    <option value="0.4"> 4 </option>
                    <option value="0.5"> 5 </option>
                    <option value="0.6"> 6 </option>
                    <option value="0.7"> 7 </option>
                    <option value="0.8"> 8 </option>
                    <option value="0.9"> 9 </option>
                    <option value="1"> 0 </option>
                </select>
                </td>
                </tr>
                    <tr>
                    <td class="select-data-row"><?php submit_button(); ?>
        </form>
                    </td>
                    </tr>
                        <tr class="selected-data-row">
                        <td><strong>Selected: opacity = </strong><span><?php //echo get_option('ontheside_theme_options'); ?></span>
                        </td>
                        </tr>
            </tbody></table>
<?php                    
}
           
       
    function ontheside_theme_options_update()
    {
         $opacity = get_option( 'ontheside_theme_options' ); //fetch data from database
            if( !isset($opacity['opacity']) || '' == $opacity['opacity'] )  { $opacity['opacity'] = 8; }
       //update_option( 'ontheside_theme_options', $opacity );
    update_option( 'ontheside_theme_options', $opacity );
    //update_option('ontheside_display_select', $opacity, 'intval');  
    }  
    
    function ontheside_validate_options( $input )
    {
        $valid_options = array( 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1 );
        if( in_array($input['opacity'], $valid_options) )
            return $input;
        else
            return false;
    } 
    function ontheside_styles_method() 
    {
	wp_enqueue_style(
		'custom-style',
		get_template_directory_uri() . '/include/custom.css'
	);
	$mainopacity = get_option( 'ontheside_theme_opacity' );
        $custom_css = "
                #main{
                        opacity: {$mainopacity};
                }";
        wp_add_inline_style( 'custom-style', $custom_css );
    }
    add_action( 'wp_enqueue_scripts', 'ontheside_styles_method' );

#36 @tradesouthwest@…
4 years ago

Switched to options-framework until I get it!

<?php
/**
 * A unique identifier is defined to store the options in the database and reference them from the theme.
 * By default it uses the theme name, in lowercase and without spaces, but this can be changed if needed.
 * If the identifier changes, it'll appear as if the options have been reset.
 */

function optionsframework_option_name() {

	// This gets the theme name from the stylesheet
	$themename = wp_get_theme();
	$themename = preg_replace("/\W/", "_", strtolower($themename) );

	$optionsframework_settings = get_option( 'optionsframework' );
	$optionsframework_settings['id'] = $themename;
	update_option( 'optionsframework', $optionsframework_settings );
}

/**
 * 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.
 *
 * If you are making your theme translatable, you should replace 'options_framework_theme'
 * with the actual text domain for your theme.  Read more:
 * http://codex.wordpress.org/Function_Reference/load_theme_textdomain
 */

function optionsframework_options() {
// css data
    $opacity_select = array(
    '0.1' => 1, 
    '0.2' => 2, 
    '0.3' => 3, 
    '0.4' => 4, 
    '0.5' => 5, 
    '0.6' => 6, 
    '0.7' => 7, 
    '0.8' => 8, 
    '0.9' => 9, 
    '1'   => 0,
    );
    $options = array();
    $options[] = array(
        'name' => __('Theme Settings', 'ontheside'),
        'type' => 'heading');
        
        $options[] = array(
            'name' => __('opacity', 'ontheside'),
            'desc' => __('1 thru 9 - 0 is white', 'ontheside'),
            'id' => 'opacity',
            'std' => 'ten',
            'type' => 'select',
            'class' => 'mini', //mini, tiny, small
            'options' => $opacity_select);

return $options;
}

        $opacity = get_option( 'ontheside_opacity' ); //fetch data from database
            if( !isset($opacity['opacity']) || '' == $opacity['opacity'] )  { $opacity['opacity'] = 8; }
    
    function ontheside_styles_method() 
    {
	wp_enqueue_style(
		'custom-style',
		get_template_directory_uri() . '/inc/custom.css'
	);
	$mainopacity = get_option( 'ontheside_opacity' );
        $custom_css = "
                #main{
                        opacity: {$mainopacity};
                }";
        wp_add_inline_style( 'custom-style', $custom_css );
    }
    add_action( 'wp_enqueue_scripts', 'ontheside_styles_method' );

still having trouble finding docs on options-framework. All I need is to save the data to css (pseudo) file. Everything else works.

#37 @tradesouthwest@…
4 years ago

Theme Reviewer,
I have the theme options complete all except for the final touches. will be uploading new version some time this weekend.
Thanks for your patients. I learned a lot. The whole problem was the declaration of the options value into the enqueue script. Had to add an attribute to the string to define what value was to be assigned to the selected get_option.
Larry

#38 @themetracbot
4 years ago

  • Summary changed from THEME: OnTheSide - 1.2 to THEME: OnTheSide - 1.3

OnTheSide - 1.3

Full size java controlled image background support. Custom front page allows visitors to admire the photo image on your home page while listing posts or widgets without distracting view of you full page image. The default widget, on the left, will show your Menu and a Log In Meta box. Creating a new "Left Sidebar" widget from WP Admin will take precedence over the defaults but Pages-Menu will still be at top of the sidebar. Also supports image upload for logo. With theme options opacity control for pages/posts background.

Theme URL - http://arizonatechgroup.com/ots
Author URL - http://tradesouthwest.com

SVN - https://themes.svn.wordpress.org/ontheside/1.3
ZIP - https://wordpress.org/themes/download/ontheside.1.3.zip?nostats=1

Diff with previous version: https://themes.trac.wordpress.org/changeset?old_path=/ontheside/1.2&new_path=/ontheside/1.3

History:

Ticket Summary Status Resolution Owner
#18705 THEME: OnTheSide - 1.5.3 closed live catchthemes

(this ticket)

#20452 THEME: OnTheSide - 1.5.6 closed live jcastaneda
#23846 THEME: OnTheSide – 1.6.2 closed live jcastaneda


https://themes.svn.wordpress.org/ontheside/1.3/screenshot.png

#39 @catchthemes
4 years ago

Sorry couldn't reply. Been busy. I will perform reviews shortly.

#40 @catchthemes
4 years ago

Theme Check Plugin Errors and Recommendations: No Issues Found
Depreciated Functions: No Issues Found
Theme Check: No Issues Found
Security and Privacy: No Issues Found


Plugin Territory:

  • Need to remove all rss links in footer. This is plugin territory.

Code Quality:

  • Remove function_exists check on functions.php line 87. Themes must not provide backward compatibility for out-of-date WordPress versions (more than two prior major WordPress versions e.g. if 3.9 is the current version then no version before 3.7), including using function_exists() conditional wrappers for current WordPress functions.

Template Tags and Hooks:

  • Remove function ontheside_enable_threaded_comments in functions.php (since comment-reply is already included in function ontheside_custom_enqueue_scripts)
  • function ontheside_wp_title_for_home is inside theme setup function (this is unnessary). Put this function outside the theme setup function (function ontheside_setup in line 5 functions.php)and hook it into wp_title. Reference
     /**
     * Filters wp_title to print a neat <title> tag based on what is being viewed.
     *
     * @param string $title Default title text for current view.
     * @param string $sep Optional separator.
     * @return string The filtered title.
     */
    function theme_name_wp_title( $title, $sep ) {
    	if ( is_feed() ) {
    		return $title;
    	}
    	
    	global $page, $paged;
    
    	// Add the blog name
    	$title .= get_bloginfo( 'name', 'display' );
    
    	// Add the blog description for the home/front page.
    	$site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description && ( is_home() || is_front_page() ) ) {
    		$title .= " $sep $site_description";
    	}
    
    	// Add a page number if necessary:
    	if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
    		$title .= " $sep " . sprintf( __( 'Page %s', '_s' ), max( $paged, $page ) );
    	}
    
    	return $title;
    }
    add_filter( 'wp_title', 'theme_name_wp_title', 10, 2 );
    
  • Remove following code and add it in theme setup function
    	add_theme_support( 'ontheside_custom-background', array(
            'wp-head-callback' => 'ontheside_custom_background_callback', 
            'default-image' => get_stylesheet_directory_uri() . '/images/default-background.png',
            'default-color' => 'afafaf',
        )); 
    
  • In theme-options.php line 19, replace add_action('admin_init', 'ontheside_add_init'); with add_action('admin_print_scripts-appearance_page_ontheside-options', 'ontheside_add_init'); . Reason: Themes are required to use the Theme-specific hook for admin-enqueued scripts/stylesheets, e.g. admin_print_scripts-appearance_page_$menu_slug (name slug)
  • Question: I cannot find where you have hooked default style.css. If you have, can you point me to where it is?

Licensing, Theme Name, Credit Links, Up-Sell Themes:

  • Credit link anchor text and title are required to be relevant and appropriate with respect to the linked site. Spam or SEO-seeded anchor text and titles may subject Themes to automatic rejection.So, in footer.php, replace
    <a rel="author" title="TSW =|=" href="http://www.tradesouthwest.com/"><span>OnTheSide @Tradesouthwest =|=</span></a>
    
    with
    <a rel="author" href="http://www.tradesouthwest.com/"><span>Tradesouthwest</span></a>
    

Please let me know if there are any confusions.

#41 follow-up: @tradesouthwest@…
4 years ago

OK, lots of good stuff you found and I appreciate your time and patience in working with me.

as to:
"Question: I cannot find where you have hooked default style.css. If you have, can you point me to where it is? "
I had the hook before the beginning of the function so it was hard to see amongst the other pieces of script statements that got moved into the setup fxn.

I moved it to the end of scripts enqueue to hook all the scripts.

I am not sure if the // add ie conditional html5 shim to header should be within the enqueue scripts fxn or not??? It would seem like it should be but I think because it is only used if IE browsers are present then it needs to be outside the non-conditional statements to work when only an IE browser is found.

Will upload new ver. soon.

#42 @tradesouthwest@…
4 years ago

Change Log

1.4

  • removed version compatibility functions
  • moved enable_threaded_comments to setup
  • rebuilt custom title statements
  • moved custom background default to setup
  • changed footer to comply with WP standards
  • created Theme-specific hook for admin-enqueued scripts
  • hook for enqueue scripts moved to add all scripts at once

#43 @themetracbot
4 years ago

  • Summary changed from THEME: OnTheSide - 1.3 to THEME: OnTheSide - 1.4

OnTheSide - 1.4

Full size java controlled image background support. Custom front page allows visitors to admire the photo image on your home page while listing posts or widgets without distracting view of you full page image. The default widget, on the left, will show your Menu and a Log In Meta box. Creating a new "Left Sidebar" widget from WP Admin will take precedence over the defaults but Pages-Menu will still be at top of the sidebar. Also supports image upload for logo. With theme options opacity control for pages/posts background.

Theme URL - http://arizonatechgroup.com/ots
Author URL - http://tradesouthwest.com

SVN - https://themes.svn.wordpress.org/ontheside/1.4
ZIP - https://wordpress.org/themes/download/ontheside.1.4.zip?nostats=1

Diff with previous version: https://themes.trac.wordpress.org/changeset?old_path=/ontheside/1.3&new_path=/ontheside/1.4

History:

Ticket Summary Status Resolution Owner
#18705 THEME: OnTheSide - 1.5.3 closed live catchthemes

(this ticket)

#20452 THEME: OnTheSide - 1.5.6 closed live jcastaneda
#23846 THEME: OnTheSide – 1.6.2 closed live jcastaneda


https://themes.svn.wordpress.org/ontheside/1.4/screenshot.png

#44 in reply to: ↑ 41 @catchthemes
4 years ago

Replying to tradesouthwest@…:

I am not sure if the // add ie conditional html5 shim to header should be within the enqueue scripts fxn or not??? It would seem like it should be but I think because it is only used if IE browsers are present then it needs to be outside the non-conditional statements to work when only an IE browser is found.

We allow ie conditional html5 in header.php directly because it causes problems sometimes when hooked. You can add it to header directly.

#45 @catchthemes
4 years ago

Previous Issues

  • Need to remove all rss links in footer. This is plugin territory.FIXED
  • Remove function_exists check on functions.php line 87: FIXED
  • Remove function ontheside_enable_threaded_comments in functions.php : FIXED
  • function ontheside_wp_title_for_home is inside theme setup function (this is unnessary). Put this function outside the theme setup function (function ontheside_setup in line 5 functions.php)and hook it into wp_title.:
  • Remove following code and add it in theme setup function: FIXED
  • In theme-options.php line 19, replace add_action('admin_init', 'ontheside_add_init'); with add_action('admin_print_scripts-appearance_page_ontheside-options', 'ontheside_add_init'); .: FIXED
  • Credit link anchor text and title are required to be relevant and appropriate with respect to the linked site. Spam or SEO-seeded anchor text and titles may subject Themes to automatic rejection.: FIXED

New Issues

  • wp_nav_menu() needs to be referenced by theme_location.

Recommended

  • Reduce size of images in images folder. They are too big and take a lot of time to load and to download.

#46 @tradesouthwest@…
4 years ago

Change Log

1.5

  • compressed images
  • called wp_nav in theme name space fixed

#47 @tradesouthwest@…
4 years ago

  • change styles for some widgets to look better on phone screens (backgrounds)

#48 @themetracbot
4 years ago

  • Summary changed from THEME: OnTheSide - 1.4 to THEME: OnTheSide - 1.5

OnTheSide - 1.5

Full size java controlled image background support. Custom front page allows visitors to admire the photo image on your home page while listing posts or widgets without distracting view of you full page image. The default widget, on the left, will show your Menu and a Log In Meta box. Creating a new "Left Sidebar" widget from WP Admin will take precedence over the defaults but Pages-Menu will still be at top of the sidebar. Also supports image upload for logo. With theme options opacity control for pages/posts background.

Theme URL - http://arizonatechgroup.com/ots
Author URL - http://tradesouthwest.com

SVN - https://themes.svn.wordpress.org/ontheside/1.5
ZIP - https://wordpress.org/themes/download/ontheside.1.5.zip?nostats=1

Diff with previous version: https://themes.trac.wordpress.org/changeset?old_path=/ontheside/1.4&new_path=/ontheside/1.5

History:

Ticket Summary Status Resolution Owner
#18705 THEME: OnTheSide - 1.5.3 closed live catchthemes

(this ticket)

#20452 THEME: OnTheSide - 1.5.6 closed live jcastaneda
#23846 THEME: OnTheSide – 1.6.2 closed live jcastaneda


https://themes.svn.wordpress.org/ontheside/1.5/screenshot.png

#49 @catchthemes
4 years ago

Question: Have you removed the background image? I don't see background image now (i am certain it was there a few versions ago). It is there in screenshot but not when I activate the theme.

Last edited 4 years ago by catchthemes (previous) (diff)

#50 @tradesouthwest@…
4 years ago

@catchthemes: well now I have to ask - Are you telling me that you do not have the background large image showing when you load the theme?

I just opened http://arizonatechgroup.com/ots/ where the exact files were compressed from to upload the version 1.5 to wordpress.org/themes/uploads which of course is the very theme you should have.

Let me know what you are wanting to know and I will download the above zip (no-stats) file and load it in a fresh install to see if I can reproduce the event you are speaking of.

Also try to de-cache your browsers, I use bleachkit with Linux. There may be an old version stuck in your browser that did not want to load my huge image... lol.

#51 @tradesouthwest@…
4 years ago

Script problem! started after I compressed the file but somehow the compression of the image file was not the problem it started after I moved

add_theme_support( 'ontheside_custom-background', array(

into the "after-setup" action.
--
had to be replaced with

    add_theme_support( 'custom-header' ); 
    $args = array('default-color' => 'f5f5f5',
	'default-image' => get_template_directory_uri() . '/images/default-background.jpg',
    );
    add_theme_support( 'custom-background', $args );

instead of keeping:

   //* Add support for custom background
    
    add_theme_support( 'ontheside_custom-background', array(
        'wp-head-callback' => 'ontheside_custom_background_callback', 
        'default-image' => get_stylesheet_directory_uri() . '/images/default-background.png',
        'default-color' => 'afafaf',
    )); 

but don't I still need a custom-callback? I guess not, if the

function ontheside_custom_enqueue_scripts() 
    //* Load scripts only if custom background is being used
    if ( ! get_background_image() )

is used I think it over-rides the default $arguments in custom-background when a background file is loaded.

#52 @themetracbot
4 years ago

  • Summary changed from THEME: OnTheSide - 1.5 to THEME: OnTheSide - 1.5.1

OnTheSide - 1.5.1

Full size java controlled image background support. Custom front page allows visitors to admire the photo image on your home page while listing posts or widgets without distracting view of you full page image. The default widget, on the left, will show your Menu and a Log In Meta box. Creating a new "Left Sidebar" widget from WP Admin will take precedence over the defaults but Pages-Menu will still be at top of the sidebar. Also supports image upload for logo. With theme options opacity control for pages/posts background.

Theme URL - http://arizonatechgroup.com/ots
Author URL - http://tradesouthwest.com

SVN - https://themes.svn.wordpress.org/ontheside/1.5.1
ZIP - https://wordpress.org/themes/download/ontheside.1.5.1.zip?nostats=1

Diff with previous version: https://themes.trac.wordpress.org/changeset?old_path=/ontheside/1.5&new_path=/ontheside/1.5.1

History:

Ticket Summary Status Resolution Owner
#18705 THEME: OnTheSide - 1.5.3 closed live catchthemes

(this ticket)

#20452 THEME: OnTheSide - 1.5.6 closed live jcastaneda
#23846 THEME: OnTheSide – 1.6.2 closed live jcastaneda


https://themes.svn.wordpress.org/ontheside/1.5.1/screenshot.png

#53 follow-up: @tradesouthwest@…
4 years ago

We allow ie conditional html5 in header.php directly because it causes problems sometimes when hooked. You can add it to header directly.

I have had other theme reviewers tell me that the Browser conditional script MUST be loaded in the hook. So far the past three themes are hooked inside functions.php as per the reviewer. They tell me that it can NOT be added to the head directly.

I do not see a bulletin or a standardized codex release from WordPress on this issue and I would hope it would be written-in-stone by now, seeing that HTML5 is the ongoing way to construct a webpage.

This is why I have not changed the enqueue for now.

Let me know your take on this since I have been told to keep it in the functions.php file. If WP does not have a released bulletin on this it would be a great suggestion to add to codex.

#54 in reply to: ↑ 53 @catchthemes
4 years ago

Replying to tradesouthwest@…:

We allow ie conditional html5 in header.php directly because it causes problems sometimes when hooked. You can add it to header directly.

I have had other theme reviewers tell me that the Browser conditional script MUST be loaded in the hook. So far the past three themes are hooked inside functions.php as per the reviewer. They tell me that it can NOT be added to the head directly.

I do not see a bulletin or a standardized codex release from WordPress on this issue and I would hope it would be written-in-stone by now, seeing that HTML5 is the ongoing way to construct a webpage.

This is why I have not changed the enqueue for now.

Let me know your take on this since I have been told to keep it in the functions.php file. If WP does not have a released bulletin on this it would be a great suggestion to add to codex.

This is an ongoing issue. Since WordPress doesn't provide a bullet proof method for conditional ie. The way you have done is fine, i would say actually good. I will look into it and let you know if there are changes to be made. Right now I think the theme is ready to be approved. I will just do a final check and let you know the results by today. Sorry for late replies. I have been a bit busy lately.

#55 @catchthemes
4 years ago

  • Status changed from reviewing to approved

Previous Issues All FIXED Marking Theme as APPROVED.

#56 @chipbennett
4 years ago

  • Status changed from approved to reopened

#57 @chipbennett
4 years ago

  • Status changed from reopened to reviewing

Required

  • ThemeURI cannot be merely a demo
  • page-blog.php appears to be intended to display the main blog posts index. It must be implemented as home.php template file, rather than as a custom page template
  • When setting $content_width inside a callback, it must be declared as a global
  • Correct cap for add_theme_page() is edit_theme_options, not manage_options

#58 @tradesouthwest@…
4 years ago

Change Log

1.5.2

  • created better theme information website.
  • restructured hierarchy of original page content to specify home page.
  • fnx content-width put outside setup callback.
  • corrected caption for add_theme_page.
  • fixed some styles and selector attributes for conditional page calls.

Will clean up stylesheet and upload v. 1.5.2 this afternoon.

#59 @themetracbot
4 years ago

  • Summary changed from THEME: OnTheSide - 1.5.1 to THEME: OnTheSide - 1.5.2

OnTheSide - 1.5.2

Full size java controlled image background support. Custom front page allows visitors to admire the photo image on your home page while listing posts or widgets without distracting view of you full page image. The default widget, on the left, will show your Menu and a Log In Meta box. Creating a new "Left Sidebar" widget from WP Admin will take precedence over the defaults but Pages-Menu will still be at top of the sidebar. Also supports image upload for logo. With theme options opacity control for pages/posts background.

Theme URL - http://arizonatechgroup.com/ots
Author URL - http://tradesouthwest.com

SVN - https://themes.svn.wordpress.org/ontheside/1.5.2
ZIP - https://wordpress.org/themes/download/ontheside.1.5.2.zip?nostats=1

Diff with previous version: https://themes.trac.wordpress.org/changeset?old_path=/ontheside/1.5.1&new_path=/ontheside/1.5.2

History:

Ticket Summary Status Resolution Owner
#18705 THEME: OnTheSide - 1.5.3 closed live catchthemes

(this ticket)

#20452 THEME: OnTheSide - 1.5.6 closed live jcastaneda
#23846 THEME: OnTheSide – 1.6.2 closed live jcastaneda


https://themes.svn.wordpress.org/ontheside/1.5.2/screenshot.png

#60 @catchthemes
4 years ago

  • Cc chipbennett added

Issues:

  • ThemeURI cannot be merely a demo: FIXED (added theme information on theme URI)
  • page-blog.php appears to be intended to display the main blog posts index. It must be implemented as home.php template file, rather than as a custom page template: FIXED (added home.php and removed page-blog.php).
  • Correct cap for add_theme_page() is edit_theme_options, not manage_options: FIXED

  • When setting $content_width inside a callback, it must be declared as a global
    • The $content_width has been added outside theme setup function. There was a debate going on about this whether to allow anything outside a function scope in functions.php file. I will clarify this with Chip and let you know.

@chipbennett: Hi Chip, about the $content_width issue, the theme author has removed it from theme setup function and added it outside. There was a small debate going on about this issue. Can you help me with this?

#61 @chipbennett
4 years ago

$content_width definition belongs inside a callback, hooked into an appropriate action.

#62 @catchthemes
4 years ago

  • Cc chipbennett removed

Please move $ content_width inside a callback function and globalize it.

#63 @tradesouthwest@…
4 years ago

@reviewers: is this acceptable?

global $content_width;
if ( ! isset( $content_width ) ) {
$content_width = 800;
}
if ( ! isset( $content_width ) )
global $content_width;
    $content_width = 800;

or do I need the if( ! isset... ? and just

global $content_width;
    $content_width = 800;

or this:

 global $content_width;
//default array with hardcoded values for add_image_size
$size_names = array(
'thumbnail' => __('150'),
'medium' => __('320'),
'large' => __('640'),
'post-size' => __('540'),
'max-size' => __('800')
//'full' => __('Full Size') bye bye
//'custom' => __('Custom Size') suggested 
);
return $size_names;

OR, is everything fine and the above 'comment:62' states that the request for me to move the content_width inside function has been removed???

#64 @chipbennett
4 years ago

I'm not sure I'm following what, exactly, you're asking here?

#65 follow-up: @tradesouthwest@…
4 years ago

  • Is there any further issues with my theme review?
  • Did you remove the issue of content_width or is it still an issue as it stands?
  • Do I need to fix it by moving it inside of the setup fnx (and make it global) or leave it where it is and it needs no further work?

#66 in reply to: ↑ 65 @chipbennett
4 years ago

Replying to tradesouthwest@…:

  • Did you remove the issue of content_width or is it still an issue as it stands?
  • Do I need to fix it by moving it inside of the setup fnx (and make it global) or leave it where it is and it needs no further work?

$content_width definition must be inside a callback, hooked into an appropriate action.

#67 @catchthemes
4 years ago

@tradesouthwest: $content_width definition must be inside a callback function properly hooked.
i.e. remove if ( ! isset( $content_width ) ) $content_width = 800; from function.php and add following code inside in ontheside_setup() function

global $content_width;
if ( !isset( $content_width  ) ) {
      $content_width  = 800;
}

#68 @tradesouthwest@…
4 years ago

Change Log

1.5.3

  • content width updated

#69 @themetracbot
4 years ago

  • Summary changed from THEME: OnTheSide - 1.5.2 to THEME: OnTheSide - 1.5.3

OnTheSide - 1.5.3

Full size java controlled image background support. Custom front page allows visitors to admire the photo image on your home page while listing posts or widgets without distracting view of you full page image. The default widget, on the left, will show your Menu and a Log In Meta box. Creating a new "Left Sidebar" widget from WP Admin will take precedence over the defaults but Pages-Menu will still be at top of the sidebar. Also supports image upload for logo. With theme options opacity control for pages/posts background.

Theme URL - http://arizonatechgroup.com/ots
Author URL - http://tradesouthwest.com

SVN - https://themes.svn.wordpress.org/ontheside/1.5.3
ZIP - https://wordpress.org/themes/download/ontheside.1.5.3.zip?nostats=1

Diff with previous version: https://themes.trac.wordpress.org/changeset?old_path=/ontheside/1.5.2&new_path=/ontheside/1.5.3

History:

Ticket Summary Status Resolution Owner
#18705 THEME: OnTheSide - 1.5.3 closed live catchthemes

(this ticket)

#20452 THEME: OnTheSide - 1.5.6 closed live jcastaneda
#23846 THEME: OnTheSide – 1.6.2 closed live jcastaneda


https://themes.svn.wordpress.org/ontheside/1.5.3/screenshot.png

#70 @catchthemes
4 years ago

  • Status changed from reviewing to approved

All mentioned issues fixed

  • Marking theme as approved.

#71 @chipbennett
4 years ago

  • Resolution set to live
  • Status changed from approved to closed

#72 @catchthemes
4 years ago

@chipbennett: thanks Chip for your help.

@tradesouthwest: good luck with the theme.

#73 @tradesouthwest@…
4 years ago

@catchthemes & Chipbennett,
Thank you both. I learn something new every time I build a theme and I really appreciate your perseverance while working with me.

Note: See TracTickets for help on using tickets.