Posts by myownserver

5 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Located in United States
myownserver says

If you’re still looking for a WP developer, I’m savvy with WordPress plugin & theme coding and the recommended / correct way of writing WP code. I am fluent in HTML, PHP, Javascript, and CSS, but I am NOT a graphics designer. I can take a design and turn it into a functioning theme. All of my work is private-sourced work except my contributions to the WordPress core code and various blog posts sharing some technical how-to’s here and there. You can contact me privately at david[at]amereservant[dot]com . Thanks!

5 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Located in United States
myownserver says
function getPinterestCount() {
    $url = get_permalink();
    $json_string = file_get_contents( 'http://api.pinterest.com/v1/urls/count.json?callback=receiveCount&url='.$url);
        if( !$json_string )
            return false;
        $json_string = substr( $json_string, strpos($json_string,'{') );
        $json_string = substr( $json_string, 0, strrpos($json_string,'}')+1 );

    $json = json_decode($json_string, true);
        if( !is_array($json) || !isset($json['count']) )
            return false;

    return intval( $json['count'] );
}

That should work. The problem is it returns a non-valid JSON response, so you have to filter out the extra junk to get a valid JSON string to parse.

5 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Located in United States
myownserver says
5 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Located in United States
myownserver says

I spent quite some time researching this topic a short while ago…

The way GPL license applies to themes and plug-ins is if the code written depends on WordPress functions to work, then it MUST be licensed as GPL or equivalent as well. If it can run independently from the WordPress code (nearly impossible), then it doesn’t have to be licensed the same. Since themes rely on the WordPress core to load and render them, then they fall under the GPL license. As far as CSS /JS goes, there’s a very thin line there. If your JS contains any AJAX calls and/or relies on WordPress functionality, it will also likely fall under GPL licensing or equivalent.

MOST commercial themes/plug-ins do NOT comply with the WordPress GPL License because of the author’s lack of understanding of the GPL terms. The author can still make money on it by offering paid support/services in addition to the theme and by those who are honest and pay for the themes/plugins they use.

There’s several discussions on this on the Internet and while there’s several people who don’t like WordPress’ GPL license, that was the one WordPress chose to license their code by and we can either accept it or choose to use something else.

by
by
by
by
by
by