Skip to content

Instantly share code, notes, and snippets.

Jakub Jaworowicz jaworowicz

Block or report user

Report or block jaworowicz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jaworowicz
jaworowicz / acf_repeater_shortcode.php
Created Mar 23, 2020 — forked from FranciscoG/acf_repeater_shortcode.php
An Advanced Custom Fields shortcode that allows to loop through a field with a repeater. This only handles simple cases, it can't handle nested repeater fields
View acf_repeater_shortcode.php
<?php
/**
* ACF Pro repeater field shortcode
*
* I created this shortcode function because it didn't exist and it was being requested by others
* I originally posted it here: https://support.advancedcustomfields.com/forums/topic/repeater-field-shortcode/
*
* @attr {string} field - (Required) the name of the field that contains a repeater sub group
* @attr {string} sub_fields - (Required) a comma separated list of sub field names that are part of the field repeater group
* @attr {string} post_id - (Optional) Specific post ID where your value was entered. Defaults to current post ID (not required). This can also be options / taxonomies / users / etc
View wordpress-location-change.php
define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/aplikacja/inc/' );
define( 'WP_CONTENT_URL', 'http://testowa1.local/aplikacja/inc' );
define( 'WP_PLUGIN_DIR', dirname(__FILE__) . '/aplikacja/inc/extensions' );
define( 'WP_PLUGIN_URL', 'http://testowa1.local/aplikacja/inc/extensions' );
define( 'UPLOADS', 'aplikacja/inc/media' );
View disable-login-email.php
remove_filter( 'authenticate', 'wp_authenticate_email_password', 20 );
View Fake-error-login.php
function jcz_fake_error(){
return 'Błąd';
}
add_filter( 'login_errors', 'jcz_fake_error' );
View wp-admin.htaccess
<FilesMatch "install.*\.php">
Order allow,deny
Deny from all
</FilesMatch>
View wp-includes.htaccess
<FilesMatch "\.(?i:php)$">
Order allow,deny
Deny from all
</FilesMatch>
<Files wp-tinymce.php>
Allow from all
</Files>
<Files ms-files.php>
Allow from all
</Files>
@jaworowicz
jaworowicz / wp_generator.php
Last active Oct 21, 2019
Hide wp_generator
View wp_generator.php
// Ukrycie RSS
remove_action('wp_head', 'wp_generator');
// Ukrycie w RSS
function jcz_generator( $generator, $type ) {
return '';
}
add_filter( 'the_generator', 'jcz_generator', 10, 2 );
// Usunięcie Query w skryptach
View block-critics-file.htaccess
<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 Oct 21, 2019
Blokada wykonywania plików PHP w folderze /wp-content/uploads. Zapisz jako .htaccess i dodaj do katalogu uploads. https://jaworowi.cz
View block-php.htaccess
<Files *.php>
deny from all
</Files>
@jaworowicz
jaworowicz / ch-wp-config.php
Created Oct 20, 2019
Disable WordPress Plugin & Theme Editor - add to wp-config.php belov WP-debug function
View ch-wp-config.php
define( 'DISALLOW_FILE_EDIT', true );
You can’t perform that action at this time.