/** * Page styling * @since 3 * @return void */ public function doPageSettings() { $this->setPageTitleVisibility(false); // disable the page title of a specific page. $this->setInPageTabTag('h2'); $this->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('asset/css/admin.css')); }
public function replyToGetCreditLink_2($sCredit, $oOption) { $_sVendorURL = $this->_getVendorURL($oOption); $_sName = esc_attr(AmazonAutoLinks_Registry::NAME); $_sImageURL = esc_url(AmazonAutoLinks_Registry::getPluginURL('asset/image/credit/amazon-auto-links-horizontal.jpg')); return $sCredit . "<div class='amazon-auto-links-credit' style='width: 100%; max-width: 100%;'>" . "<a href='{$_sVendorURL}' target='_blank'>" . "<img alt='{$_sName}' src='{$_sImageURL}' style='max-width: 100%; margin-left: auto; margin-right: auto; display:block;' />" . "</a>" . "</div>"; }
/** * @return string */ private function _getAffiliateInfo() { $_oOption = AmazonAutoLinks_Option::getInstance(); $_bJoindAffiliate = $_oOption->get('miunosoft_affiliate', 'affiliate_id'); $_sLink = 'http://store.michaeluno.jp/wp-signup.php'; return $_bJoindAffiliate ? '' : "<h4>" . __('Join Affiliate Program ', 'admin-page-framework-loader') . "</h4>" . "<p>" . __('Earn 20% commissions by setting a credit link in the unit output.', 'amazon-auto-links') . ' ' . sprintf(__('<a href="%1$s" target="_blank">Sing up</a> for the affiliate program first.', 'amazon-auto-links'), $_sLink) . "</p>" . "<a href='{$_sLink}' target='_blank'>" . "<img style='max-width:100%; max-width: 250px;' src='" . esc_url(AmazonAutoLinks_Registry::getPluginURL('asset/image/tip/credit_link.jpg')) . "' alt='" . __('Credit Link', 'amazon-auto-links') . "'/>" . "</a>"; }
/** * Triggered when the tab is loaded. * @callback action load_{$sPageSlug}_{$this->sTabSlug} */ public function replyToLoadTab($oFactory) { // Create a dummy form to trigger a validation callback. $oFactory->addSettingFields('_default', array('field_id' => '_dummy_field_for_validation', 'hidden' => true, 'type' => 'hidden', 'value' => $GLOBALS['aal_transient_id'], 'attributes' => array('name' => 'transient_id'))); // Load the Preview template CSS file. $oFactory->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('template/preview/style-preview.css')); }
/** * Sets up admin pages. */ public function setUp() { // Page group root. $this->setRootMenuPageBySlug('edit.php?post_type=' . AmazonAutoLinks_Registry::$aPostTypes['unit']); // Add pages new AmazonAutoLinks_URLUnitAdminPage_URLUnit($this, array('page_slug' => AmazonAutoLinks_Registry::$aAdminPages['url_unit'], 'title' => __('Add Unit by URL', 'amazon-auto-links'), 'screen_icon' => AmazonAutoLinks_Registry::getPluginURL("asset/image/screen_icon_32x32.png"), 'style' => AmazonAutoLinks_Registry::getPluginURL('asset/css/admin.css'))); $this->setMessage('allowed_maximum_number_of_fields', sprintf(__('Please upgrade to <a href="%1$s">Pro</a> to add more items!', 'amazon-auto-links'), 'http://en.michaeluno.jp/amazon-auto-links-pro')); $this->_registerMetaBoxes(); }
/** * Page styling * @since 3 * @return void */ private function _doPageSettings() { $this->setPageTitleVisibility(false); // disable the page title of a specific page. $this->setInPageTabTag('h2'); $this->setPluginSettingsLinkLabel(''); // pass an empty string to disable it. $this->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('asset/css/admin.css')); }
/** * Page styling * @since 3 * @return void */ private function _doPageSettings() { $this->setPageTitleVisibility(false); // disable the page title of a specific page. $this->setInPageTabTag('h2'); // $this->setPluginSettingsLinkLabel( '' ); // pass an empty string to disable it. $this->addLinkToPluginDescription("<a href='https://wordpress.org/support/plugin/amazon-auto-links' target='_blank'>" . __('Support', 'amazon-auto-links') . "</a>"); $this->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('asset/css/admin.css')); $this->setDisallowedQueryKeys(array('aal-option-upgrade', 'bounce_url')); }
/** * * @since 3 */ protected function _getReadmeContents($sFilePath, $sTOCTitle, $asSections = array()) { $_oWPReadmeParser = new AmazonAutoLinks_AdminPageFramework_WPReadmeParser($sFilePath, array('%PLUGIN_DIR_URL%' => AmazonAutoLinks_Registry::getPluginURL(), '%WP_ADMIN_URL%' => admin_url())); $_sContent = ''; foreach ((array) $asSections as $_sSection) { $_sContent .= $_oWPReadmeParser->getSection($_sSection); } if ($sTOCTitle) { $_oTOC = new AmazonAutoLinks_AdminPageFramework_TableOfContents($_sContent, 4, $sTOCTitle); return $_oTOC->get(); } return $_sContent; }
/** * Sets up form fields. */ public function setUp() { $_oFields = new AmazonAutoLinks_FormFields_TagUnit_Main(); foreach ($_oFields->get() as $_aField) { if ('unit_title' === $_aField['field_id']) { continue; } $this->addSettingFields($_aField); } // 3.2.0+ $_sMessage = esc_attr(__('Warning!', 'amazon-auto-links')); $_sExclamationIconURL = AmazonAutoLinks_Registry::getPluginURL('asset/image/exclamationmark_16x16.png'); new AmazonAutoLinks_AdminPageFramework_AdminNotice("<img src='{$_sExclamationIconURL}' alt='{$_sMessage}' /> " . sprintf(__('Amazon has deprecated the <a href="%1$s" target="_blank">tags</a> feature. So this is no longer functional.', 'amazon-auto-links'), 'https://www.amazon.com/gp/help/customer/display.html?nodeId=16238571')); }
/** * Returns field definition arrays. * * Pass an empty string to the parameter for meta box options. * * @return array */ public function get($sFieldIDPrefix = '', $sUnitType = 'category') { $_oOption = $this->oOption; $_bAPIConnected = $this->oOption->isAPIConnected(); $_sDel = $_bAPIConnected ? '' : "delete-line"; $_iMaxCol = $this->oOption->getMaxSupportedColumnNumber(); $_aItemFormat = AmazonAutoLinks_UnitOption_Base::getDefaultItemFormat(); $_aFields = array(array('field_id' => $sFieldIDPrefix . 'template_id', 'type' => 'select', 'title' => __('Template Name', 'amazon-auto-links'), 'tip' => __('Sets a default template for this unit.', 'amazon-auto-links'), 'label' => $this->oTemplateOption->getActiveTemplateLabels(), 'default' => $this->oTemplateOption->getDefaultTemplateIDByUnitType($sUnitType)), array('field_id' => $sFieldIDPrefix . 'column', 'title' => __('Number of Columns', 'amazon-auto-links'), 'type' => 'number', 'attributes' => array('class' => $_iMaxCol > 1 ? '' : 'disabled', 'disabled' => $_iMaxCol > 1 ? null : 'disabled', 'max' => $_iMaxCol), 'after_input' => "<div style='margin:auto; width:100%; clear: both;'><img src='" . AmazonAutoLinks_Registry::getPluginURL('asset/image/columns.gif') . "' title='" . __('The number of columns', 'amazon-auto-links') . "' style='width:220px; margin-top: 8px;' /></div>", 'tip' => __('This option requires a column supported template to be activated.'), 'description' => $_iMaxCol > 1 ? '' : ' ' . sprintf(__('Get one <a href="%1$s" target="_blank">here</a>!'), 'http://en.michaeluno.jp/amazon-auto-links-pro/'), 'default' => 4, 'delimiter' => ''), array('field_id' => $sFieldIDPrefix . 'item_format', 'type' => 'textarea', 'title' => __('Item Format', 'amazon-auto-links'), 'attributes' => array('class' => $_oOption->isAdvancedAllowed() ? '' : 'read-only', 'readonly' => $_oOption->isAdvancedAllowed() ? null : 'raedonly', 'rows' => 6, 'style' => 'width: 96%'), 'default' => $_aItemFormat['item_format'], 'description' => __('Sets the layout of the product. The following variables are available.', 'amazon-auto-links') . '<br />' . "<code>%href%</code> - " . __('product link url', 'amazon-auto-links') . '<br />' . "<code>%title%</code> - " . __('title with HTML tags defined in the Title Format option', 'amazon-auto-links') . '<br />' . "<code>%title_text%</code> - " . __('title without HTML tags', 'amazon-auto-links') . '<br />' . "<code>%image%</code> - " . __('thumbnail with HTML tags defined in the Image Format option', 'amazon-auto-links') . '<br />' . "<code class='{$_sDel}'>%image_set%</code> - " . __('sub-images.', 'amazon-auto-links') . '<br />' . "<code>%description%</code> - " . __('description with HTML tags', 'amazon-auto-links') . '<br />' . "<code>%description_text%</code> - " . __('description without HTML tags', 'amazon-auto-links') . '<br />' . "<code class='{$_sDel}'>%price%</code> - " . __('product price.', 'amazon-auto-links') . '<br />' . "<code class='{$_sDel}'>%rating%</code> - " . __('user rating.', 'amazon-auto-links') . '<br />' . "<code class='{$_sDel}'>%review%</code> - " . __('customer review.', 'amazon-auto-links') . '<br />' . "<code>%button%</code> - " . __('store link button.', 'amazon-auto-links') . '<br />' . "<code>%disclaimer%</code> - " . __('disclaimer for the product information.', 'amazon-auto-links') . '<br />' . ($_bAPIConnected ? null : sprintf('* <span class="warning">' . __('Some items need <a href="%1$s">API</a> to be set up.', 'amazon-auto-links') . "</span>", AmazonAutoLinks_PluginUtility::getAPIAuthenticationPageURL()))), array('field_id' => $sFieldIDPrefix . 'title_format', 'title' => __('Title Format', 'amazon-auto-links'), 'type' => 'textarea', 'default' => $_aItemFormat['title_format'], 'attributes' => array('rows' => 6, 'class' => $_oOption->isAdvancedAllowed() ? '' : 'read-only', 'readonly' => $_oOption->isAdvancedAllowed() ? null : 'readonly', 'style' => 'width: 96%'), 'description' => __('Sets the layout of the title.', 'amazon-auto-links') . '<br />' . '<code>%href%</code> - ' . __('product link url', 'amazon-auto-links') . '<br />' . '<code>%title_text%</code> - ' . __('title', 'amazon-auto-links') . '<br />' . '<code>%description_text%</code> - ' . __('description without HTML tags', 'amazon-auto-links')), array('field_id' => $sFieldIDPrefix . 'image_format', 'title' => __('Image Format', 'amazon-auto-links'), 'type' => 'textarea', 'attributes' => array('rows' => 6, 'class' => $_oOption->isAdvancedAllowed() ? '' : 'read-only', 'readonly' => $_oOption->isAdvancedAllowed() ? null : 'readonly', 'style' => 'width: 96%'), 'default' => $_aItemFormat['image_format'], 'description' => __('Sets the layout of the image.', 'amazon-auto-links') . '<br />' . '<code>%href%</code> - ' . __('product link url', 'amazon-auto-links') . '<br />' . '<code>%title_text%</code> - ' . __('title', 'amazon-auto-links') . '<br />' . '<code>%src%</code> - ' . __('image url', 'amazon-auto-links') . '<br />' . '<code>%max_width%</code> - ' . __('image size', 'amazon-auto-links') . '<br />' . '<code>%description_text%</code> - ' . __('description without HTML tags', 'amazon-auto-links'))); // Insert common field arguments. $_bIsDisabled = !$_oOption->isAdvancedAllowed(); if (!$_bIsDisabled) { return $_aFields; } $_sOpeningTag = $_bIsDisabled ? "<div class='upgrade-to-pro' style='margin:0; padding:0; display: inline-block;' title='" . __('Please consider upgrading to Pro to use this feature!', 'amazon-auto-links') . "'>" : ""; $_sClosingTag = $_bIsDisabled ? "</div>" : ""; foreach ($_aFields as &$_aField) { if ($sFieldIDPrefix . 'template_id' === $_aField['field_id']) { continue; } $_aField = array('before_fieldset' => $_sOpeningTag, 'after_fieldset' => $_sClosingTag) + $_aField; } return $_aFields; }
private function _printBuyNowButton() { $_sLink = 'http://en.michaeluno.jp/amazon-auto-links-pro/'; $_sLang = defined('WPLANG') ? WPLANG : 'en'; ?> <div class="get-now-button"> <a target="_blank" href="<?php echo esc_url($_sLink); ?> ?lang=<?php echo $_sLang; ?> " title="<?php _e('Get Now!', 'amazon-auto-links'); ?> "> <img src="<?php echo AmazonAutoLinks_Registry::getPluginURL('asset/image/buynowbutton.gif'); ?> " /> </a> </div> <?php }
/** * * @since 3.1.0 * @return string */ private function _getFeedIcon($sType, $sLabel, $sKey, $mValue) { $_oOption = AmazonAutoLinks_Option::getInstance(); $_sQueryKey = $_oOption->get('query', 'cloak'); $_sImgURL = AmazonAutoLinks_Registry::getPluginURL('rss2' === $sType ? 'asset/image/rss16x16.gif' : 'asset/image/json16x16.gif'); return "<span class='feed-icon'>" . $this->oUtil->generateHTMLTag('a', array('href' => add_query_arg(array($_sQueryKey => 'feed', 'output' => $sType, $sKey => $mValue), site_url()), 'target' => '_blank', 'title' => $sLabel), $this->oUtil->generateHTMLTag('img', array('src' => esc_url($_sImgURL), 'alt' => $sLabel))) . "</span>"; }
public function style_AmazonAutoLinks_PostType_AutoInsert() { $_sNone = 'none'; return "#post-body-content {\r\n margin-bottom: 10px;\r\n }\r\n #edit-slug-box {\r\n display: {$_sNone};\r\n }\r\n #icon-edit.icon32.icon32-posts-" . AmazonAutoLinks_Registry::$aPostTypes['auto_insert'] . " {\r\n background:url('" . AmazonAutoLinks_Registry::getPluginURL("asset/image/screen_icon_32x32.png") . "') no-repeat;\r\n } \r\n /* Hide the submit button for the post type drop-down filter */\r\n #post-query-submit {\r\n display: {$_sNone};\r\n }\r\n "; }
/** * Returns field definition arrays. * * Pass an empty string to the parameter for meta box options. * * @return array */ public function get($sFieldIDPrefix = '') { return array(array('field_id' => 'affiliate_id', 'type' => 'text', 'title' => __('Amazon Auto Links Pro Affiliate ID', 'amazon-auto-links'), 'tip' => array("<img style='float: left; margin: 1em 1.6em 1em 0.5em; text-align:center; max-height: 200px;' src='" . esc_url(AmazonAutoLinks_Registry::getPluginURL('asset/image/tip/credit_link.jpg')) . "' alt='" . __('Credit Link', 'amazon-auto-links') . "'/>", __('If you set your affiliate ID of Amazon Auto Links Pro here, the credit text at the bottom of unit outputs will be linked to the Amazon Auto Links Pro product page.', 'amazon-auto-links')), 'description' => array(__('Earn commissions by putting a link to the product page of Amazon Auto Links Pro in the credit link of unit outputs.', 'amazon-auto-links'), sprintf(__('You need to <a href="%1$s" target="_blank">sign up</a> first for Amazon Auto Links Pro affiliate program to get commisions.', 'amazon-auto-links'), 'http://store.michaeluno.jp/wp-signup.php'), 'e.g. <code>456</code>'))); }
/** * * @uses flush() */ protected function _printPreviewTable($aPageElements) { // Instantiate the core object - the fetching process should be done while rendering the HTML output // because it takes some time so the flush() function is used in the middle. $_oAALCatPreview = new AmazonAutoLinks_Unit_category($this->oUnitOption); $_oAALUnitPreview = new AmazonAutoLinks_Unit_category($this->oUnitOption); // Buttons $bReachedLimit = $this->isNumberOfCategoryReachedLimit(count($this->oUnitOption->get('categories')) + count($this->oUnitOption->get('categories_exclude'))); $bIsAlreadyAdded = $this->isAddedCategory($aPageElements['sBreadcrumb'], $this->oUnitOption->get('categories')); $bIsAlreadyAddedExcludingCategory = $this->isAddedCategory($aPageElements['sBreadcrumb'], $this->oUnitOption->get('categories_exclude')); $bIsSubCategoryOfAddedItems = $this->isSubCategoryOfAddedItems($aPageElements['sBreadcrumb'], $this->oUnitOption->get('categories')); $sAddDisabled = $this->isEmpty($aPageElements['sRSSURL']) || $bIsAlreadyAdded || $bIsAlreadyAddedExcludingCategory ? "disabled='disabled'" : ""; $sExcludeDisabled = $this->isEmpty($this->oUnitOption->get('categories')) || $bIsAlreadyAdded || $bIsAlreadyAddedExcludingCategory || !$bIsSubCategoryOfAddedItems ? "disabled='disabled'" : ""; $sRemoveDisabled = $this->isEmpty($this->oUnitOption->get('categories')) ? "disabled='disabled'" : ""; $sCreateDisabled = $this->isEmpty($this->oUnitOption->get('categories')) ? "disabled='disabled'" : ""; $sCreateOrSave = $aPageElements['bNew'] ? __('Create', 'amazon-auto-links') : __('Save', 'amazon-auto-links'); // Arrows $sAddArrow = $aPageElements['bNew'] && !$this->isEmpty($aPageElements['sRSSURL']) && $this->isEmpty($this->oUnitOption->get('categories')) ? "<img class='category-select-right-arrow' title='" . __('Add the current selection!', 'amazon-auto-links') . "' src='" . AmazonAutoLinks_Registry::getPluginURL('asset/image/arrow_right.png') . "'/>" : ""; $sCreateArrow = $aPageElements['bNew'] && !$this->isEmpty($aPageElements['sRSSURL']) && !$this->isEmpty($this->oUnitOption->get('categories')) ? "<img class='category-select-right-arrow' title='" . __('Create the unit!', 'amazon-auto-links') . "' src='" . AmazonAutoLinks_Registry::getPluginURL('asset/image/arrow_right.png') . "'/>" : ""; $sSelectArrow = $aPageElements['bNew'] && $this->isEmpty($aPageElements['sRSSURL']) && $this->isEmpty($this->oUnitOption->get('categories')) ? "<img class='category-select-left-bottom-arrow' title='" . __('Select a category from the links!', 'amazon-auto-links') . "' src='" . AmazonAutoLinks_Registry::getPluginURL('asset/image/arrow_left_bottom.png') . "'/>" : ""; ?> <input type="hidden" name="amazon_auto_links_cat_select[category][breadcrumb]" value="<?php echo $this->oEncrypt->encode($aPageElements['sBreadcrumb']); ?> " /> <input type="hidden" name="amazon_auto_links_cat_select[category][feed_url]" value="<?php echo $aPageElements['sRSSURL']; ?> " /> <input type="hidden" name="amazon_auto_links_cat_select[category][page_url]" value="<?php echo $aPageElements['sPageURL']; ?> " /> <table class="category-select-table"> <tbody> <tr> <td class="category-select-first-column"> <h3><?php _e('Current Selection', 'amazon-auto-links'); ?> </h3> <p class="category-select-breadcrumb"><?php echo $aPageElements['sBreadcrumb']; ?> </p> </td> <td class="category-select-second-column" colspan="2"> <div class="category-select-submit-buttons"> <span class="primary"><a class="button button-primary" href="<?php echo $aPageElements['sBounceURL']; ?> "><?php _e('Go Back', 'amazon-auto-links'); ?> </a></span> <span class="primary"><?php echo $sCreateArrow; ?> <input type="submit" name="amazon_auto_links_cat_select[save]" class="button button-primary" value="<?php echo $sCreateOrSave; ?> " <?php echo $sCreateDisabled; ?> /></span> <span><?php echo $sAddArrow; ?> <input type="submit" name="amazon_auto_links_cat_select[add]" class="button button-secondary" value="<?php _e('Add Category', 'amazon-auto-links'); ?> " <?php echo $sAddDisabled; ?> /></span> <span><input type="submit" name="amazon_auto_links_cat_select[exclude]" class="button button-secondary" value="<?php _e('Add Excluding Category', 'amazon-auto-links'); ?> " <?php echo $sExcludeDisabled; ?> /></span> <span><input type="submit" name="amazon_auto_links_cat_select[remove]" class="button button-secondary" value="<?php _e('Remove Checked', 'amazon-auto-links'); ?> " <?php echo $sRemoveDisabled; ?> /></span> </div> <div> <h3><?php _e('Added Categories', 'amazon-auto-links'); ?> </h3> <?php echo $aPageElements['sSelectedCategories']; ?> <h3><?php _e('Added Excluding Sub-categories', 'amazon-auto-links'); ?> </h3> <?php echo $aPageElements['sSelectedExcludingCategories']; ?> </div> </td> </tr> <tr> <td class="category-select-first-column"> <h3><?php _e('Select Category', 'amazon-auto-links'); ?> </h3> <?php echo $sSelectArrow; ?> <?php echo $aPageElements['sSidebarHTML']; ?> </td> <td class="category-select-second-column category-select-preview-left"> <h3> <?php echo $aPageElements['sRSSURL'] ? __('Preview of This Category', 'amazon-auto-links') : __('No Preview', 'amazon-auto-links'); ?> </h3> <div class="widthfixer" style="width:<?php echo $this->oUnitOption->get('image_size'); ?> px;"></div> <?php if ($aPageElements['sRSSURL']) { $_oAALCatPreview->render(array($aPageElements['sRSSURL'])); // flush(); } else { _e('Please select a category from the list on the left.', 'amazon-auto-links'); } ?> </td> <td class="category-select-third-column category-select-preview-right"> <h3><?php _e('Unit Preview', 'amazon-auto-links'); ?> </h3> <div class="widthfixer" style="width:<?php echo $this->oUnitOption->get('image_size'); ?> px;"></div> <?php if (!$this->isEmpty($aPageElements['aSelectedRSSURLs'])) { $_oAALUnitPreview->render($aPageElements['aSelectedRSSURLs']); flush(); } else { _e('Please add a category from the list after selecting it.', 'amazon-auto-links'); } ?> </td> </tr> </tbody> </table> <?php // Debug info $_oOption = AmazonAutoLinks_Option::getInstance(); if ($_oOption->isDebug()) { echo "<h4>" . __('Debug Info', 'amazon-auto-links') . "</h4>"; echo "<h5>" . __('Page URL', 'amazon-auto-links') . "</h5>"; AmazonAutoLinks_Debug::dump($aPageElements['sPageURL']); echo "<h5>" . __('Feed URL', 'amazon-auto-links') . "</h5>"; AmazonAutoLinks_Debug::dump($aPageElements['sRSSURL']); } }
/** * Style for this custom post type pages * @callback filter style_{class name} */ public function style_AmazonAutoLinks_PostType() { $_sNone = 'none'; return "#post-body-content {\r\n margin-bottom: 10px;\r\n }\r\n #edit-slug-box {\r\n display: {$_sNone};\r\n }\r\n #icon-edit.icon32.icon32-posts-" . AmazonAutoLinks_Registry::$aPostTypes['unit'] . " {\r\n background:url('" . AmazonAutoLinks_Registry::getPluginURL("asset/image/screen_icon_32x32.png") . "') no-repeat;\r\n } \r\n /* Hide the submit button for the post type drop-down filter */\r\n #post-query-submit {\r\n display: {$_sNone};\r\n } \r\n /* List Table Columns */\r\n .column-unit_type, \r\n .column-template,\r\n .column-feed {\r\n width:10%; \r\n }\r\n /* Feed column */\r\n .column-feed { \r\n text-align: center \r\n }\r\n .feed-icon {\r\n display: inline-block;\r\n margin-top: 0.4em;\r\n margin-right: 0.8em;\r\n }\r\n "; }
/** * Page styling * @since 3 * @return void */ public function doPageSettings() { $this->setPageTitleVisibility(false); // disable the page title of a specific page. $this->setInPageTabTag('h2'); $this->setPluginSettingsLinkLabel(''); // pass an empty string to disable it. $this->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('asset/css/admin.css')); // @todo examine whether this is necessary or not. $this->setDisallowedQueryKeys(array('aal-option-upgrade', 'bounce_url')); return; // Action Links (plugin.php) // $this->addLinkToPluginTitle( // $_sLink1, // $_sLink2 // ); $this->setPageHeadingTabsVisibility(false); // disables the page heading tabs by passing false. $this->setInPageTabTag('h3', 'aal_add_category_unit'); $this->setInPageTabsVisibility(false, 'aal_add_category_unit'); $this->setInPageTabsVisibility(false, 'aal_add_search_unit'); $this->setInPageTabsVisibility(false, 'aal_define_auto_insert'); $this->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('asset/css/select_categories.css'), 'aal_add_category_unit', 'select_categories'); $this->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('asset/css/aal_add_search_unit.css'), 'aal_add_search_unit'); $this->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('asset/css/aal_templates.css'), 'aal_templates'); $this->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('asset/css/readme.css'), 'aal_about'); $this->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('asset/css/readme.css'), 'aal_help'); $this->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('asset/css/get_pro.css'), 'aal_about', 'get_pro'); $this->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('template/preview/style-preview.css'), 'aal_add_category_unit', 'select_categories'); }
/** * Enqueues the style of the css file with the page slug name to the page. */ protected function _enqueueStyle() { $this->oFactory->enqueueStyle(AmazonAutoLinks_Registry::getPluginURL('asset/css/' . $this->sPageSlug . '.css'), $this->sPageSlug); }
/** * Sets up class properties. * @return void */ static function setUp($sPluginFilePath) { self::$sFilePath = $sPluginFilePath; self::$sDirPath = dirname(self::$sFilePath); }