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 | |
$args = array( | |
'meta_query' => array( | |
'relation' => 'AND', | |
array( | |
'key' => 'meta_key_one', | |
'value' => '1' | |
) | |
) |
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
#!/bin/sh | |
# License: GPL v3 | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# This program is distributed in the hope that it will be useful, |
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
sudo debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password password root' | |
sudo debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password_again password root' | |
sudo apt-get update | |
sudo apt-get -y install mysql-server-5.5 php5-mysql libsqlite3-dev apache2 php5 php5-dev build-essential php-pear | |
# Set timezone | |
echo "Europe/Amsterdam" | sudo tee /etc/timezone | |
sudo dpkg-reconfigure --frontend noninteractive tzdata |
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 | |
// Get the connected posts | |
$my_connected_posts = Post_Connector::API()->get_children( "course", get_the_id() ); | |
// Check | |
if ( count( $my_connected_posts ) > 0 ) { | |
// Loop | |
foreach ( $my_connected_posts as $my_connected_post ) { |
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_payment_gateways', 'alter_bacs_gateways' ); | |
function alter_bacs_gateways( $methods ) { | |
$bacs_needle = array_search( 'WC_Gateway_BACS', $methods ); | |
if ( false !== $bacs_needle ) { | |
$methods[ $bacs_needle ] = 'WC_Gateway_BACS_custom'; | |
} |
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 | |
if ( !defined( 'ABSPATH' ) ) { | |
exit; | |
} // Exit if accessed directly | |
if ( !class_exists( 'WC_BK_Settings' ) ) { | |
class WC_BK_Settings { | |
const SETTINGS_NAMESPACE = 'YOUR_SETTINGS_NAMESPACE'; |
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 | |
function rp4wp_example_title_weight( $weight ) { | |
return 100; | |
} | |
add_filter( 'rp4wp_weight_title', 'rp4wp_example_title_weight' ); |
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 | |
function rp4wp_example_my_thumbnail_size( $thumb_size ) { | |
return 'my-thumbnail-size'; | |
} | |
add_filter( 'rp4wp_thumbnail_size', 'rp4wp_example_my_thumbnail_size' ); |
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
add_filter( 'rp4wp_append_content', '__return_false' ); |
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 | |
function rp4wp_example_remove_filter() { | |
$filter_instance = RP4WP_Manager_Filter::get_filter_object( 'RP4WP_Filter_After_Post' ); | |
remove_filter( 'the_content', array( $filter_instance, 'run' ), $filter_instance->get_priority() ); | |
} | |
add_action( 'init', 'rp4wp_example_remove_filter' ); |
OlderNewer