lib/ThemeOption/Menu/Social.php
/**
         * All needed fields for oAuth authorization protocol
         *
         * @param SectionInterface $section
         *
         * @return array
         * @throws \SilverWp\Helper\Control\Exception
         */
All needed fields for oAuth authorization protocol
@param SectionInterface $section

@return array
@throws \SilverWp\Helper\Control\Exception
All needed fields for oAuth authorization protocol @param SectionInterface $section @return array @throws \ SilverWp \ Helper \ Control \ Exception
protected function instagramAuth( SectionInterface $section, Toggle $toggle ) {
            $note_box = new Notebox();
            $note_box->setLabel(
                Translate::params(
                    'These details are available in <a href="%s" target="_blank">your dashboard</a>.'
                    , 'https://instagram.com/developer/register/'
                ).'<br>'.
                Translate::translate( '<u>Client ID</u> or <u>Access Token</u> is required.' )
            );
            $note_box->setDependency( $toggle, 'vp_dep_boolean' );
            $note_box->setStatus( 'normal' );
            $section->addControl( $note_box );
            $text = new Text( 'instagram_client_id' );
            $text->setLabel( Translate::translate( 'Client ID' ) );
            $text->setDescription( Translate::translate( 'Your API client id from Instagram.' ) );
            $text->setDependency( $toggle, 'vp_dep_boolean' );
            $section->addControl( $text );
            $text = new Text( 'instagram_token' );
            $text->setLabel( Translate::translate( 'Access Token' ) );
            $text->setDescription( Translate::translate( 'A valid oAuth token.' ) );
            $text->setDependency( $toggle, 'vp_dep_boolean' );
            $section->addControl( $text );
            $text = new Text( 'instagram_user_id' );
            $text->setLabel( Translate::translate( 'User ID' ) );
            $text->setDescription( Translate::translate( 'Unique id of a user to get. You can check it on <a href="http://jelled.com/instagram/lookup-user-id" target="_blank">jelled.com</a>.' ) );
            $text->setDependency( $toggle, 'vp_dep_boolean' );
            $section->addControl( $text );
        }
protected function instagramAuth ( SectionInterface $ section , Toggle $ toggle ) { $ note_box = new Notebox ( ) ; $ note_box -> setLabel ( Translate :: params ( 'These details are available in <a href="%s" target="_blank">your dashboard</a>.' , 'https://instagram.com/developer/register/' ) . '<br>' . Translate :: translate ( '<u>Client ID</u> or <u>Access Token</u> is required.' ) ) ; $ note_box -> setDependency ( $ toggle , 'vp_dep_boolean' ) ; $ note_box -> setStatus ( 'normal' ) ; $ section -> addControl ( $ note_box ) ; $ text = new Text ( 'instagram_client_id' ) ; $ text -> setLabel ( Translate :: translate ( 'Client ID' ) ) ; $ text -> setDescription ( Translate :: translate ( 'Your API client id from Instagram.' ) ) ; $ text -> setDependency ( $ toggle , 'vp_dep_boolean' ) ; $ section -> addControl ( $ text ) ; $ text = new Text ( 'instagram_token' ) ; $ text -> setLabel ( Translate :: translate ( 'Access Token' ) ) ; $ text -> setDescription ( Translate :: translate ( 'A valid oAuth token.' ) ) ; $ text -> setDependency ( $ toggle , 'vp_dep_boolean' ) ; $ section -> addControl ( $ text ) ; $ text = new Text ( 'instagram_user_id' ) ; $ text -> setLabel ( Translate :: translate ( 'User ID' ) ) ; $ text -> setDescription ( Translate :: translate ( 'Unique id of a user to get. You can check it on <a href="http://jelled.com/instagram/lookup-user-id" target="_blank">jelled.com</a>.' ) ) ; $ text -> setDependency ( $ toggle , 'vp_dep_boolean' ) ; $ section -> addControl ( $ text ) ; }
All needed fields for oAuth authorization protocol
 @param SectionInterface $section
All needed fields for oAuth authorization protocol @param SectionInterface $section