form_widget_settings
handles settings popups - https://github.com/Wysija/plugin/blob/master/wysija-newsletters/controllers/back/config.php#L330
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 canvas_featured_open_graph_meta() { | |
if ( is_single() || is_page() ) { | |
global $post; | |
if ( has_post_thumbnail( $post->ID ) ) | |
$thumbnail_id = get_post_thumbnail_id( $post->ID ); | |
if ( ! empty( $thumbnail_id ) ) { | |
$thumbnail_src = wp_get_attachment_image_src( $thumbnail_id ); |
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 canvas_logo_open_graph_meta() { | |
if ( ! is_single() || ! is_page() ) | |
return; | |
if ( isset($woo_options['woo_logo']) && $woo_options['woo_logo'] ) | |
echo '<meta property="og:image" content="' . esc_url( $woo_options['woo_logo'] ) . '" />'; | |
} | |
add_action( 'wp_head', 'canvas_logo_open_graph_meta' ); |
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 | |
// Setting Field with multiple checkboxes | |
function mamaduka_settings_field() { | |
$options = get_option( 'georgian_keyboard_options' ); | |
?> | |
<input name="georgian_keyboard_options[user-element-on-comment]" type="checkbox" id="georgian_keyboard_options[user-element-on-comment]" value="1" <?php checked( 1, $options['user-element-on-comment'] ); ?> /> | |
<span><?php _e( 'Use Georgian when writing in comment field', 'georgiankeyboard' ); ?></span> | |
<br /> | |
<input name="georgian_keyboard_options[user-element-on-author]" type="checkbox" id="georgian_keyboard_options[user-element-on-author]" value="1" <?php checked( 1, $options['user-element-on-author'] ); ?> /> | |
<span><?php _e( 'Use Georgian when writing in author field', 'georgiankeyboard' ); ?></span> |
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 parent category class to post_class() function | |
* | |
* @link http://wordpress.stackexchange.com/q/23259#23260 | |
*/ | |
function mamaduka_add_parent_category_class( $classes, $class, $post_id ) { | |
foreach ( (array) get_the_category( $post_id ) as $cat ) { | |
if ( ! empty( $cat->parent ) ) { | |
$parent_cat = &get_category( $cat->parent ); |
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 Users Purchases | |
* | |
* Retrieves a list of all purchases by a specific user. | |
* | |
* @access public | |
* @since 1.0 | |
* @param int|string $user User ID or email address | |
* @param int $number Number of purchases to retrieve |
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 | |
/** | |
* Disable automatic order cancelling. | |
*/ | |
add_filter( 'woocommerce_cancel_unpaid_order', '__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 | |
/** | |
* Add specific thumbnail size for posts and pages. | |
*/ | |
function wysija_set_thumbnail_size() { | |
$model_config = WYSIJA::get( 'config', 'model' ); | |
// Holds arry of thumbnail sizes | |
$sizes = $model_config->getValue('thumb_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
<?php | |
**/ | |
* How to detect is a certain page template is in use. | |
* | |
* @link http://www.wupperpiraten.de/2009/12/is-a-certain-page-template-active/ | |
*/ | |
function is_pagetemplate_active( $pagetemplate = '' ) { | |
global $wpdb; | |
if ( empty( $pagetemplate ) ) |
Because OVH doesn't support URL for Cron, we need to create and add custom PHP file:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://www.lovelysecret.be/wp-cron.php?f8c7891ad19adc
0dde19beb11eb67b2b&action=wysi
ja_cron&process=all');
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);