The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My Iframe</title> | |
</head> | |
<body> | |
<button>Botão</button> | |
<script type="text/javascript"> |
import config from '../config' | |
let components = {} | |
//For each component in the config fiel into an object | |
for (var i = config.length - 1; i >= 0; i--) { | |
components[config[i].name] = require(config[i].path).default | |
} | |
export default components |
<?php | |
/* DON'T copy the first line (above) if your functions.php already has it. | |
* ---------------------------------------------------------------------- */ | |
function my_et_theme_setup() { | |
if ( class_exists( 'ET_Builder_Module_Post_Slider' ) ) { | |
get_template_part( 'my-main-modules' ); | |
add_filter( 'my_et_post_slider_args', 'my_et_post_slider_args_cb' ); | |
$et_pb_post_slider = new My_ET_Builder_Module_Post_Slider(); | |
remove_shortcode('et_pb_post_slider'); |
After a power faliur (also can be a sudden restart or system crash), I ended up with corrupted database and lost the access to my local hosted websites for development. Even the MAMP's MySQL server was not starting.
You will need to find the databases folders, in case of MAMP they are located in Applications/MAMP/db/mysql56
(or mysql57
depending on MySQL version).
You will find folders containing the database name, inside them you will find .frm
and .ibd
files. Take a copy of the entire folder for backup in another place, the desktop for example.
After you've downloaded and installed WAMP Server, follow these steps:
Add C:\wamp64\bin\apache\apache2.4.27\bin
directory to the PATH so you can access openssl
command from the command prompt (WAMP comes with its own version of OpenSSL already integrated, so you don't need to install it. You'll find it in this directory.).
IMPORTANT: Please note that the path of your installation depends on your version of Apache! DO NOT copy and paste the paths presented in this gist as they will not match with yours!
Navigate to your user directory (C:\Users\%YOUR_USERNAME%\
), create a new folder (.openssl
), navigate to it with Powershell and run these commands:
openssl genrsa -aes256 -out private.key 2048
openssl rsa -in private.key -out private.key