Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter jumpy2015

    (@jumpy2015)

    Thanks a lot Manzoor, your new filters are exactly what I was looking for
    I’ve just installed in production environmnent your great plugin, thanks again

    Thread Starter jumpy2015

    (@jumpy2015)

    Thanks Manzoor,
    I realized that the wptelegram_add_custom_fields is not intended for what I need.

    I played a little with filters, ended up in something like this:
    added in class-wptelegram-post-handler.php, after line 446:

    $filterParam = array($wp_tags, $wp_subs);
    $filterOutput = apply_filters( 'wptelegram_user_defined_tags_handler', $filterParam, $post);
    $wp_tags = $filterOutput[0];
    $wp_subs = $filterOutput[1];

    sample usage (I put it in my theme functions.php):

    add_filter( 'wptelegram_user_defined_tags_handler', 'telegram_user_defined_tags_handler', 10, 2);
    
    /*
    input: array containings 2 arrays: 
    	values[0] => array of tags
    	values[1] => array of replacement for each tag found in template
    */
    function telegram_user_defined_tags_handler(array $values, WP_Post $post){
    	$values[0][] = '{url_encoded}';
    	$values[1][] =  urlencode(get_permalink($post->ID));
    	
    	$values[0][] = '{uppercase_title}';
    	$values[1][] = strtoupper($post->post_title);
    	return $values;
    }

    use it as you want if you think it can be useful for implementing the filters you were talking about.
    Maybe It would be nice to have a similar filter called in get_macros() functions (class-wptelegram-admin-settings.php)

    Thanks for your great plugin, and please keep me informed if you implement the above filters

    • This reply was modified 7 years, 6 months ago by jumpy2015. Reason: edited sample code
    • This reply was modified 7 years, 6 months ago by jumpy2015. Reason: edited sample code

    what the Reset Tool is expected to do? I mean, just resetting some settings or reset also the galleries created with nextGen? (the second would make it useless for me…)

    • This reply was modified 7 years, 8 months ago by jumpy2015.

    I’m in the same trouble: I assigned for every permission “some custom role”, which now I know I should not have done.
    Anyway, now I cannot handle nextgen settings any more: even if I enter with a member have “some custom role”, there is no way to enter in nextgen admin page.

    I understand that I did something wrong, now how can repair it?
    can I run a query such “update sometable set somefiled = ‘administrator’ where ….”?

    By the way, I think you should at least remove from the combo boxes the roles you know you don’t handle, so user can’t do something wrong.

    Same problem for me (version 1.6.1)

Viewing 5 replies - 1 through 5 (of 5 total)