• Resolved bsimanton

    (@bsimanton)


    We recently migrated our instance of Connections to a new domain. All of our settings are the same as on the previous domain but when a user adds themselves from the form their visibility is showing as Public as opposed to Unlisted. They still show under the Moderate tab but we would prefer it if they came in as Unlisted as opposed to Public. Please advise.

    https://www.ads-software.com/plugins/connections/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Steven

    (@shazahm1hotmailcom)

    @ bsimanton

    Yes, the default setting was changed awhile back. It greatly reduced the number of support issues similar to… “I added entries but they are not showing… and so on…”

    This default can be changed by adding a filter…

    First, install the Code Snippets plugin.

    Add a new snippet with the following code:

    add_filter( 'cn_metabox_publish_atts', 'cn_set_default_visibility' );
    
    function cn_set_default_visibility( $atts ) {
    
    	$atts['default']['visibility'] = 'unlisted';
    
    	return $atts;
    }

    SAve and activate the snippet.

    Entries should now default to “Unlisted”.

    Hope that helps!

    Thread Starter bsimanton

    (@bsimanton)

    Steven,

    I installed the plugin and I added the snippet as instructed yet the new entries are still defaulting to public.

    Plugin Author Steven

    (@shazahm1hotmailcom)

    @ bsimanton

    I think I may have misread this yesterday… This is actually when adding entries using the Form extension, right?

    If yes, then, right, the snippet I gave would not work. Apologies for the misunderstanding. There’s only one way to make this change, you’d have to edit the core PHP files. You’d have to change the code on this line:

    https://github.com/Connections-Business-Directory/Connections/blob/8.2.2/includes/entry/class.entry-data.php#L3322

    You would change 'public' to 'unlisted'.

    Thread Starter bsimanton

    (@bsimanton)

    Awesome, worked like a charm. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘New Entries are defaulting to Public’ is closed to new replies.