Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Richa Ferry Setyawan

    (@aakricha)

    Hi @muslimpribadi ,
    Thanks for using PublishPress Planner. We are really apreciate it.
    Yes. It’s valid point. Here is the sequence.
    1. My commit on that changelog is 10 Apr 2026(End of week. We are plan release on next week. So i prepare the date of changelog is on Monday 13 Apr 2026 next week)
    2. On monday we found some bug to finish. So we are fixing found bug first before release.
    3. Unfortunately after we are fixing that bug forget to update the release date with actual date. We are execute release on 15 Apr 2026. That makes our release date and commit has missmatch.

    Hope answer your question.
    Best Regards,

    Plugin Author Richa Ferry Setyawan

    (@aakricha)

    Hi @aaresrikanth ,
    Thank you for your report. But after doing testing with your information, unfortunately i’m still can’t replicate your issue. We will happy to help you fix if you can provide staging site. Because we can’t replicate your issue in our environtment.

    Thanks

    Plugin Author Richa Ferry Setyawan

    (@aakricha)

    Hi @saggre ,

    Thank you for using Publishpress Permissions. We are glad to hear your input. After doing checking, this plugin by default doing filtering terms including categories. And unfortunately this is impacted to wp cli also. If you want to use this plugin without unwanted filtering you can uncheck Categories in Permissions > Settings > Taxonomies

    ➜  public wp term list category --parent=2 
    +---------+------------------+--------+--------+-------------+--------+-------+
    | term_id | term_taxonomy_id | name | slug | description | parent | count |
    +---------+------------------+--------+--------+-------------+--------+-------+
    | 3 | 3 | child1 | child1 | | 2 | 0 |
    | 4 | 4 | child2 | child2 | | 2 | 0 |
    +---------+------------------+--------+--------+-------------+--------+-------+

    Let us know if you still facing issue about this. If you’re helped by this plugin please give us positif review. We are appreciate from you to keep Publishpress going.

    Best Regards

    Plugin Author Richa Ferry Setyawan

    (@aakricha)

    Hi @tychow πŸ‘‹
    Thank you again for your patience β€” and sorry for the delay in replying. We really appreciate you waiting for us.

    About your question β€” you can check whether a group exists using the Permissions API. And if the group doesn’t exist, you can create it and assign permissions immediately with the configuration you described:

    Add Specific Permissions β†’ Post type: Post β†’ Operation: View β†’ Adjustment: Enable β†’ Qualification β†’ Categories β†’ All Statuses β†’ select a specific category

    Below is a complete working example. This version will check the group by name, create it if it doesn’t exist, and then assign the permissions:

    <?php

    try {
    // Try to get the group by name
    $group = pp_get_group_by_name("Sample Group", 'pp_group');

    // If no group found, create one
    if (!$group) {
    $group_id = pp_create_group([
    'group_name' => 'Sample Group',
    'group_description' => 'Automatically created group'
    ]);

    if (!$group_id) {
    exit("❌ ERROR: Failed to create group\n");
    }

    echo "βœ… SUCCESS: Group created with ID {$group_id}\n";
    $group = get_post($group_id); // Load group object
    }

    // Get the target category (example: slug = sample-category)
    $term = get_term_by('slug', 'sample-category', 'category');

    // Assign permission rules
    $args = [
    'operation' => 'read',
    'mod_type' => 'additional',
    'for_item_source' => 'post',
    'for_item_type' => 'post',
    'via_item_source' => 'term',
    'via_item_type' => 'category',
    'item_id' => $term->term_taxonomy_id,
    ];

    $agents = [];
    $agents['item'][$group->ID] = true;

    ppc_assign_exceptions($agents, 'pp_group', $args);
    echo "βœ… SUCCESS: Permissions assigned successfully to group\n";

    } catch (Exception $e) {
    exit('❌ ERROR: ' . $e->getMessage());
    }

    Short explanation

    • Post type: Post -> ‘for_item_type’ => ‘post’,
    • Operation: View -> ‘operation’ => ‘read’,
    • Adjustment: Enable -> ‘mod_type’ => ‘additional’,
    • Categories -> ‘via_item_type’ => ‘category’,
    • select a specific category -> ‘item_id’ => $term->term_taxonomy_id,

    Just let us know β€” we’re always glad to help! πŸ™Œ
    Wishing you a wonderful day ahead!

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