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: MyNewsDesk Importer | |
Description: Imports news via API from NyNewsDesk as post type for news | |
Version: 1.0 | |
Author: Webbgaraget | |
Author URI: http://www.webbgaraget.se | |
*/ | |
class MND_News_Importer | |
{ |
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
<ul class="network-list"> | |
<li class="network-node austria"> | |
<a href="#">Austria</a> | |
</li> | |
<li class="network-node belgium"> | |
<a href="#">Belgium</a> | |
</li> | |
<!-- […] --> | |
</ul> |
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 a list of all ALTER commands needed to change collation on all tables in the given database | |
Note: Remember to set your database name on line 7, and change utf8_swedish_ci to the collation of your choice | |
Props goes to this answer on StackOverflow: http://stackoverflow.com/a/19462205 | |
*/ | |
SELECT CONCAT("ALTER TABLE `", TABLE_NAME,"` CONVERT TO CHARACTER SET utf8 COLLATE utf8_swedish_ci;") AS mySQL | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE TABLE_SCHEMA="YOUR_DATABASE_NAME" | |
AND TABLE_TYPE="BASE TABLE" |
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
var $item = $(...); | |
var $itemList = $(...); | |
// [...] | |
$item.find('img').on('load', function () | |
{ | |
$itemList.isotope('reLayout'); | |
}); |
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 | |
function wg_add_new_posts_to_heartbeat_response( $response, $data ) | |
{ | |
if ( ! isset( $data['wg-posts-autoreload'] ) ) | |
return $response; // No client of ours has requested new posts | |
$posts = wg_get_posts_since_timestamp( $data['wg-posts-autoreload'] ); | |
if ( count( $posts ) === 0 ) | |
return $response; // There were no new posts |
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 | |
/** | |
* Sample theme index.php to be used with WG Posts Autoreload | |
*/ | |
get_header(); | |
if ( have_posts() ) | |
{ | |
echo '<div id="posts">'; |
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
# Undviker att botnet-attacken ska få göra inloggningsförsök. | |
# Se här: http://www.warriorforum.com/main-internet-marketing-discussion-forum/789591-how-botnet-attack-looks-like-what-you-can-do-about.html | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_METHOD} POST | |
RewriteCond %{HTTP_USER_AGENT} Mozilla/5\.0\ \(Windows\ NT\ 6\.1;\ rv\:19\.0\)\ Gecko/20100101\ Firefox/19\.0 [NC] | |
RewriteCond %{REQUEST_URI} wp-login\.php | |
RewriteRule .* - [F] | |
</IfModule> |
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 | |
/** | |
* Tar bort den transient som genererats för postlistan med | |
* alfabetisk paginering. | |
* | |
* @wp-hook save_post,before_delete_post | |
* @param int $post_id ID på posten som sparas/raderas | |
*/ | |
function wg_clear_postlist_cache( $post_id ) |
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
button, | |
input[type=text], | |
input[type=submit], | |
textarea { | |
-webkit-appearance: none; | |
-webkit-border-radius: 0; | |
} |
NewerOlder