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 | |
add_filter( 'init', 'exclude_pages_from_normal_admin' ); | |
function exclude_pages_from_normal_admin() { | |
global $pagenow; | |
$deny_pages = array( | |
'edit.php', | |
'update-core.php', | |
'upload.php', | |
'edit-comments.php', |
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
<html> | |
<head> | |
<title>reCAPTCHA demo: Simple page</title> | |
<script src="https://www.google.com/recaptcha/api.js" async defer></script> | |
<script> | |
function onSubmit(token) { | |
document.getElementById("demo-form").submit(); | |
} | |
</script> | |
</head> |
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 | |
var_dump( get_the_category() ); // use in wp loop | |
/* | |
object(WP_Term)#306 (16) { | |
["term_id"]=> | |
int(49) | |
["name"]=> | |
string(6) "Markup" | |
["slug"]=> | |
string(6) "markup" |
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
git commit --amend -m "New commit message" |
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
parent.$.fancybox.getInstance().close(); |
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
$.fancybox.open({ | |
src:'url', | |
type:'iframe', | |
opts:{ | |
iframe:{ | |
css:{ | |
width:1000, | |
height:1000 | |
} | |
}, |
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 | |
//------------------- Edit here --------------------// | |
$sendy_url = 'http://url'; | |
$list = 't'; // LIST ID | |
//------------------ /Edit here --------------------// | |
//--------------------------------------------------// | |
//POST variables | |
$name = $_POST['name']; | |
$email = $_POST['email']; |
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
#!/bin/bash | |
IFS=$'\n' | |
for i in `find -name '*.jpg'` | |
do mogrify -quality 80% "$i" | |
done |
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 | |
$db = mysqli_connect( 'host','user_name','password', 'data_base_name' ); | |
$query = $db->query(' | |
SELECT * FROM table_name | |
WHERE id = mysqli_escape_string( $db, '1' ) | |
'); | |
if( $query->num_rows > 0 ){ | |
while ( $row = $query->fetch_array() ) { |
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> | |
<?php wp_nav_menu(); ?> | |
</ul> | |
<div class="hidden-gallery"> | |
<?php | |
function get_image_gallery_src( $post_id ) { | |
$gallery = get_post_gallery( $post_id, false ); | |
$gallery_id = explode( ',', $gallery['ids'] ); |