WP : SSL Hint

.htaccess <ifModule mod_headers.c>     # Header set Access-Control-Allow-Origin: *     #Header add Content-Security-Policy "default-src 'self';"     Header always set Content-Security-Policy "upgrade-insecure-requests;" </ifModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule>   Optional wp-config.php define('FORCE_SSL_ADMIN', true); define('WP_HOME',''.$_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].'/wordpress'); define('WP_SITEURL',''.$_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].'/wordpress');  

Read More

Excel vs Unix Timestemp : excel datevalue to java dateformat Hint!

Unix Timestamp from 1970 Excel Timestamp from 1900 Gap : (1970-1900) Days = 25569 Days     String rtn = ""; try{ DateFormat format = new SimpleDateFormat("yyyyMMdd"); //format.setTimeZone(TimeZone.getTimeZone("UTC")); double excelDays = Double.parseDouble((String)valv.elementAt(0)); double unixDays = (excelDays-25569); java.util.Date unixTime = new java.util.Date((long) ( 86400000l * unixDays)); rtn = format.format(unixTime); out.println(rtn); } catch(Exception e) {}  

Read More

WP : wp_new_user_notification customizing Hint

wp-include/pluggable.php ------------------------------- $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n"; $message .= __('To set your password, visit the following address:') . "\r\n\r\n"; $message .=  network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login'); $message .= "\r\n\r\n"; $message .= wp_login_url(); $message .= "\r\n"; -------------------------------

Read More

WP : theme-my-login : profile-form.php password strangth Hint

theme-my-login.css ----------------------------- #pass1-text { display: none; } -----------------------------   profile-form.php ----------------------------- <?php $show_password_fields = apply_filters( 'show_password_fields', true, $profileuser ); if ( $show_password_fields ) : ?> <tr id="password"> <th><label for="pass1"><?php _e( 'New Password' ); ?></label></th> <td><input type="password" name="pass1" id="pass1" size="16" value="" autocomplete="off" /> <span class="description"><?php _e( 'If you would like to change the password type a […]

Read More

htaccess : remove .php extension to permalink

RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] or --------------------------------------------------- httpd.conf Options +Multiviews <Directory />     AllowOverride All     Options None     #Options +FollowSymLinks -Indexes     # Apache 2.4     #Require all granted     Require all denied     # Apache 2.2     #Order allow,deny     #Allow from […]

Read More