This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| server_name <domain> | |
| server_name_in_redirect off; | |
| access_log logs/<domain>.access.log; | |
| error_log logs/<domain>.error.log; | |
| gzip_static on; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // NOTE: verify-purchase has been deprecated and it's best to use the new /author/sale endpoint as documented on http://build.envato.com/ | |
| // created by Envato user wpdreams https://forums.envato.com/t/verify-purchase-class/3526 | |
| // usage example: | |
| $o = EnvatoApi2::verifyPurchase( $purchase_code ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Here's a couple of metaboxes that I've recently created using this system | |
| */ | |
| $subpostings = redrokk_metabox_class::getInstance('subpostings', array( | |
| 'title' => '(optional) Subscription for Postings', | |
| 'description' => "As an optional feature, you have a complete api at your disposal which will allow you the ability to offer and manage member posts. In addition to these settings, you may need to create the associated pages for accepting posts from your frontend.", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //How to edit a user profile on the front end? | |
| //http://wordpress.stackexchange.com/questions/9775/how-to-edit-a-user-profile-on-the-front-end | |
| //Forcing nickname as display_name in custom edit profile template | |
| //http://wordpress.stackexchange.com/questions/35403/forcing-nickname-as-display-name-in-custom-edit-profile-template | |
| /////// | |
| <?php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function loadVid(){ | |
| var videourl = 'urltoyourvideo here'; // set the url to your video file here | |
| var videocontainer = '#videocontainer'; // set the ID of the container that you want to insert the video in | |
| var parameter = new Date().getMilliseconds(); // generate variable based on current date/time | |
| var video = '<video width="1102" height="720" id="intro-video" autoplay loop src="' + videourl + '?t=' + parameter + '"></video>'; // setup the video element | |
| $(videocontainer).append(video); // insert the video element into its container | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: wordpress assist clean header | |
| Plugin URI: http://www.wordpressassist.nl/ | |
| Description: Remove shortlink hook | |
| Version: 1.0 | |
| Author: AukeJomm | |
| Author URI: http://www.aukejongbloed.nl | |
| */ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include_once(ABSPATH . WPINC . '/feed.php'); | |
| if(function_exists('fetch_feed')) { | |
| $feed = fetch_feed('http://example.com/feed/'); | |
| if (!is_wp_error($feed)) : $feed->init(); | |
| $feed->set_output_encoding('UTF-8'); // set encoding | |
| $feed->handle_content_type(); // ensure encoding | |
| $feed->set_cache_duration(21600); // six hours in seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* =============== Starts: Shortcode to display RSS Feeds using WordPress fetch_feed() ================== */ | |
| /* Shortcode Example: [news_list] | |
| Example Feed URL: | |
| => 'http://online.wsj.com/xml/rss/3_8068.xml' | |
| => 'http://dealbook.nytimes.com/feed/' | |
| => 'http://www.bloomberg.com/feed/bview/' | |
| */ | |
| function news_page_fx( $atts ) { | |
| extract( shortcode_atts( array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $curl = curl_init(); | |
| curl_setopt_array($curl, Array( | |
| CURLOPT_URL => 'http://blogs.guggenheim.org/map/feed/', | |
| CURLOPT_USERAGENT => 'spider', | |
| CURLOPT_TIMEOUT => 120, | |
| CURLOPT_CONNECTTIMEOUT => 30, | |
| CURLOPT_RETURNTRANSFER => TRUE, |
NewerOlder