This file contains 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 declare(strict_types=1); | |
/** | |
* Plugin Name: Emoji Removel. | |
* Description: Remove all Emoji support to laod faster on back - and front-end. | |
*/ | |
add_action( | |
'init', | |
function () { | |
remove_action('wp_head', 'print_emoji_detection_script', 7); |
This file contains 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
// More background | |
// @see http://wordpress.stackexchange.com/questions/102554 | |
add_filter( 'http_request_args', 'fb_hidden_theme_12345', 5, 2 ); | |
function fb_hidden_theme_12345( $r, $url ) { | |
if ( FALSE !== strpos( $url, 'https://api.wordpress.org/themes/update-check' ) ) | |
return $r; // Not a theme update request. Bail immediately. | |
This file contains 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
INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('99', 'my_login_name', MD5('my_password'), 'My Name', 'mail@example.com', '', '2011-06-09 00:00:00', '', '0', 'display_name'); | |
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '99', 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}'); | |
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '99', 'wp_user_level', '10'); |
This file contains 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: Comment meta data test | |
Version: 1.0 | |
Plugin URI: http://wpengineer.com | |
Description: Comment meta data test | |
Author: Latz | |
Author URI: http://wpengineer.com | |
*/ |
This file contains 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
via http://wordpress.stackexchange.com/questions/2623/include-custom-taxonomy-term-in-search/5404#5404 | |
function atom_search_where($where){ | |
global $wpdb; | |
if ( is_search() ) | |
$where .= "OR (t.name LIKE '%".get_search_query() . "%' AND {$wpdb->posts} . post_status = 'publish')"; | |
return $where; | |
} |
This file contains 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
HTML: | |
<a lass="viewsource" title="view Source of this page" href="http://example.org/viewsource/?url=http://example.org/">view source</a> | |
JS, jQuery Plugin: | |
http://swip.codylindley.com/DOMWindowDemo.html | |
inline JS: | |
<script type="text/javascript"> | |
$('.viewsource').openDOMWindow({ | |
height:'90%', |
This file contains 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 get_google_plus1_count($url) | |
{ | |
$ch = curl_init(); | |
curl_setopt_array($ch, array( | |
CURLOPT_HTTPHEADER => array('Content-type: application/json'), | |
CURLOPT_POST => true, | |
CURLOPT_POSTFIELDS => '[{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"'.$url.'","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]', | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_SSL_VERIFYPEER => false, | |
CURLOPT_URL => 'https://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ' |
This file contains 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 | |
/** | |
* Widget | |
* @author | |
* @package | |
*/ | |
// TODO: change 'Fb_Wp_Widget_Basis' to the name of your actual plugin | |
class Fb_Wp_Widget_Basis extends WP_Widget { | |
This file contains 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: Mobile First Responsive Images | |
Description: Serve up smaller images to smaller screens. | |
Version: 0.1.1 | |
Author: Matt Wiebe | |
Author URI: http://somadesign.ca/ | |
*/ | |
/** |
This file contains 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: Remove br in pre | |
* Plugin URI: http://wordpress.stackexchange.com/questions/39843/no-filter-of-code-on-switch-from-html-to-visual-editor-how | |
* Text Domain: | |
* Domain Path: /languages | |
* Description: | |
* Version: beta | |
* Author: Frank Bültge | |
* Author URI: http://bueltge.de |