コード例 #1
0
 /**
  * Get user's linkedin
  * @param  integer $user_id
  * @return string
  */
 function sc_get_users_linkedin($user_id = 0)
 {
     if (!$user_id) {
         $user_id = get_the_ID();
     }
     return apply_filters('sc_get_users_linkedin', SC_Users::get_users_linkedin($user_id), $user_id);
 }
コード例 #2
0
/**
 * Load the SC application
 *
 * @package Sprout_Clients
 * @return void
 */
function sprout_clients_load()
{
    if (class_exists('Sprout_Client')) {
        sc_deactivate_plugin();
        return;
        // already loaded, or a name collision
    }
    do_action('sprout_clients_preload');
    //////////
    // Load //
    //////////
    /**
     * Master class
     */
    require_once SC_PATH . '/Sprout_Clients.php';
    // models
    require_once SC_PATH . '/models/_Model.php';
    require_once SC_PATH . '/models/Client.php';
    require_once SC_PATH . '/models/Message.php';
    require_once SC_PATH . '/models/Record.php';
    // controllers
    require_once SC_PATH . '/controllers/_Controller.php';
    require_once SC_PATH . '/languages/Sprout_Clients_l10n.php';
    if (!class_exists('Sprout_Invoices')) {
        require_once SC_PATH . '/controllers/admin/_Settings.php';
    }
    require_once SC_PATH . '/controllers/admin/Settings.php';
    // controllers -- clients
    require_once SC_PATH . '/controllers/clients/Clients.php';
    require_once SC_PATH . '/controllers/clients/Clients_Users.php';
    require_once SC_PATH . '/controllers/clients/Clients_Admin_Meta_Boxes.php';
    require_once SC_PATH . '/controllers/clients/Clients_Admin_Table.php';
    require_once SC_PATH . '/controllers/clients/Clients_AJAX.php';
    // controllers -- history
    require_once SC_PATH . '/controllers/history/Client_History.php';
    require_once SC_PATH . '/controllers/history/SI_History.php';
    // controllers -- messages
    require_once SC_PATH . '/controllers/messages/Messages.php';
    require_once SC_PATH . '/controllers/messages/Message_Triggers.php';
    require_once SC_PATH . '/controllers/messages/Messages_Admin_Meta_Boxes.php';
    require_once SC_PATH . '/controllers/messages/Messages_Admin_Settings.php';
    require_once SC_PATH . '/controllers/messages/Messages_Admin_Table.php';
    require_once SC_PATH . '/controllers/messages/Messages_Route.php';
    require_once SC_PATH . '/controllers/messages/Messages_Shortcodes.php';
    require_once SC_PATH . '/controllers/messages/Messages_Templates.php';
    require_once SC_PATH . '/controllers/records/Internal_Records.php';
    require_once SC_PATH . '/controllers/records/Records_Admin_Table.php';
    require_once SC_PATH . '/controllers/updates/Updates.php';
    // template-tags
    require_once SC_PATH . '/template-tags/sprout-clients.php';
    require_once SC_PATH . '/template-tags/forms.php';
    require_once SC_PATH . '/template-tags/ui.php';
    require_once SC_PATH . '/template-tags/users.php';
    require_once SC_PATH . '/template-tags/utility.php';
    /**
     * Master Model
     */
    SC_Post_Type::init();
    /**
     * Client Model
     */
    Sprout_Client::init();
    /**
     * Messages Model
     */
    SC_Message::init();
    /**
     * Shared Models
     */
    SC_Record::init();
    /**
     * Master Controller
     */
    SC_Controller::init();
    /**
     * Records is shared with Sprout Invoices
     */
    SC_Internal_Records::init();
    /**
     * l10n
     */
    SC_l10n::init();
    /**
     * Settings
     */
    if (!class_exists('Sprout_Invoices')) {
        SA_Settings_API::init();
    }
    SC_Settings::init();
    /**
     * Clients
     */
    SC_Clients::init();
    SC_Users::init();
    SC_Clients_Admin_Meta_Boxes::init();
    SC_Clients_Admin_Table::init();
    SC_Clients_AJAX::init();
    SC_Client_History::init();
    SC_Invoices_History::init();
    /**
     * Messaging
     */
    /*/
    	SC_Messages::init();
    	SC_Messages_Meta::init();
    	SC_Messages_Admin_Settings::init();
    	SC_Messages_Route::init();
    	SC_Message_Shortcodes::init();
    	SC_Templates::init();
    	SC_Message_Triggers::init();
    	/**/
    SC_Updates::init();
    do_action('sprout_clients_loaded');
}