Class ShrimpTest_Variant_Title

Description

ShrimpTest Title variant type class

An object-oriented variant type specification. This class name is handed to register_shrimptest_variant_type() at the end of this file so it is registered.

Many of the properties in the resulting object are there as register_shrimptest_variant_type() expects them.

Located in /plugins/variant-title.php (line 23)


	
			
Variable Summary
Method Summary
ShrimpTest_Variant_Title ShrimpTest_Variant_Title (ShrimpTest $shrimptest_instance)
void edit_helper ()
array get_titles ([int $id = null])
string return_name (object $object)
void save_postdata (int $post_ID, array $post)
string swap_title (string $title, int $id)
void title_metabox ()
Variables
mixed (line 29)
string $experiment_id_meta_key = '_shrimptest_title_experiment' (line 40)

The meta key used to store the experiment id for the post

string $label = __('Title' (line 29)

The user-facing label for the variant

string $titles_meta_key = '_shrimptest_title_titles' (line 45)

The meta key used to store the alternative titles

bool $_programmatic = true (line 34)

Set so that this variant can only be set programmatically:

Methods
Constructor ShrimpTest_Variant_Title (line 54)

Constructor

Sets up actions and filters.

ShrimpTest_Variant_Title ShrimpTest_Variant_Title (ShrimpTest $shrimptest_instance)
add_title_metabox (line 76)

Register the 'Alternative titles' meta box

void add_title_metabox ()
admin_add_variant_extra (line 365)

Print a message in the 'variant extra' section of the 'Add new experiment' screen

  • todo: add a real link to this message.
void admin_add_variant_extra ()
edit_helper (line 348)

Print a message at the end of the page/post noting that an inactive experiment exists

void edit_helper ()
edit_style_and_script (line 229)

Print styling and JavaScript for the 'Add new experiment' page

void edit_style_and_script ()
get_titles (line 319)

Get an array of alternative titles (variants) for this post/experiment

array get_titles ([int $id = null])
  • int $id
return_name (line 336)

Return the variant_name property from the given object

string return_name (object $object)
  • object $object
save_postdata (line 148)

Use the POST data to create or update the associated experiment

void save_postdata (int $post_ID, array $post)
  • int $post_ID
  • array $post
swap_title (line 383)

Return the appropriate title, depending on the visitor's experiment status

It is registered against the the_title filter.

string swap_title (string $title, int $id)
  • string $title
  • int $id
title_metabox (line 90)

Print the 'Alternative titles' meta box

void title_metabox ()

Documentation generated on Sat, 04 Sep 2010 23:40:58 -0400 by phpDocumentor 1.4.3