PATH:
home
/
letacommog
/
camarsac
/
wp-content
/
plugins
/
jet-engine
/
includes
/
modules
/
profile-builder
/
inc
<?php namespace Jet_Engine\Modules\Profile_Builder; class Forms_Integration { /** * Constructor for the class */ public function __construct() { add_filter( 'jet-engine/forms/insert-post/pre-check', array( $this, 'check_posts_limit' ), 10, 4 ); } /** * Check posts limit */ public function check_posts_limit( $res, $postarr, $args, $notifications ) { // Apply restrictions only for post inserting, not the update if ( ! empty( $postarr['ID'] ) ) { return $res; } $restrictions = Module::instance()->get_restrictions_handler(); $check = $restrictions->current_user_can_submit_posts( $postarr['post_type'] ); if ( ! $check ) { $notifications->set_specific_status( $restrictions->get_latest_message() ); return false; } else { return $res; } } }
[+]
..
[-] settings.php
[edit]
[-] menu.php
[edit]
[+]
dynamic-visibility
[+]
dynamic-tags
[-] access.php
[edit]
[-] forms-integration.php
[edit]
[-] rewrite.php
[edit]
[-] query.php
[edit]
[-] blocks-integration.php
[edit]
[-] elementor-integration.php
[edit]
[+]
widgets
[-] module.php
[edit]
[-] frontend.php
[edit]
[-] restrictions.php
[edit]