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
| /******* IN wp-config.php add the following: ******/ | |
| /* WSI HYBRIDAUTH SESSIONS HANDLING */ | |
| define('WSI_PHP_SESSION', dirname(__FILE__) . '/phpsession'); | |
| session_save_path(WSI_PHP_SESSION); | |
| /******* wp-content/plugins/wordpress-social-inivtations/wp-social-invitations.php and wp-content/plugins/wordpress-social-inivtations/hybridauth/index.php add the following: ******/ | |
| /* WSI HYBRIDAUTH SESSIONS HANDLING */ | |
| session_save_path(WSI_PHP_SESSION); |
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
| /** | |
| * IF you have a States model and you want to create a simple dropdown in your views you can pass the array very easily doing: | |
| **/ | |
| public function create() | |
| { | |
| // first parameter is option label and second the option value | |
| $states = State::lists('state', 'id'); | |
| return View::make('anuncios.create', compact('states')); | |
| } |
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: Wp Remote Test | |
| * Plugin URI: | |
| * Version: 0.1 | |
| * Description: Debug wp_remote_get and wp_remote_post | |
| * Author: Damian Logghe | |
| * Author URI: http://wp.timersys.com | |
| */ |
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
| download curl from http://ftp.sunet.se/pub/www/utilities/curl/curl-7.40.0.tar.bz2 | |
| Configure it with ./configure --prefix=/Applications/MAMP/Library/ | |
| make && make install |
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
| /** | |
| * As many of you know after Poodle was released sslv3 was deactivated all over the internet and new problems arises | |
| * when ciphers mismatch. If you get with wp_remote_ errors like: routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure | |
| * routines:SSL3_READ_BYTES:sslv3 alert handshake failure or Cannot communicate securely with peer: no common encryption algorithm(s). | |
| * Try to add the following action to modify curl. | |
| **/ | |
| add_action( 'http_api_curl', 'timersys_api_curl', 10, 3 ); | |
| function timersys_api_curl(&$handle, $args, $url){ |
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
| # Apache config | |
| <FilesMatch ".(eot|ttf|otf|woff)"> | |
| Header set Access-Control-Allow-Origin "*" | |
| </FilesMatch> |
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
| // hook to wsi bp screen | |
| add_action('wsi/bp/screen_one' , 'attach_my_screen'); | |
| function attach_my_screen() { | |
| // hook to bp template | |
| add_action( 'bp_template_content' , 'bp_template_content_func',9 ); | |
| } | |
| // My actual text | |
| function bp_template_content_func() { | |
| echo "My content goes here"; | |
| } |
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
| #EDD + Nginx - protect your files | |
| location ~ ^/wp-content/uploads/edd/(.*?)\.zip$ { | |
| rewrite / permanent; | |
| } |
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
| // To open popup with ID 3 on same page (preferred) | |
| <a href="" class="spu-open-3" title="Click here">Click here</a> | |
| // Another way | |
| <a href="#spu-3" title="Click here">Click here</a> | |
| // To go to a new page and open a popup there | |
| <a href="http://mydomain.com/new-page/#spu-3" title="Click here">Click here</a> |
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 | |
| /** | |
| * Display all errors no matter what | |
| * / | |
| error_reporting(E_ALL); | |
| ini_set('display_errors', 1); | |
| /** | |
| * Find where the class was defined |