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
| # -*- mode: ruby -*- | |
| # vim: set ft=ruby : | |
| # vim: set smartindent | |
| # vim: set tabstop=2 | |
| # vim: set shiftwidth=2 | |
| provision = true | |
| vagrant_api_version = "2" | |
| boxes = [ |
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 REST API Subdomain | |
| * Plugin URI: https://wordpress.org/plugins/wp-rest-api-subdomain/ | |
| * Author: Mark McWilliams | |
| * Author URI: https://profiles.wordpress.org/markmcwilliams/ | |
| * License: GPLv2 or later | |
| * License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
| * Description: Move your RESTful API to a subdomain in WordPress |
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 | |
| /*///////////////////////////////////////////////////////////////////////////////////// | |
| //// Load scripts and styles for Meta box */ | |
| // enqueue scripts and styles, but only if is_admin | |
| if(is_admin()) { | |
| wp_enqueue_script('jquery-ui-datepicker'); | |
| wp_enqueue_script('jquery-ui-slider'); | |
| wp_enqueue_script('custom-js', get_template_directory_uri().'/library/metaboxes/js/custom-js.js'); | |
| wp_enqueue_style('jquery-ui-custom', get_template_directory_uri().'/library/metaboxes/css/jquery-ui-custom.css'); |
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
| #!/usr/bin/env python | |
| import re | |
| import json | |
| import requests | |
| HEADERS = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36'} | |
| POST_HEADERS = {'origin': 'https://msdn.itellyou.cn', 'referer': 'https://msdn.itellyou.cn/'} | |
| def main(): |
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 | |
| $default_avatar = 'http://zacvineyard.com/blog/wp-content/themes/zac/images/default-avatar.png'; | |
| ?> | |
| <a id="comments"></a> | |
| <h2>Comments</h2> | |
| <?php if($comments) : ?> | |
| <ol class="comments"> | |
| <?php foreach($comments as $comment) : ?> | |
| <li id="comment-<?php comment_ID(); ?>" class="<?php if ($comment->user_id == 1) echo "authcomment";?>"> | |
| <?php if ($comment->comment_approved == '0') : ?> |
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 | |
| /** | |
| * Comment form hidden fields | |
| */ | |
| function comment_form_hidden_fields() | |
| { | |
| comment_id_fields(); | |
| if ( current_user_can( 'unfiltered_html' ) ) | |
| { |
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
| /** | |
| * Archive pagination | |
| * @param string $prevText Previous page link text. Leave blank to ignore. | |
| * @param string $nextText Next page link text. Leave blank to ignore. | |
| * @param integer $break Number of page links to display before truncation. Set to 0 to ignore. | |
| */ | |
| public static function archive_pagination($prevText = 'Previous', $nextText = 'Next', $break = 10) | |
| { | |
| // Maximum pages | |
| global $wp_query; |