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 | |
| /** | |
| * Use HTTPS for some sites of network | |
| */ | |
| function rsssl_check_protocol_multisite($url, $scheme, $orig_scheme){ | |
| if(get_current_blog_id() == 23){ | |
| $url = str_replace("http://", "https://", $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
| <?php | |
| /* | |
| Plugin Name: Gutenberg - disable CPT | |
| Description: Отключаем поддержку Gutenberg для постов типа Продукт | |
| Author: uptimizt | |
| Version: 1.0 | |
| Author URI: http://wpcraft.ru | |
| */ | |
| // Use hook return apply_filters( 'gutenberg_can_edit_post_type', $can_edit, $post_type ); |
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 | |
| /** | |
| * If isset cookie - clear value and redirect to url | |
| */ | |
| function redirect_after_signin(){ | |
| if(is_user_logged_in()){ | |
| if( ! empty($_COOKIE["redirect_url_sso"])){ | |
| $url = $_COOKIE["redirect_url_sso"]; | |
| setcookie("redirect_url_sso", "", time() - 3600); |
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 | |
| /** | |
| * Request wrapper for API AmoCRM | |
| */ | |
| function wooac_request($ep = '', $method = 'GET', $data = array()) | |
| { | |
| try { | |
| $cookies = get_transient('wooac_cookies'); |
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 | |
| /** | |
| * AmoCRM API Wrapper | |
| */ | |
| class WooAC_API_Wrapper | |
| { | |
| protected $curl; | |
| protected $url_domain; |
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
| echo "Loading ioncube" | |
| wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz | |
| echo "Unzipping ioncube" | |
| tar xvfz ioncube_loaders_lin_x86-64.tar.gz | |
| echo "Move ioncube to usr/local" | |
| mv ioncube /usr/local | |
| echo "Add ioncube to php.ini" | |
| sudo sed -i 1i"zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.4.so" /etc/php5/fpm/conf.d/zzzz_custom.ini | |
| sudo sed -i 1i"zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.4.so" /etc/php5/cli/conf.d/zzzz_custom.ini | |
| echo "Restarting Apache and FPM" |
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 { | |
| # base nginx conf | |
| location ~ ^/wp-content/uploads/(.*) { | |
| try_files $uri @live_uploads; | |
| } | |
| location @live_uploads { |
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
| #!/bin/bash | |
| crontab -l | { cat; echo "*/1 * * * * curl http://site.lcl/wp-cron.php?doing_wp_cron > /dev/null 2>&1"; } | crontab - |
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
| /** | |
| * Get data from a URL | |
| * @param {String} url The URL to get | |
| * @param {Function} success Callback to run on success | |
| * @param {Function} error Callback to run on error | |
| */ | |
| var getURL = function ( url, success, error ) { | |
| // Feature detection | |
| if ( !window.XMLHttpRequest ) return; |