/**
  * Registering a new shortcode.
  * 
  * @since 1.0.0
  * @return void
  */
 public static function register($className, $plugin)
 {
     if (!self::$manager) {
         self::$manager = new FactoryShortcodes320_ShortcodeManager();
     }
     self::$manager->register($className, $plugin);
 }
示例#2
0
 * Requests assets for email locker.
 */
function opanda_social_locker_assets($lockerId, $options, $fromBody, $fromHeader)
{
    OPanda_AssetsManager::requestLockerAssets();
    // Miscellaneous
    OPanda_AssetsManager::requestTextRes(array('misc_close', 'misc_or_wait'));
    if (isset($options['opanda_buttons_order']) && strpos($options['opanda_buttons_order'], 'facebook') !== false) {
        OPanda_AssetsManager::requestFacebookSDK();
    }
}
add_action('opanda_request_assets_for_social-locker', 'opanda_social_locker_assets', 10, 4);
/**
 * A shortcode for the Social Locker
 * 
 * @since 1.0.0
 */
class OPanda_SocialLockerShortcode extends OPanda_LockerShortcode
{
    /**
     * Shortcode name
     * @var string
     */
    public $shortcodeName = array('sociallocker', 'sociallocker-1', 'sociallocker-2', 'sociallocker-3', 'sociallocker-4');
    protected function getDefaultId()
    {
        return get_option('opanda_default_social_locker_id');
    }
}
FactoryShortcodes320::register('OPanda_SocialLockerShortcode', $bizpanda);
示例#3
0
        OPanda_AssetsManager::requestTextRes(array('misc_data_processing', 'misc_or_enter_email', 'misc_enter_your_email', 'misc_enter_your_name', 'misc_your_agree_with', 'misc_terms_of_use', 'misc_privacy_policy', 'misc_or_wait', 'misc_close', 'misc_or'));
        // Errors & Notices
        OPanda_AssetsManager::requestTextRes(array('errors_empty_email', 'errors_inorrect_email', 'errors_empty_name', 'errors_subscription_canceled', 'misc_close', 'misc_or'));
        // The screen "One Step To Complete" | Errors & Notices
        OPanda_AssetsManager::requestTextRes(array('onestep_screen_title', 'onestep_screen_instructiont', 'onestep_screen_button', 'errors_not_signed_in', 'errors_not_granted'));
        // Sign-In Buttons
        OPanda_AssetsManager::requestTextRes(array('signin_long', 'signin_short', 'signin_facebook_name', 'signin_twitter_name', 'signin_google_name', 'signin_linkedin_name'));
        if (isset($options['opanda_connect_buttons']) && strpos($options['opanda_connect_buttons'], 'facebook') !== false) {
            OPanda_AssetsManager::requestFacebookSDK();
        }
    }
    add_action('opanda_request_assets_for_signin-locker', 'opanda_signin_locker_assets', 10, 4);
    /**
     * A shortcode for the Sign-In Locker
     * 
     * @since 1.0.0
     */
    class OPanda_SignInLockerShortcode extends OPanda_LockerShortcode
    {
        /**
         * Shortcode name
         * @var string
         */
        public $shortcodeName = array('signinlocker', 'signinlocker-1', 'signinlocker-2', 'signinlocker-3', 'signinlocker-4', 'signinlocker-bulk');
        protected function getDefaultId()
        {
            return get_option('opanda_default_signin_locker_id');
        }
    }
    FactoryShortcodes320::register('OPanda_SignInLockerShortcode', $bizpanda);
}