public function __construct($name = 'basic-custom-taxonomies') { parent::__construct($name); // Recipe taxonomies that users should not be able to delete $this->ignoreTaxonomies = array('rating', 'post_tag', 'category'); //Actions add_action('init', array($this, 'assets')); add_action('admin_init', array($this, 'custom_taxonomies_settings')); add_action('admin_menu', array($this, 'add_submenu_page')); add_action('admin_action_add_taxonomy', array($this, 'add_taxonomy')); }
public function __construct($name = 'custom-templates') { parent::__construct($name); // Load available blocks $this->load('template'); $this->load('block'); $this->load('general/code'); $this->load('general/date'); $this->load('general/image'); $this->load('general/link'); $this->load('general/paragraph'); $this->load('general/space'); $this->load('general/title'); $this->load('layout/box'); $this->load('layout/columns'); $this->load('layout/container'); $this->load('layout/rows'); $this->load('layout/table'); $this->load('recipe/author'); $this->load('recipe/cook_time'); $this->load('recipe/cook_time_text'); $this->load('recipe/custom_field'); $this->load('recipe/date'); $this->load('recipe/description'); $this->load('recipe/image'); $this->load('recipe/ingredients'); $this->load('recipe/instructions'); $this->load('recipe/link'); $this->load('recipe/notes'); $this->load('recipe/nutrition'); $this->load('recipe/nutrition_label'); $this->load('recipe/passive_time'); $this->load('recipe/passive_time_text'); $this->load('recipe/post_content'); $this->load('recipe/prep_time'); $this->load('recipe/prep_time_text'); $this->load('recipe/servings'); $this->load('recipe/servings_type'); $this->load('recipe/stars'); $this->load('recipe/tags'); $this->load('recipe/title'); $this->load('recipe/sub_fields/ingredient_container'); $this->load('recipe/sub_fields/ingredient_group'); $this->load('recipe/sub_fields/ingredient_name'); $this->load('recipe/sub_fields/ingredient_notes'); $this->load('recipe/sub_fields/ingredient_quantity'); $this->load('recipe/sub_fields/ingredient_unit'); $this->load('recipe/sub_fields/instruction_container'); $this->load('recipe/sub_fields/instruction_group'); $this->load('recipe/sub_fields/instruction_image'); $this->load('recipe/sub_fields/instruction_text'); $this->load('recipe/sub_fields/tag_name'); $this->load('recipe/sub_fields/tag_terms'); $this->load('functionality/add_to_shopping_list'); $this->load('functionality/favorite'); $this->load('functionality/print_button'); $this->load('functionality/servings_changer'); $this->load('functionality/sharing'); $this->load('functionality/unit_changer'); $this->load('partner/bigoven'); $this->load('partner/chicory'); $this->load('partner/food_fanatic'); $this->load('partner/yummly'); $this->load('social/facebook'); $this->load('social/google'); $this->load('social/linkedin'); $this->load('social/pinterest'); $this->load('social/stumbleupon'); $this->load('social/twitter'); // Actions add_action('init', array($this, 'assets')); add_action('init', array($this, 'default_templates')); // Ajax add_action('wp_ajax_get_recipe_template', array($this, 'ajax_get_recipe_template')); add_action('wp_ajax_nopriv_get_recipe_template', array($this, 'ajax_get_recipe_template')); }