Posts by pixelentity

488 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

thanks for suggestion but I did not use any shortcodes :(
forget about the name (actually there’s a typo in my previous post as function name is shortcode_atts)

what that function does is setting a default value for keys not set in the 2nd array.

488 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

Honestly, for theme options, we just set default values once. A very simple way to do it by using http://codex.wordpress.org/Function_Reference/shortcode_atts

$options = shortcode_adds($defaults,$options)
488 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

why not? I just call them in theme options. which only use once. it’s simple the code.
done few times the overhead is negligible so it really doesn’t matter but, if it’s all around in your code, including nested loops, you may want to avoid unnecessary functions call and use directly
if (isset($var)) echo $var;
488 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

function prevent_notice($var){
    if(isset($var)){
        echo $var;
    }
}
inefficient due the extra function call.

BF

488 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

We asked support about this recently. In our case it was concerning a HTML template which was old but popular. When building a WP version of it recently, we completely rebuilt the original HTML template, adding responsiveness, bootstrap framework etc, and were wondering if there was a possibility of releasing the rebuilt version as a new template.

Basically support told us the answer was no, unless the new one did not look like the old one (totally new design), or that it had some significant additional features, which would enhance the template’s fundamental use ( e-commerce support ). There was a 3rd condition, which I can’t remember now, might have been something like if it’s made using a different technology (Drupal, WP, Magento etc.)

So in the end we did nothing with the old template.

488 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

I really can’t say what’s the difference between mine and your code (since they both modify ‘the_content‘) but if this is accepted, I’ll start using it then.
you’re right, doesn’t require the extra “[raw]” but the principle is the same: it only gets applied where it should and leaves native/plugin defined shortcodes untouched.

We use in all our themes, only thing is we always include a note in “reviewer info” box to explain how it works just to be safe.

BF

488 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

The following is a custom filter we created to solve the same issue in our themes, feel free to use if it works for you as well:

https://gist.github.com/4555047
488 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

I think that authors should have the ability to refund customers
can’t agree more
488 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

Needed to add a custom image filter, again no docs on the subject, most likely broken the swearing world record, here’s an example:

WordPress 3.5 media upload api: toolbar with custom filter

BF

488 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

The new media uploader api is amazing as much as its complete lack of documentation. So i started digging into the javascript sources, a few hours (and a good amount of blasphemies) later, i was able to come out with a working example:

WordPress 3.5 media upload api example

by
by
by
by
by
by