Posts by srhnbr

204 posts Bold WordPress Theme Development
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Interviewed on an Envato blog
+6 more
srhnbr says

@beowulf Is there a particular reason why you register and then enqueue your script?

“The wp_enqueue_script function does the same thing as wp_register_script except that the src variable is optional. If a src is provided, the enqueue function automatically registers the script for you, thus making the wp_register_script function somewhat unnecessary. “

Also, you should add your hook on “template_redirect”.

Try this:

function slider_content_scripts() {
    $slider_choice = of_get_option('slider_choice');

    if ( is_front_page() && $slider_choice == 'content') {

       wp_enqueue_script('slides', get_template_directory_uri() . '/js/slides.min.jquery.js', 'jquery');
    }
}

add_action('template_redirect', 'slider_content_scripts');
204 posts Bold WordPress Theme Development
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Interviewed on an Envato blog
+6 more
srhnbr says

Thanks guys! So you would suggest not to use the “roles” (administrator, editor, etc) but rather the “capabilities” (manage_options, etc), right? I’ll give it a go and update this thread

@ThemeProvince: I think I’ll stay away from level_8 etc because of this: http://codex.wordpress.org/User_Levels don’t you think?

204 posts Bold WordPress Theme Development
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Interviewed on an Envato blog
+6 more
srhnbr says

Hey everyone. I’m working on displaying certain (WordPress) custom admin pages to certain WordPress users based on their roles (Admin, Editor etc)

So I assigned submenu 1 to the Admin and submenus 2 and 3 to the Editor.

add_submenu_page( $parent_slug, $page_title, 'submenu 1', 'administrator', $menu_slug, $function ); 

add_submenu_page( $parent_slug, $page_title, 'submenu 2', 'editor', $menu_slug, $function ); 

add_submenu_page( $parent_slug, $page_title, 'submenu 3', 'editor', $menu_slug, $function ); 

Well, this is what happens: The Editor sees submenus 2 and 3 so that’s good but the admin sees only submenu 1! I thought that the admin would be able to see submenus 1, 2 and 3! It looks I was wrong in thinking this.

What would you suggest I do so that the admin sees all 3 submenus while the editor sees only those menus assigned to him?

204 posts Bold WordPress Theme Development
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Interviewed on an Envato blog
+6 more
srhnbr says

Our eCommerce themes handle digital goods :)

Customers get a link to download what they have purchased on the confirmation page (after payment has been made)

You can see screenshots of the purchase process here. Feel free to use the contact form at the bottom of our pre-sales question page should you have any follow-up questions.

Hope this helps!

204 posts Bold WordPress Theme Development
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Interviewed on an Envato blog
+6 more
srhnbr says

Now put a “special offer discount price” tag on it and let buyers know that if they don’t buy it now they have to pay more later ;)

Good one! :)

204 posts Bold WordPress Theme Development
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Interviewed on an Envato blog
+6 more
srhnbr says

@OrganicBeeMedia

thank you kindly for the reply but I don’t think you actually read my question ;)

I was not asking how to use the Settings API but how to validate a particular user input!

Anyway I got it figured out. If anyone is interested here’s the correct regular expression

preg_match('/^\d+(?:[,]\d+)*(?:[,]\s\d+)*$/', $input[$option['id']])
204 posts Bold WordPress Theme Development
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Interviewed on an Envato blog
+6 more
srhnbr says

Hey everyone.

I’m trying to validate comma separated numbers as in the case of asking a WordPress admin to enter category or page IDs in a text input field.

The value entered may or may not include multiple numeric IDs so I need to validate both cases so:

a) 12

b) 123,456,789

someone may enter the comma separated IDs also like so:
c) 123, 456, 789

I thought this would work:

preg_match('/^\d(?:[,]\d)*(?:[,]\s\d)*$/', $input[$option['id']]);

then use the result in a conditional that will pass the value if there is a match to my $valid_input array

but it fails miserably :( I think my regular expession is wrong.

Could anyone help? Please?

204 posts Bold WordPress Theme Development
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Interviewed on an Envato blog
+6 more
srhnbr says

With WP 3 .1, we can’t use $query_string like:

query_posts( $query_string . ‘&cat=13 );

Do you guys know any solution or any alternative?

How about if you use this:

global $query_string; $posts = query_posts($query_string . '&cat=13');

Does it work then?

204 posts Bold WordPress Theme Development
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Interviewed on an Envato blog
+6 more
srhnbr says

The verification problem is gone with the latest Envato API change. You can now validate against a purchase code that the buyer enters :)

Kriesi, could you possibly point me to the right direction for this? I’d like to be able to make use of that for a more automated verification process for what we use. Please?

204 posts Bold WordPress Theme Development
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Interviewed on an Envato blog
+6 more
srhnbr says

Anybody else having trouble getting responses from srhnbr for the TheClotheShop theme? I need a support ticket and I’ve sent three emails already and nothing. Does anybody know a way to get a support ticket to view the Wiki?

Hey Steve I’m here don’t worry ;)

If you have been trying to contact me over the pre-sales contact page then that would explain why you did not receive a reply yet.

At the top of that pre-sales contact form it states quite clearly

This form is ONLY for Pre-Sale Questions. For support questions please use the Support Section

I see now that you have finally emailed me from my TF profile here and I have already replied :)

The delay was due to our time difference you see so let’s address your questions at the support desk shall we?

Thanks!

by
by
by
by
by
by