yarpp = $yarpp; $this->template_text = __( "This advanced option gives you full power to customize how your related posts are displayed. ". "Templates (stored in your theme folder) are written in PHP.", 'yarpp' ); } private function offer_copy_templates() { return (!$this->yarpp->diagnostic_custom_templates() && $this->yarpp->admin->can_copy_templates()); } public function checkbox($option, $desc, $class = null) { include(YARPP_DIR.'/includes/phtmls/yarpp_meta_box_checkbox.phtml'); } public function template_checkbox($rss=false, $class = null) { $pre = ($rss) ? 'rss_' : ''; $chosen_template = yarpp_get_option($pre."template"); $choice = ($chosen_template === false) ? 'builtin' : (($chosen_template === 'thumbnails') ? 'thumbnails' : 'custom'); $builtIn = ($choice === 'builtin') ? 'active' : null; $thumbnails = ($choice === 'thumbnails') ? 'active' : null; $diagPostThumbs = (!$this->yarpp->diagnostic_post_thumbnails()) ? 'disabled' : null; $custom = ($choice === 'custom') ? 'active' : null; $diagCustTemplt = (!$this->yarpp->diagnostic_custom_templates()) ? 'disabled' : null; include(YARPP_DIR.'/includes/phtmls/yarpp_meta_box_template_checkbox.phtml'); } public function template_file($rss=false, $class=null) { $pre = ($rss) ? 'rss_' : ''; $chosen_template = yarpp_get_option($pre.'template'); include(YARPP_DIR.'/includes/phtmls/yarpp_meta_box_template_file.phtml'); } public function textbox($option, $desc, $size = 2, $class = null, $note = null) { $value = esc_attr(yarpp_get_option($option)); include(YARPP_DIR.'/includes/phtmls/yarpp_meta_box_textbox.phtml'); } public function beforeafter($options, $desc, $size = 10, $class = null, $note = null) { include(YARPP_DIR.'/includes/phtmls/yarpp_meta_box_beforeafter.phtml'); } /* MARK: Last cleaning spot */ public function tax_weight($taxonomy) { $weight = (int) yarpp_get_option("weight[tax][{$taxonomy->name}]"); $require = (int) yarpp_get_option("require_tax[{$taxonomy->name}]"); include(YARPP_DIR.'/includes/phtmls/yarpp_meta_box_tax_weight.phtml'); } /* MARK: Last cleaning spot */ public function weight($option, $desc) { $weight = (int) yarpp_get_option("weight[$option]"); /* Both require MyISAM fulltext indexing: */ $fulltext = $this->yarpp->diagnostic_fulltext_disabled() ? ' readonly="readonly" disabled="disabled"' : ''; echo "
{$desc}
"; echo "
"; } public function displayorder($option, $class=null) { echo "
"; _e( "Order results:", 'yarpp' ); echo "