| 1 |
<?php |
| 2 |
require '/wordpress/wp-load.php'; |
| 3 |
|
| 4 |
$content = "<!-- wp:heading -->\n" |
| 5 |
. "<h2 class=\"wp-block-heading\">Custom <mark style=\"background-color:#ff66aa\" class=\"has-inline-color\">Made</mark> Wood Tables Crafted to Yes!</h2>\n" |
| 6 |
. "<!-- /wp:heading -->\n\n" |
| 7 |
. "<!-- wp:heading -->\n" |
| 8 |
. "<h2 class=\"wp-block-heading\">A plain heading with no pre-existing marks at all.</h2>\n" |
| 9 |
. "<!-- /wp:heading -->\n\n" |
| 10 |
. "<!-- wp:paragraph -->\n" |
| 11 |
. "<p>Here is <mark style=\"background-color:#cf2e2e\" class=\"has-inline-color\">some</mark> sample text</p>\n" |
| 12 |
. "<!-- /wp:paragraph -->\n"; |
| 13 |
|
| 14 |
$pageId = wp_insert_post([ |
| 15 |
'post_type' => 'page', |
| 16 |
'post_status' => 'publish', |
| 17 |
'post_title' => 'Text Color Test Home', |
| 18 |
'post_content' => $content, |
| 19 |
]); |
| 20 |
|
| 21 |
update_option('show_on_front', 'page'); |
| 22 |
update_option('page_on_front', $pageId); |
| 23 |
|