ID: 1 post_title: Hello world! author: 1 post_excerpt: post_type: post permalink: https://example.com/blog/2024/02/19/hello-world/ status: publish post_date: 2024-02-19 15:07:51 modified: 2024-02-19 15:07:51
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 | |
/** | |
* Add any custom tables that this plugin creates for an individual site to the list | |
* of tables that get deleted when a site is deleted. | |
* @see https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-admin/includes/ms.php#L116 | |
*/ | |
add_filter( 'wpmu_drop_tables', 'delete_my_plugin_tables', 10, 2 ); | |
function delete_my_plugin_tables( $tables=array(), $blog_id=null ) { | |
/** | |
* Make sure the blog ID parameter was sent, so we don't |
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
<table border="6" cellpadding="2"> | |
<tbody> | |
<tr> | |
<th> | |
<a href="https://example.com/">button</a> | |
</th> | |
</tr> | |
</tbody> | |
</table> |
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 | |
/** | |
* Override the extra HTML that Views uses to wrap its output | |
*/ | |
remove_shortcode( 'wpv-layout-start' ); | |
remove_shortcode( 'wpv-layout-end' ); | |
add_shortcode( 'wpv-layout-start', array( $this, '__blank' ) ); | |
add_shortcode( 'wpv-layout-end', array( $this, '__blank' ) ); |
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 | |
class Add_Rand_to_OrderBy { | |
public function __construct() { | |
add_action( 'rest_api_init', array( $this, 'rest_api_init' ) ); | |
} | |
/** | |
* Set up any custom REST API handlers | |
* | |
* @access public |
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
<article class="[pcs-entry-classes classes='pcs-entry one-fourth' columns=4]"> | |
<header> | |
<figure class="pcs-featured-image"> | |
[pcs-thumbnail] | |
</figure> | |
<h1 class="pcs-post-title"> | |
<a href="[pcs-post-url]">[wpv-post-title]</a> | |
</h1> | |
</header> | |
<footer> |
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 | |
class A { | |
function __construct() { | |
$this->sample_method(); | |
} | |
private function sample_method() { | |
echo "<p>I am inside the parent class 'A'</p>"; | |
} | |
} |
I hereby claim:
- I am cgrymala on github.
- I am cgrymala (https://keybase.io/cgrymala) on keybase.
- I have a public key whose fingerprint is 3B6A D380 4C78 7EF0 F88B FB54 7726 1A30 1ED3 F998
To claim this, I am signing this object:
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 | |
/** | |
* Attempts to override the stupid way JetPack short-circuits native oEmbeds | |
* so that the Fluid Video Embeds plugin can work properly | |
*/ | |
function fve_jetpack_filter_video_embed( $html, $atts=array() ) { | |
/** | |
* Attempt to make sure the Fluid Video Embeds plugin is | |
* active and that the global $fve object is instantiated | |
*/ |
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 | |
add_action( 'admin_init', 'hide_backend_from_user' ); | |
/** | |
* Hide the backend from specific user levels | |
* @uses VFH_User_Controls::$options['login_redirect_to'] to determine where the user should be redirected | |
* @uses VFH_User_Controls::$user_levels to see if the user needs to be redirected | |
*/ | |
function hide_backend_from_user( $level='edit_posts' ) { | |
/** | |
* Attempt not to short-circuit AJAX requests |
NewerOlder