Skip to content

Instantly share code, notes, and snippets.

View jaworowicz's full-sized avatar

Jakub Jaworowicz jaworowicz

View GitHub Profile
@jaworowicz
jaworowicz / block-critics-file.htaccess
Created October 21, 2019 11:33
Save in to main .htaccess file. https://jaworowi.cz
<FilesMatch "wp-config.*\.php|\.htaccess|readme\.html|license\.txt">
Order allow,deny
Deny from all
</FilesMatch>
================ KOD 2 (jeżeli nie potrzebujesz XML-RPC)
<FilesMatch "wp-config.*\.php|\.htaccess|readme\.html|license\.txt|xmlrpc\.php">
Order allow,deny
Deny from all
@jaworowicz
jaworowicz / block-php.htaccess
Created October 21, 2019 11:17
Blokada wykonywania plików PHP w folderze /wp-content/uploads. Zapisz jako .htaccess i dodaj do katalogu uploads. https://jaworowi.cz
<Files *.php>
deny from all
</Files>
@jaworowicz
jaworowicz / ch-wp-config.php
Created October 20, 2019 02:11
Disable WordPress Plugin & Theme Editor - add to wp-config.php belov WP-debug function
define( 'DISALLOW_FILE_EDIT', true );
<?php
/**
*
* @link https://jaworowi.cz
* @since 1.0.0
* @package XML-RPC-disable
*
* @wordpress-plugin
* Plugin Name: XML-RPC DISABLE
* Plugin URI: https://jaworowi.cz
@jaworowicz
jaworowicz / block-usernames-wordpress.txt
Last active October 16, 2019 00:38
Zabronione nazwy użytkowników WordPress - Często używane w atakach.
[login],admin,test,testuser,123,demo,teste,editor,dexter,123456,testing,111,0x1999,admin2,asd,guest,jake,jsjobs_employer,patricia,prova,prueba,roottn,test123,user1,xrumertest,1234,123123,[login][login]2017,[login][login]2018,admin1,AnonymousFox,asdasd,badmin,kenneth,magico,manager,phukotler,schatzi,student,test1,user,useradmww2,wpupdateuser,12345678,123456789,[login]12345678,root,server,serwer,uzytkownik,user,administrator,diysite,garak,indoxploit,local,localdev,preview,qwerty,testtest,wpmu
@jaworowicz
jaworowicz / restapi-disable.php
Created October 15, 2019 23:58
Wyłączenie JSON REST API w WordPress - Plugin i gotowy kod do wklejenia w functions.php
<?php
/**
*
* @link https://jaworowi.cz
* @since 1.0.0
* @package restapi-disable
*
* @wordpress-plugin
* Plugin Name: JSON REST API DISABLE
* Plugin URI: https://jaworowi.cz
@jaworowicz
jaworowicz / wordpress_translate_via_php.php
Created September 17, 2019 07:25
Translated WordPress Text via PHP functions code
<?php
function my_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Szczegóły płatności' :
$translated_text = __( 'Dane Płatności', 'woocommerce' );
break;
case 'Adres rozliczeniowy' :
$translated_text = __( 'Dane firmowe', 'woocommerce' );
break;}
return $translated_text;
/* URL DEFINES */
define('pro_SITE_URL','https://www.test.com/');
/* Theme Credit link */
function _link() {
echo esc_html_e('Credit TXT','translate'). "<a href=".esc_url(pro_SITE_URL)." target='_blank'> LINK</a>";
}
@jaworowicz
jaworowicz / Remove Element from HTML Body.js
Last active July 13, 2019 01:12
PL: Usuwanie elementów ze strony internetowej (wg selektorów) EN: Remove elements from body by selector BY: Jakub Jaworowicz https://jaworowi.cz/
jQuery(".columnpost").find('.imagewrap').each(function() {jQuery(this).remove()});
jQuery(".columnpost").find('img').each(function() {jQuery(this).remove()});
jQuery(".columnpost").find('#img').each(function() {jQuery(this).remove()});
@jaworowicz
jaworowicz / sm-cookie-based-hidden-js.html
Created July 5, 2019 01:24
SalesManago - Check Cookie & hide content