http://graph.facebook.com?id=POST_URL
| function retry(isDone, next) { | |
| var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false; | |
| var id = window.setInterval( | |
| function() { | |
| if (isDone()) { | |
| window.clearInterval(id); | |
| next(is_timeout); | |
| } | |
| if (current_trial++ > max_retry) { | |
| window.clearInterval(id); |
| <?php | |
| /** | |
| * Fix for missing scheduled post | |
| * | |
| * @param array $schedules Cron Schedules. | |
| * | |
| * @return array | |
| */ | |
| function lc_cron_schedules( array $schedules ) : array { | |
| $schedules['lc_publish_missed_scheduled_posts'] = [ |
| <?php | |
| /* | |
| Plugin Name: Plugin name | |
| Plugin URI: http://pluginurl.com | |
| Description: Plugin description | |
| Version: 1.0.0 | |
| Author: Plugin author | |
| Author URI: http://pluginauthorurl.com | |
| Text Domain: plugin-name | |
| */ |
| #!/bin/bash | |
| # paths | |
| SRC_DIR=$(git rev-parse --show-toplevel) | |
| DIR_NAME=$(basename $SRC_DIR) | |
| #MSG=${1-'Deploying $DIR_NAME from GitHub'} | |
| #BRANCH=${2-'trunk'} | |
| MSG="Deploying $DIR_NAME from GitHub" | |
| BRANCH="trunk" | |
| DEST_DIR=~/svn/wordpress_plugins/$DIR_NAME/$BRANCH |
| Utility.send_exception_to_ga = function() | |
| { | |
| if(true || window.settings && window.settings.debug) | |
| { | |
| return; | |
| } | |
| var gOldOnError = window.onerror; | |
| window.onerror = function(message, url, line) { | |
| var e_obj = [ | |
| "_trackEvent" |
| <?php | |
| // Max Integer | |
| define('MAX', 1000000); | |
| // Create An Array Till MAX | |
| $original = range(1, MAX); | |
| // Shuffle The Array While Preserving Keys | |
| $shuffle = $original; | |
| shuffle_assoc($shuffle); |
| <?php | |
| function wp_signon( $credentials = '', $secure_cookie = '' ) { | |
| if ( empty($credentials) ) { | |
| if ( ! empty($_POST['log']) ) | |
| $credentials['user_login'] = $_POST['log']; | |
| if ( ! empty($_POST['pwd']) ) | |
| $credentials['user_password'] = $_POST['pwd']; | |
| if ( ! empty($_POST['rememberme']) ) | |
| $credentials['remember'] = $_POST['rememberme']; | |
| } |
| location ~ \.(hh|php)$ { | |
| proxy_intercept_errors on; | |
| error_page 502 = @fallback; | |
| try_files $uri =404; | |
| fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
| if (!-f $document_root$fastcgi_script_name) { | |
| return 404; | |
| } |
| <?php | |
| /** | |
| * Delete revisions from WordPress | |
| */ | |
| define( 'WP_USE_THEMES', false ); | |
| if( ! empty( $_SERVER['WP_DIR'] ) ) { | |
| require( $_SERVER['WP_DIR'] . '/wp-blog-header.php' ); | |
| } elseif( is_file( 'wp-blog-header.php' ) ) { | |
| require( 'wp-blog-header.php' ); | |
| } else { |