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
#block load-scripts|styles.php requests with long argument list | |
#CVE-2018-6389 impact mitigation | |
if ($request_uri ~* "^/+wp-admin/+load-(scripts|styles)\.php\?.{800,}$"){ | |
return 403; | |
} |
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
RewriteCond %{REQUEST_URI} ^/+wp-admin/+load-(scripts|styles)\.php$ | |
RewriteCond %{QUERY_STRING} load\[\]=(.{800,})$ | |
RewriteRule ^(.*)$ - [F,L] |
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 lynt_add_ga() { ?> | |
//zde vlozit merici kod | |
<?php } | |
add_action('wp_footer', 'lynt_add_ga'); | |
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 lynt_phpmailer( PHPMailer $mail ) { | |
$mail->Host = 'smpt.server'; | |
$mail->Port = 465; | |
$mail->SMTPSecure = 'tls'; | |
$mail->Username = 'jmeno'; | |
$mail->Password = 'heslo'; | |
$mail->SMTPAuth = true; | |
$mail->IsSMTP(); | |
} | |
add_action( 'phpmailer_init', 'lynt_phpmailer' ); |
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
$role_object = get_role( 'editor' ); | |
$role_object->add_cap( 'edit_theme_options' ); |
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
//Microsoft Flow endpoint URL | |
$url='https://prod-44.westeurope.logic.azure.com:443/workflows/...'; | |
//Data | |
$data = array( | |
'jmeno' => 'jmeno', | |
'email' => 'e-mail', | |
'text' => 'TEST' | |
); |
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 lynt_subpages() { | |
global $post; | |
$args = sprintf('echo=0&title_li=&child_of=%d', $post->ID); | |
return '<ul>'.wp_list_pages($args).'</ul>'; | |
} | |
add_shortcode('list_subpages', 'lynt_subpages'); |
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
add_filter('use_block_editor_for_post', '__return_false', 10); | |
add_filter('use_block_editor_for_post_type', '__return_false', 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
$member = get_role('contributor'); | |
$member->add_cap('edit_published_pages'); | |
$member->add_cap('publish_pages'); | |
function lynt_kill_new() { | |
if (current_user_can('contributor')) { | |
global $wp_post_types; | |
$wp_post_types['page']->cap->create_posts = 'do_not_allow'; | |
} | |
} |
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 | |
$content = '<?xml version="1.0" encoding="Windows-1250"?> | |
<dat:dataPack id="Za001" ico="12345678" application="StwTest" version="2.0" note="export" | |
xmlns:dat="http://www.stormware.cz/schema/version_2/data.xsd" | |
xmlns:stk="http://www.stormware.cz/schema/version_2/stock.xsd" | |
xmlns:ftr="http://www.stormware.cz/schema/version_2/filter.xsd" | |
xmlns:lStk="http://www.stormware.cz/schema/version_2/list_stock.xsd" | |
xmlns:typ="http://www.stormware.cz/schema/version_2/type.xsd"> | |
<dat:dataPackItem id="a55" version="2.0"> |