This file contains hidden or 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( 'rcp_after_password_registration_field', 'rcp_my_custom_address_fields' ); | |
function rcp_my_custom_address_fields() { | |
?> | |
<p id="rcp_address_country"> | |
<label for="rcp_address_country">Country</label> | |
<input name="rcp_address_country" id="rcp_address_country" type="text"/> |
This file contains hidden or 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 | |
$flat_array = [ | |
[ | |
'parent' => 0, | |
'id' => 1, | |
'title' => 'Parent 1', | |
'content' => [ | |
'c12', |
This file contains hidden or 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 | |
// ... previous code | |
class SimpleWordPressLanguageSwitcher { | |
// ... previous code | |
/** | |
* Return the correct locale based on the $_GET parameter. |
This file contains hidden or 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 | |
/** | |
* Installer class | |
*/ | |
namespace MyPlugin; | |
class Installer { | |
// ... previous code |
This file contains hidden or 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_filter( 'woocommerce_product_import_process_item_data', 'wc_ignore_meta_in_import_if_non_value' ); | |
/** | |
* Ignore the meta if value is empty | |
* | |
* @param array $data Data. | |
* | |
* @return array |
This file contains hidden or 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( 'init', 'ibenic_register_hide_shortcode' ); | |
function ibenic_register_hide_shortcode() { | |
add_shortcode( 'hide_content_if', 'ibenic_hide_content_if' ); | |
} | |
function ibenic_hide_content_if( $atts, $content ) { |
This file contains hidden or 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('wp_enqueue_scripts', 'enqueue_if_shortcode'); | |
function enqueue_if_shortcode(){ | |
global $post; | |
if ( $post && has_shortcode( $post->post_content, 'your_shortcode_tag' ) { | |
// Enqueue | |
} |
This file contains hidden or 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 | |
/** | |
* Registering our shortcode | |
*/ | |
function ibenic_register_upload_form() { | |
add_shortcode( 'zip_upload_form', 'ibenic_zip_upload_form' ); | |
} |
This file contains hidden or 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 Simple_Product_Subscriptions; | |
class Cart { | |
/** | |
* Cart Hooks |
This file contains hidden or 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 Library_Integration { | |
// previous code here ... | |
/** | |
* Load latest Library path | |
*/ | |
public static function load_latest_path() { |