Example #1
0
 public static function init()
 {
     add_filter('wpcf_exclude_meta_boxes_on_post_type', array('StaticClass', 'my_cred_exclude'), 10, 1);
     //        add_filter('get_items_with_flag', array(__CLASS__, "item_filter"), 10, 1);
     // plugin init
     // NOTE Early Init, in order to catch up with early hooks by 3rd party plugins (eg CRED Commerce)
     add_action('init', array('CRED_CRED', '_init_'), 1);
     CRED_Loader::load('CLASS/Notification_Manager');
     CRED_Notification_Manager::init();
     /*
      if (isset($_GET['cred-edit-form'])&&!empty($_GET['cred-edit-form'])) {
      add_action('the_content', 'try_to_remove_view_shortcode', 0);
      add_action('the_content', 'try_to_add_view_shortcode', 9);
      }
     */
     // try to catch user shortcodes (defined by [...]) and solve shortcodes inside shortcodes
     // adding filter with priority before do_shortcode and other WP standard filters
     add_filter('the_content', 'cred_do_shortcode', 9);
     //https://onthegosystems.myjetbrains.com/youtrack/issue/cred-131#
     //if (!is_admin()) add_filter('cf_fields_value_save', array('CRED_CRED', 'cf_sanitize_values_on_save'));
 }