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 | |
// zasílání e-mailů přes SMTP bez pluginu | |
function wt_smtp( PHPMailer $mail ) { | |
$mail->Host = 'smpt.server'; | |
$mail->Port = 465; | |
$mail->SMTPSecure = 'tls'; | |
$mail->Username = 'jmeno'; | |
$mail->Password = 'heslo'; | |
$mail->SMTPAuth = true; |
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 | |
// odstranění češtiny a speciálních znaků z vkládaných souborů | |
function wt_sanitize_files ( $filename ) { | |
return remove_accents( $filename ); | |
} | |
add_filter( 'sanitize_file_name', 'wt_sanitize_files', 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
<?php | |
// zrušení emoji | |
function wt_disable_emoji() { | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); |
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
// delete specific post(s) | |
function wt_cron_delete_posts() { | |
// wp_delete_post( int $postid, bool $force_delete = false ) | |
wp_delete_post(1); | |
} | |
add_action( 'wt_delete_old_posts','wt_cron_delete_posts' ); | |
$args = array( false ); | |
if ( !wp_next_scheduled( 'wt_delete_old_posts', $args ) ) { | |
// time() + 3600 = one hour from now |
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 | |
// pevné mezery za spojky | |
function wt_conjunctions( $content ) { | |
$content = str_replace( | |
array( | |
' a ', ' A ', | |
' i ', ' I ', | |
' k ', ' K ', |
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
# bezpecnostni hlavicky | |
<IfModule mod_headers.c> | |
Header set X-XSS-Protection "1; mode=block" | |
Header set X-Frame-Options SAMEORIGIN | |
Header set X-Content-Type-Options nosniff | |
Header set Strict-Transport-Security "max-age=15768000;" env=HTTPS | |
</IfModule> | |
# kesovaci hlavicky | |
<IfModule mod_expires.c> |
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
# nastaveni ftp serveru | |
variables: | |
FTP_URL: "***" | |
FTP_USERNAME: "***" | |
FTP_PASSWORD: "***" | |
## definice akci | |
stages: | |
- deploy | |
- clear-cache |
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
// zrušení možnosti úpravy šablony z menu | |
function remove_customize () { | |
global $submenu; | |
unset($submenu['themes.php'][6]); | |
} | |
add_action('admin_menu', 'remove_customize'); |
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
# nastaveni ftp serveru | |
variables: | |
# devel server | |
FTP_DEV_URL: "***" | |
FTP_DEV_USERNAME: "***" | |
FTP_DEV_PASSWORD: "***" | |
# produkce | |
FTP_PROD_URL: "***" | |
FTP_PROD_USERNAME: "***" | |
FTP_PROD_PASSWORD: "***" |
NewerOlder