This is a simple CSS3 3D experiment showing the conversion of an image into a realistic 3D cuboid when hovering over it. The CSS includes a shadow effect to make this action more realistic.
A Pen by Iván Melgrati on CodePen.
<?php | |
/** | |
* @author Ivan Melgrati | |
* @copyright 2018 | |
*/ | |
/** | |
* Easy fix to remove 'hentry' from the post_class() list | |
* |
<?php | |
// Create posts in WordPress from data in a MySQL database. Full article at: http://imelgrat.me/wordpress/bulk-upload-custom-posts-wordpress/ | |
//Load WordPress functions and plug-ins. Put correct path for this file. This example assumes you're using it from a sub-folder of WordPress | |
require_once ('../wp-load.php'); | |
$database['hostname'] = 'SERVER'; | |
$database['username'] = 'USER'; | |
$database['password'] = 'PASSWORD'; | |
$database['database'] = 'DATABASE'; |
<?php | |
// Only declare the function if it doesn't exist (prevents PHP fatal error) | |
if (!function_exists('product_post_type')) | |
{ | |
function product_post_type() // Function to register new custom post type | |
{ | |
// Labels used inside the WordPress CMS | |
$labels = array( | |
'name' => _x('Products', 'Post Type General Name', 'text_domain'), | |
'singular_name' => _x('Product', 'Post Type Singular Name', 'text_domain'), |
add_filter('manage_posts_columns', 'add_column_middle'); // Register filter | |
function add_column_middle($defaults) | |
{ | |
$new_columns = array(); // Create empty array to store new column order | |
foreach ($defaults as $key => $value) | |
{ | |
$new_columns[$key] = $value; // Add columns to new array | |
if ($key == 'title') |
function post_word_count($post_id) { | |
$content = get_post_field( 'post_content', $post_id ); | |
$word_count = str_word_count( strip_tags( strip_shortcodes($content) ) ); | |
return $word_count; | |
} | |
add_filter('manage_posts_columns', 'wordcount_column'); | |
function wordcount_column($columns) { | |
$columns['wordcount'] = 'Word count'; | |
return $columns; |
function post_word_count($post_id) { | |
$content = get_post_field( 'post_content', $post_id ); | |
$word_count = str_word_count( strip_tags( strip_shortcodes($content) ) ); | |
return $word_count; | |
} |
This is a simple CSS3 3D experiment showing the conversion of an image into a realistic 3D cuboid when hovering over it. The CSS includes a shadow effect to make this action more realistic.
A Pen by Iván Melgrati on CodePen.
Disable PUT and DELETE Apache requests and disable Server signature display |
# Deny access to wp-config.php file | |
<files wp-config.php> | |
order allow,deny | |
deny from all | |
</files> |
# Block wp-includes folder and files | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^wp-admin/includes/ - [F,L] | |
RewriteRule !^wp-includes/ - [S=3] | |
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L] | |
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L] | |
RewriteRule ^wp-includes/theme-compat/ - [F,L] | |
</IfModule> |