aFontAwesome = $aFontAwesome; $this->loadData(); $this->loadButtons(); } private function loadData() { $this->aSavedData = (array) get_option( 'buttonizer_buttons' ); $this->aPageCategories = (array) get_option( 'buttonizer_page_categories' ); } private function loadButtons() { // Get buttons $aButtons = ( isset( $this->aSavedData['buttonorder'] ) && is_array( $this->aSavedData['buttonorder'] ) ? $this->aSavedData['buttonorder'] : array( 0 => -1, ) ); if ( $aButtons[0] != '-1' ) { $aButtons[-1] = '-1'; } echo '' ; echo '' ; } private function loadIndividialButtonRow( $sButtonKey, $iButtonId, $bDisabled ) { $sButtonTitle = ( isset( $this->aSavedData['button_' . $iButtonId . '_title'] ) ? $this->aSavedData['button_' . $iButtonId . '_title'] : 'Button ' . ($iButtonId + 1) ); $onMobile = ( isset( $this->aSavedData['button_' . $iButtonId . '_show_on_phone'] ) ? $this->aSavedData['button_' . $iButtonId . '_show_on_phone'] : '' ); $onDesktop = ( isset( $this->aSavedData['button_' . $iButtonId . '_show_on_desktop'] ) ? $this->aSavedData['button_' . $iButtonId . '_show_on_desktop'] : '' ); ?>
  • aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : 'New button' ); return ''; } // Get button icon public function buttonGetIcon( $iButtonId = 0 ) { $fieldName = 'button_' . $iButtonId . '_icon'; $fab_icon_image = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' ); $p = ''; } // buttonGetShowOnPages public function buttonGetShowOnPages( $iButtonId = 0 ) { $fieldName = 'button_' . $iButtonId . '_show_on_pages'; $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' ); $pageOrders = ( isset( $this->aPageCategories['categorieOrder'] ) ? $this->aPageCategories['categorieOrder'] : array() ); /* * Generate '; foreach ( $pageOrders as $arrayKey => $pageKey ) { if ( $pageKey == -1 ) { continue; } $html .= ''; } return $html . ''; } // Only show this button on desktop? public function buttonGetShowDesktop( $iButtonId = 0 ) { $fieldName = 'button_' . $iButtonId . '_show_on_desktop'; $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' ); return ''; } // Only show when company is open? public function buttonGetShowWenOpen( $iButtonId = 0 ) { $fieldName = 'button_' . $iButtonId . '_show_when_opened'; $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' ); return ''; } // Only show when company is open? public function buttonGetShowNotWenOpen( $iButtonId = 0 ) { $fieldName = 'button_' . $iButtonId . '_show_not_when_opened'; $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' ); return ''; } public function buttonGetHideLabel( $iButtonId = 0 ) { $fieldName = 'button_' . $iButtonId . '_hide_label'; $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' ); return ''; } // Is this a phone number? public function buttonGetIsPhoneNumber( $iButtonId = 0 ) { $fieldName = 'button_' . $iButtonId . '_is_phonenumber'; $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' ); return ''; } public function buttonGetUrl( $iButtonId = 0 ) { $fieldName = 'button_' . $iButtonId . '_url'; $fieldValue = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' ); return ''; } // Only show this button on phone? public function buttonGetNewTab( $iButtonId = 0 ) { $fieldName = 'button_' . $iButtonId . '_url_newtab'; $is_selected = ( isset( $this->aSavedData[$fieldName] ) ? $this->aSavedData[$fieldName] : '' ); return ''; } }