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
<Files wp-login.php> | |
Order deny,allow | |
Deny from All | |
Allow from 123.123.123.123 111.111.111.111 | |
</Files> |
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
<Files wp-login.php> | |
order deny,allow | |
deny from 123.123.123.123 | |
allow from all | |
</Files> |
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
filter: | |
excluded_paths: | |
- 'languages/*' | |
- 'lib/*' | |
- 'tests/*' | |
paths: | |
- 'inc/*' | |
- '*' | |
tools: | |
php_cpd: |
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 | |
function wpse_filter_child_cats( $query ) { | |
if ( $query->is_category ) { | |
$queried_object = get_queried_object(); | |
$child_cats = (array) get_term_children( $queried_object->term_id, 'category' ); | |
if ( ! $query->is_admin ) | |
//exclude the posts in child categories |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 ( $ ) { | |
"use strict"; | |
var post_ID = $('#post_ID').val(), | |
parent_id = ( '' == $('#parent_id').val() ) ? 0 : $('#parent_id').val(), | |
addNew = $('.add-new-h2'), | |
html = ''; | |
html += ' <a id="add_new_sibling" href="post-new.php?post_type=' + typenow + '&parent_id=' + parent_id + '" class="add-new-h2" target="_blank">' + quick_add_child_js_params.add_new_sibling + '</a>'; | |
html += '<a id="add_new_child" href="post-new.php?post_type=' + typenow + '&parent_id=' + post_ID + '" class="add-new-h2" target="_blank">' + quick_add_child_js_params.add_new_child + '</a>'; |
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 | |
function my_list_categories( $output, $args ) { | |
$pattern = '/(<a.*?>)/'; | |
$replacement = '$1<i class="ico-my"></i> '; | |
return preg_replace( $pattern, $replacement, $output ); | |
} | |
add_filter( 'wp_list_categories', 'my_list_categories', 10, 2 ); |
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 | |
function my_previous_post_where() { | |
global $post, $wpdb; | |
return $wpdb->prepare( "WHERE p.menu_order < %s AND p.post_type = %s AND p.post_status = 'publish'", $post->menu_order, $post->post_type); | |
} | |
add_filter( 'get_previous_post_where', 'my_previous_post_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
<?php | |
function sp_wp_default_styles($styles) | |
{ | |
//use our app version constant | |
$styles->default_version = SCHOOLPRESS_VERSION; | |
} | |
add_action("wp_default_styles", "sp_wp_default_styles"); |
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 | |
function my_scripts() { | |
wp_enqueue_script( | |
'angularjs', | |
get_stylesheet_directory_uri() . '/bower_components/angular/angular.min.js' | |
); | |
wp_enqueue_script( |