Plugin Directory

Changeset 3442051


Ignore:
Timestamp:
01/18/2026 06:13:22 PM (2 months ago)
Author:
whiteshadow
Message:

Turn off term permissions for now.

Location:
admin-menu-editor/trunk/modules/content-permissions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • admin-menu-editor/trunk/modules/content-permissions/content-permissions.php

    r3442047 r3442051  
    1818
    1919    private $metaBoxUiScript = null;
     20
     21    private bool $termPermissionsEnabled = false; //Disabled because the feature is not finished.
    2022
    2123    public function __construct($menuEditor) {
     
    255257    }
    256258
     259    public function areTermPermissionsEnabled(): bool {
     260        return $this->termPermissionsEnabled;
     261    }
     262
    257263    public function isSuitableForExport() {
    258264        return false;
     
    739745        if (
    740746            ($depth === 0)
     747            && $this->module->areTermPermissionsEnabled()
    741748            && !empty(self::POST_TO_TERM_ACTION_MAP[$action->getName()])
    742749        ) {
  • admin-menu-editor/trunk/modules/content-permissions/editor-ui.php

    r3442047 r3442051  
    6565            add_action($hook, [$this, 'addBoxHooks']);
    6666        }
    67         foreach (['load-term.php', 'load-edit-tags.php' /* <- only for saving */] as $hook) {
    68             add_action($hook, [$this, 'addTermUiHooks']);
     67
     68        if ( $module->areTermPermissionsEnabled() ) {
     69            foreach (['load-term.php', 'load-edit-tags.php' /* <- only for saving */] as $hook) {
     70                add_action($hook, [$this, 'addTermUiHooks']);
     71            }
    6972        }
    7073    }
  • admin-menu-editor/trunk/modules/content-permissions/policy.php

    r3442047 r3442051  
    714714        ));
    715715        //todo: Should disabling this also prevent the term itself from appearing in the term list?
    716         // How does PublishPress handle this? We probably don't want too many granular options here.
     716        // We probably don't want too many granular options here.
    717717        $this->addAction(new Action(
    718718            self::ACTION_VIEW_ASSOCIATED_OBJECTS_IN_LISTS,
Note: See TracChangeset for help on using the changeset viewer.