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 wpuf_post_umgroup( $post_id, $form_id ) { | |
/* Build the post content by adding the referer URL to the comment and update the post */ | |
$lv_comment = $_POST['_my_comment'] . PHP_EOL . PHP_EOL . home_url() . wp_get_referer(); | |
$lv_post = array(); | |
$lv_post['ID'] = $post_id; | |
$lv_post['post_author'] = get_current_user_id(); | |
$lv_post['post_content'] = $lv_comment; |
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
/* Create new shortcode for quickly displaying user metadata. | |
*** NOTE: This only works if you have the Ultimate Member plugin installed. | |
*** Use like regular wordpress shortcodes. Enter [USERMETA user_id="*id*" meta="*field_name*"] (replace *id* and *field_name* with actual values) | |
*** If you use it on an Ultimate Member profile page/tab, it will use the user currently being viewed. | |
*** On other pages, you must include the "user_id" within the shortcode. | |
*/ | |
//Add the shortcode to WordPress | |
add_shortcode('USER_META', 'user_meta_shortcode_handler'); | |
//create the function referenced by the add_shortcode() |
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 | |
/* | |
Use this recipe in combination with MyCRED to award points to members when signing up | |
for Level 1 membership. This code gist could be customized to give points for another | |
membership level ID, award recurring points for each subscription payment, and more. | |
MyCRED can be downloaded/configured here: https://wordpress.org/plugins/mycred/ | |
*/ | |
// Register Hook for PMPro Membership Points at Signup |
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
<!-- // The HTML (could be part of page content) // --> | |
<input type="text" name="keyword" id="keyword" onkeyup="fetch()"></input> | |
<div id="datafetch">Search results will appear here</div> |
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_filter( 'caldera_forms_private_upload_directory', function( $directory, $field_id, $form_id, $transient_id ){ | |
//IMPORTANT -- Change this to the ID of your field, or remove this conditional to affect all fields. | |
if( 'fld111' === $field_id ){ | |
//see: https://developer.wordpress.org/reference/functions/wp_get_upload_dir/ | |
$uploads = wp_get_upload_dir(); | |
$directory = $uploads[ 'basedir' ] . '/somepath'; | |
} | |
return $directory; | |
},10,4); |
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 | |
/** | |
* Loop Add to Cart -- with quantity and AJAX | |
* requires associated JavaScript file qty-add-to-cart.js | |
* | |
* @link http://snippets.webaware.com.au/snippets/woocommerce-add-to-cart-with-quantity-and-ajax/ | |
* @link https://gist.github.com/mikejolley/2793710/ | |
*/ | |
// add this file to folder "woocommerce/loop" inside theme |
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
// Source: https://gist.github.com/luetkemj/2023628 | |
// Xem hướng dẫn WP_Query toàn tập: http://goo.gl/kRpzTz | |
<?php | |
$args = array( | |
//////Author Parameters - Tham số lấy bài viết theo tác giả | |
//http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters | |
'author' => '1,2,3,', //(int) - Các ID tác giả cần lấy bài viết (thêm dấu - vào để loại trừ tác giả, ví dụ: -14, -20) | |
'author_name' => 'luetkemj', //(string) - Lấy bài viết dựa theo tên nick name của tác giả | |
'author__in' => array( 2, 6 ), //(array) - Lấy bài dựa theo ID của tác giả |
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: Fluent Form User Email Verification | |
Description: Fluent Form User Email Verification | |
Version: 1.0 | |
Author: WPManageNinja Support Team | |
Author URI: https://wpmanageninja.com | |
Plugin URI: https://wpmanageninja.com | |
License: GPLv2 or later | |
Text Domain: fluentform |
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: Class To Disable WordPress Plugins By URL | |
Plugin URI: http://www.damiencarbery.com/2019/03/class-to-disable-wordpress-plugins-by-url/ | |
Description: Disable specified plugins except for certain pages - enhanced with caching. | |
Version: 0.1 | |
Author: Damien Carbery | |
Author URI: http://www.damiencarbery.com/ | |
*/ |
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 | |
/** | |
* Contains WPS_Extend_Plugin class. and wps_extend_plugins function. | |
* | |
* @package WPS_Core | |
* @author Travis Smith <t@wpsmith.net> | |
* @copyright 2015 WP Smith, Travis Smith | |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
* @version 1.0.0 | |
* @since File available since Release 1.0.0 |
OlderNewer