nicodweb
Forum Replies Created
-
Forum: Plugins
In reply to: [Revisionize] Hook/filter to exlcude some ACF fields?Hey Jamie
Thanks for your reply.
Sorry for my bad english..but you did not understand.I try to do not copy some specific meta (exclude some meta from the duplication process to keep old ones)
- This reply was modified 6 years, 10 months ago by nicodweb.
Impressive support !! Thanks cybr!
Ok I check it on github ^^ : https://github.com/sybrew/the-seo-framework/issues/58
- This reply was modified 7 years, 10 months ago by nicodweb.
OK.
I’have made a custom code for it !
Ex
<?php
//eclde post without any UAM Group
global $wpdb;
$posts_avecGroupe=array();
$posts_avecGroupe = $wpdb->get_results(“SELECT DISTINCT object_id FROM {$wpdb->prefix}uam_accessgroup_to_object”);
foreach ( $posts_avecGroupe as $post_avecGroupe) {
array_push($posts_avecGroupe,$post_avecGroupe->object_id);
}
?>
<?php $loop = new WP_Query( array( ‘post_type’ => ‘telechargem_adherent’,’post__in’=>$posts_avecGroupe, ‘posts_per_page’ =>3 ) );Forum: Plugins
In reply to: [User Access Manager] Code Snippets for Group filter on admin(on post list)?Ok I code it if that can help:
/* =======================================================
ADMIN FILTER BY UAMM
======================================================= */
/* drop down */
add_action( ‘restrict_manage_posts’, ‘nw_admin_UAM_filter’ );
function nw_admin_UAM_filter() {
global $wpdb;
$results = $wpdb->get_results(“SELECT ID, groupname FROM {$wpdb->prefix}uam_accessgroups”);
echo “<select name=’uam_filter’ class=’postform’>”;
echo ‘<option value=””>filtrer par Groupe</option>’;
foreach($results as $element) {
$selected=””;
if( $_GET[‘uam_filter’]==$element->ID){$selected=”selected”;}
echo ‘<option value=”‘.$element->ID.'” selected=”‘.$selected.'”>’ . $element->groupname.'</option>’;
}
echo ‘</select>’;
//echo $GLOBALS[‘wp_query’]->request;
}
/* filtrer query */function nw_admin_UAM_filter_to_posts_query($join) {
global $wp_query, $wpdb,$post_type, $pagenow;
if($pagenow == ‘edit.php’ ){//&& $post_type == ‘telechargem_adherent’
if (isset($_GET[‘uam_filter’]) && $_GET[‘uam_filter’]!=0 ) {
//$uam_filter_id = esc_sql($_GET[‘uam_filter’]);
$join .= ” LEFT JOIN {$wpdb->prefix}uam_accessgroup_to_object ON {$wpdb->prefix}posts.ID = {$wpdb->prefix}uam_accessgroup_to_object.object_id “;}
}
return $join;
}
add_filter(‘posts_join’, ‘nw_admin_UAM_filter_to_posts_query’);function nw_admin_UAM_filter_to_posts_where( $where, &$wp_query )
{
global $wpdb,$post_type, $pagenow;
if($pagenow == ‘edit.php’ ){//&& $post_type == ‘telechargem_adherent’
if($_GET[‘uam_filter’] && $_GET[‘uam_filter’]!=0){
$uam_filter_id = esc_sql($_GET[‘uam_filter’]);
$where .= ” AND ({$wpdb->prefix}uam_accessgroup_to_object.group_id = ‘”.$uam_filter_id.”‘) “;}
}
return $where;
}
add_filter( ‘posts_where’, ‘nw_admin_UAM_filter_to_posts_where’, 10, 2 );Hi.
Where is the manual please?I have made some test with default taxonomy (categorie) same problem (if i ad a rule for a categorie restriction, it doesn’t works and all previous rules stop working..)
Forum: Plugins
In reply to: [Multisite MediaSync] Exlude some website from syncPerhaps with something like:
function msms_getBlogs() {
global $wpdb;
//return $wpdb->get_results(‘SELECT blog_id FROM wp_blogs’);
return(array(1,2,4,37));
}And:
function multisite_mediasync_single_upload_dir( $dirs ) { //ICI peu eclure blog??
$blog_id = get_current_blog_id();
if( in_array($blog_id, msms_getBlogs()) ){
$dirs[‘baseurl’] = network_site_url( ‘/wp-content/uploads’ );
$dirs[‘basedir’] = ABSPATH . ‘wp-content/uploads’;
$dirs[‘path’] = $dirs[‘basedir’] . $dirs[‘subdir’];
$dirs[‘url’] = $dirs[‘baseurl’] . $dirs[‘subdir’];
}
return $dirs;
}What do you thing?
Forum: Plugins
In reply to: [Backup and Staging by WP Time Capsule] Some bugsok
ps: I have understand the dropbox process for the “sql/file versioning”Forum: Plugins
In reply to: [MultiSite Clone Duplicator] I want to keep defaut site images urls.any help?add_filter(‘mucd_default_fields_to_update’, ‘nw_nochangeimagessources_onduplicate’);
function nw_nochangeimagessources_onduplicate(){
return array (
‘commentmeta’ => array(),
‘comments’ => array(),
‘links’ => array(‘link_url’, ‘link_image’),
‘options’ => array(‘option_name’, ‘option_value’),
‘postmeta’ => array(‘meta_value’),
// ‘posts’ => array(‘post_content’, ‘guid’),
‘posts’ => array( ‘guid’),
‘terms’ => array(),
‘term_relationships’ => array(),
‘term_taxonomy’ => array(),
);}
Forum: Plugins
In reply to: [Timely All-in-One Events Calendar] Dates selector BugI am alone to have this bug?
Hi Bloxxor.
I don’t use sunriseSame Bug Here.plugin option are invisible in network admin !
Forum: Plugins
In reply to: [Timely All-in-One Events Calendar] Dates selector BugHi.
Thanks but the fiel is empty :
https://img42.com/u5WrcForum: Plugins
In reply to: [Timely All-in-One Events Calendar] Dates selector BugHi Benjamin any news ?