Hi Emil,<br><br>For the Admin Enqueue I had created simplecatch_admin_scripts() and simplecatch_admin_styles() which is called only in admin section inside the function simplecatch_options_menu() // admin_print_scripts-(hookname) and add_print_styles-(hookname)<br>
add_action( 'admin_print_scripts-' . $simplecatch_options, 'simplecatch_admin_scripts' );<br>
add_action( 'admin_print_styles-' . $simplecatch_options, 'simplecatch_admin_styles' );<br>
<br>
// admin_print_scripts-(hookname) and add_print_styles-(hookname)<br>
add_action( 'admin_print_scripts-' . $slider_options, 'simplecatch_admin_scripts' );<br>
add_action( 'admin_print_styles-' . $slider_options, 'simplecatch_admin_styles' );<br><br>I have pasted the code as below. Isn't this correct as this similar to what you have mention to the comment. I think this should also work. If not then can you tell me why not.<br>
<br>Regards,<br>Sakin<br><br>/**<br> * Enqueue admin script<br> *<br> * @uses wp_enqueue_script <br> * @Calling jquery, jquery-ui-tabs,jquery-cookie, jquery-ui-sortable, jquery-ui-draggable<br> */<br>function simplecatch_admin_scripts() {<br>
//jquery-cookie registered in functions.php<br> wp_register_script( 'simplecatch_admin', get_template_directory_uri().'/functions/panel/admin.js', array( 'jquery', 'jquery-ui-tabs', 'jquery-cookie', 'jquery-ui-sortable', 'jquery-ui-draggable' ), '1.0', false );<br>
wp_enqueue_script ( 'simplecatch_admin' );<br> //registering add_image_script.js and enqueue<br> wp_register_script( 'simplecatch_upload', get_template_directory_uri().'/functions/panel/add_image_scripts.js', array( 'jquery','media-upload','thickbox' ) );<br>
wp_enqueue_script( 'simplecatch_upload' );<br>}<br><br><br>/**<br> * Enqueue admin stylesheet<br> *<br> * @uses wp_enqueue_style<br> */<br>function simplecatch_admin_styles() {<br> wp_enqueue_style( 'simplecatch_admin',get_template_directory_uri().'/functions/panel/admin.css', array(), '1.0', 'screen' );<br>
//Enqueue thickbox.css<br> wp_enqueue_style( 'thickbox' );<br>}<br><br><br>/*<br> * Create a function for Theme Options Page<br> *<br> * @uses add_menu_page<br> * @add action admin_menu <br> */<br>add_action( 'admin_menu', 'simplecatch_options_menu' );<br>
function simplecatch_options_menu() {<br> <br> $simplecatch_options = add_theme_page( <br> sprintf( esc_html__( '%s Theme Options', 'simplecatch' ), get_bloginfo( 'name') ), // Name of page<br>
__( 'Theme Options', 'simplecatch' ), // Label in menu<br> 'edit_theme_options', // Capability required<br> 'simplecatch_options', // Menu slug, used to uniquely identify the page<br>
'simplecatch_options_page'<br> ); // Function that renders the options page<br> <br> $slider_options = add_theme_page( <br> sprintf( esc_html__( '%s Slider', 'simplecatch' ), get_bloginfo( 'name') ), // Name of page<br>
__( 'Featured Slider', 'simplecatch' ), // Label in menu<br> 'edit_theme_options', // Capability required<br> 'simplecatch_options_slider', // Menu slug, used to uniquely identify the page<br>
'simplecatch_options_slider_page' // Function that renders the options page<br> );<br> <br> // admin_print_scripts-(hookname) and add_print_styles-(hookname)<br> add_action( 'admin_print_scripts-' . $simplecatch_options, 'simplecatch_admin_scripts' );<br>
add_action( 'admin_print_styles-' . $simplecatch_options, 'simplecatch_admin_styles' );<br> <br> // admin_print_scripts-(hookname) and add_print_styles-(hookname)<br> add_action( 'admin_print_scripts-' . $slider_options, 'simplecatch_admin_scripts' );<br>
add_action( 'admin_print_styles-' . $slider_options, 'simplecatch_admin_styles' );<br>}<br>add_action( 'admin_menu', 'simplecatch_options_menu' );<br><div class="gmail_quote">On Sun, Jun 3, 2012 at 3:10 PM, Emil Uzelac <span dir="ltr"><<a href="mailto:emil@themeid.com" target="_blank">emil@themeid.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font color="#333333"><font><font face="arial,helvetica,sans-serif">Hi,</font></font></font><div><font color="#333333"><font><font face="arial,helvetica,sans-serif"><br>
</font></font></font></div><div><font color="#333333"><font><font face="arial,helvetica,sans-serif">2nd opinion will come from other admins or reviewers :)</font></font></font></div>
<div><font color="#333333"><font><font face="arial,helvetica,sans-serif"><br></font></font></font></div><div><font color="#333333"><font><font face="arial,helvetica,sans-serif">Emil<br></font></font></font><br><div class="gmail_quote">
<div><div class="h5">
On Sun, Jun 3, 2012 at 4:24 AM, Sakin Shrestha <span dir="ltr"><<a href="mailto:info@catchinternet.com" target="_blank">info@catchinternet.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
Hi Emil,<br><br>Sorry this is not my question. My question if that why my theme is being issue for IE specific style and scripts. Where I can see your WordPress default theme Twenty Eleven theme is using it. This is not fair. If my theme is check against this script then twenty eleven theme should also be checked. This should be equal to everyone.<br>
<br>Another is about the <b>License: (2nd opinion needed). </b>I asked you help in this as I am new to theme development in WordPress repo. So, if you help me with this that What should I add it additional for this css <a href="http://978.gs" target="_blank">http://978.gs</a><br>
<br>Regards,<br>Sakin <br><div><div><br><div class="gmail_quote">On Sun, Jun 3, 2012 at 2:56 PM, WordPress Themes <span dir="ltr"><<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>#7867: THEME: Simple Catch - 1.1<br>
-------------------------------+-----------------------<br>
Reporter: catchthemes | Owner: figerty<br>
Type: theme | Status: reopened<br>
Priority: major | Resolution:<br>
Keywords: theme-simple-catch |<br>
-------------------------------+-----------------------<br>
<br>
</div>Comment (by emiluzelac):<br>
<br>
For styles you can use [<a href="http://modernizr.com/" target="_blank">http://modernizr.com/</a> Modernizr]. It's easy and<br>
very effective too and go after specific IE browsers. Since we don't have<br>
any good if IE alternatives you can disregard that. I do know that default<br>
Theme is using it and perhaps that also is not the best solution either.<br>
<span><font color="#888888"><br>
--<br>
Ticket URL: <<a href="http://themes.trac.wordpress.org/ticket/7867#comment:5" target="_blank">http://themes.trac.wordpress.org/ticket/7867#comment:5</a>><br>
</font></span><div><div>WordPress Themes <<a href="http://themes.trac.wordpress.org/" target="_blank">http://themes.trac.wordpress.org/</a>><br>
WordPress.org Theme Directory Reviews<br>
</div></div></blockquote></div><br>
</div></div><br></div></div>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br>