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 | |
/** | |
* Handler for [cl_post_title] shortcode | |
* | |
* @param $atts | |
* | |
* @return string | |
*/ | |
function caldera_learn_basic_blocks_post_title_shortcode_handler($atts) | |
{ |
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 | |
if ( !function_exists( 'is_rest' ) ) { | |
/** | |
* Checks if the current request is a WP REST API request. | |
* | |
* Case #1: After WP_REST_Request initialisation | |
* Case #2: Support "plain" permalink settings and check if `rest_route` starts with `/` | |
* Case #3: It can happen that WP_Rewrite is not yet initialized, | |
* so do this (wp-settings.php) |
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
<!-- wp:paragraph {"align":"center","customTextColor":"#000000","backgroundColor":"very-light-gray","fontSize":"small"} --> | |
<p style="color:#000000;text-align:center" class="has-background has-small-font-size has-very-light-gray-background-color">Gutenberg Sample Content.<br/>Put together with ❤️ by <a href="https://artisanthemes.io/">Artisan Themes</a>.</p> | |
<!-- /wp:paragraph --> | |
<!-- wp:heading {"level":1} --> | |
<h1>This is a heading (H1)</h1> | |
<!-- /wp:heading --> | |
<!-- wp:heading --> | |
<h2>This is a heading (H2)</h2> |
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
// License: GPLv2+ | |
var el = wp.element.createElement, | |
registerBlockType = wp.blocks.registerBlockType, | |
ServerSideRender = wp.components.ServerSideRender, | |
TextControl = wp.components.TextControl, | |
InspectorControls = wp.editor.InspectorControls; | |
/* | |
* Here's where we register the block in JavaScript. |
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 | |
namespace App; | |
trait FullTextSearch | |
{ | |
/** | |
* Replaces spaces with full text search wildcards | |
* | |
* @param string $term |
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
<section class="random>"> | |
<?php | |
$terms = get_terms( array( | |
'taxonomy' => 'category', | |
'parent' => 0 | |
) ); | |
$do_not_duplicate = array(); |
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 | |
// https://stackoverflow.com/questions/26781857/how-do-do-action-and-add-action-work | |
do_action( 'my_footer_hook' ); | |
add_action( 'my_footer_hook', 'my_footer_echo' ); | |
function my_footer_echo(){ | |
echo 'hello world'; | |
} |
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
define ('WP_RWL', true); |
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 | |
$dump_path = ""; //input location for the backup to be saved | |
$host = ""; //db host e.g.- localhost | |
$user = ""; //user e.g.-root | |
$pass = ""; //password | |
$command=$dump_path.'mysqldump -h '.$host.' -u '.$user.' bank > bank.sql'; | |
system($command); | |
?> |
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 | |
/** | |
* WordPress Plugin Install Administration API | |
* | |
* @package WordPress | |
* @subpackage Administration | |
*/ | |
/** | |
* Retrieves plugin installer pages from the WordPress.org Plugins API. |
NewerOlder