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( 'genesis_comment_form_args', 'url_filtered' ); | |
add_filter( 'comment_form_default_fields', 'url_filtered' ); | |
function url_filtered( $fields ) { | |
if ( isset( $fields['url'] ) ) | |
unset( $fields['url'] ); | |
if ( isset( $fields['fields']['url'] ) ) | |
unset( $fields['fields']['url'] ); | |
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 timeConverter(UNIX_timestamp) { | |
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; | |
const monthsRu = ['Января', 'Февраля', 'Марта', 'Апреля', 'Мая', 'Июня', 'Июля', 'Августа', 'Сентября', 'Октября', 'Ноября', 'Декабря']; | |
let date = new Date(UNIX_timestamp); | |
let year = date.getFullYear(); | |
let month = monthsRu[date.getMonth()]; | |
let day = date.getDate(); | |
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
/** | |
* Create a Symfony response for the given exception. | |
* | |
* @param \Exception $e | |
* @return mixed | |
*/ | |
protected function convertExceptionToResponse(Exception $e) | |
{ | |
if (config('app.debug')) { | |
$whoops = new \Whoops\Run; |
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 | |
header('Content-Type: text/html; charset=utf-8'); |
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
AddDefaultCharset utf-8 | |
# PHP version >= 5.6 | |
php_flag default_charset utf-8 |
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
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !^public | |
RewriteRule ^(.*)$ public/$1 [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
## https://www.reg.ru/support/hosting-i-servery/sajty-i-domeny/kak-dobavit-redirekt/redirekt-s-http-na-https | |
## вариант 1 | |
RewriteEngine On | |
RewriteCond %{HTTPS} =on | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L] | |
## вариант 2 | |
RewriteEngine On | |
RewriteCond %{SERVER_PORT} !^443$ | |
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,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
// http://tinyurl.com/p4fddly | |
//***Customize The Comment Form**/ | |
add_filter( 'comment_form_defaults', 'bourncreative_custom_comment_form' ); | |
function bourncreative_custom_comment_form($fields) { | |
$fields['comment_notes_before'] = ''; //Removes Email Privacy Notice | |
$fields['title_reply'] = __( 'Share Your Comments & Feedback:', 'customtheme' ); //Changes The Form Headline | |
$fields['label_submit'] = __( 'Share My Comment', 'customtheme' ); //Changes The Submit Button Text | |
$fields['comment_notes_after'] = ''; //Removes Form Allowed Tags Box | |
return $fields; | |
} |
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
// http://justintadlock.com/archives/2014/11/03/loading-parent-styles-for-child-themes | |
add_action( 'wp_enqueue_scripts', 'my_enqueue_styles' ); | |
function my_enqueue_styles() { | |
/* If using a child theme, auto-load the parent theme style. */ | |
if ( is_child_theme() ) { | |
wp_enqueue_style( 'parent-style', trailingslashit( get_template_directory_uri() ) . 'style.css' ); | |
} |
NewerOlder