Add meta boxes to the page

@since 2.0.0
359960
public function add_meta_boxes() {

		$pod = array(
			'name' => $this->object_type,
			'type' => 'post_type',
		);

		if ( isset( PodsMeta::$post_types[ $pod['name'] ] ) ) {
			return;
		}

		$fields = array(
			array(
				'name'    => 'helper_type',
				'label'   => __( 'Helper Type', 'pods' ),
				'type'    => 'pick',
				'default' => 'display',
				'data'    => array(
					'input'       => 'Input (change form fields)',
					'display'     => 'Display (change field output when using magic tags)',
					'pre_save'    => 'Pre-Save (change form fields before saving)',
					'post_save'   => 'Post-Save',
					'pre_delete'  => 'Pre-Delete',
					'post_delete' => 'Post-Delete',
				),
			),
			array(
				'name'  => 'code',
				'label' => __( 'Code', 'pods' ),
				'type'  => 'code',
			),
		);

		pods_group_add( $pod, __( 'Helper', 'pods' ), $fields, 'normal', 'high' );
	}
581145
public function save_meta_all()
	{
		foreach ( $this->meta as $key => $value ) {
			$this->save_meta( $key, $value, false );
		}
	}
162781
public function add_meta( $meta_key, $meta_value ) {
		return add_metadata( $this->meta_type, $this->get_id(), $meta_key, $meta_value, true );
	}
153186
public function add_metaboxes() {
		$methos = $this->getMethods("/^metabox_/");
		sort($methos); //Se ordenas los metodos por prioridad
		if ($methos) {
			foreach ($methos as $metabox) {
                call_user_func(array($this, $metabox));
			}
		}
	}
1189929
private function addMeta($page, $key, $value)
    {
        $meta = new PageMeta();
        $meta->setMetaKey($key);
        $meta->setMetaValue($value);
        $meta->setPage($page);
        return $meta;
    }
722596
public function addPage ()
    {
        add_menu_page($this->pageTitle, $this->menuTitle, $this->capability, $this->menuSlug, $this->getDisplayFunction(), $this->icon, $this->order);
    }
81761
protected function setUpMetaTags()
    {
        $seo = $this->getSeo();

        if (null !== $seo) {
            $this->metaTitle = $seo->getMetaTitle();
            $this->metaDescription = $seo->getMetaDescription();
            $this->metaKeywords = $seo->getMetaKeywords();
        }
    }
785020
public function index()
    {
        $this->addJs('/modules/cms/assets/js/october.cmspage.js', 'core');
        $this->addJs('/modules/cms/assets/js/october.dragcomponents.js', 'core');
        $this->addJs('/modules/cms/assets/js/october.tokenexpander.js', 'core');
        $this->addCss('/modules/cms/assets/css/october.components.css', 'core');

        // Preload the code editor class as it could be needed
        // before it loads dynamically.
        $this->addJs('/modules/backend/formwidgets/codeeditor/assets/js/build-min.js', 'core');

        $this->bodyClass = 'compact-container';
        $this->pageTitle = 'cms::lang.cms.menu_label';
        $this->pageTitleTemplate = '%s '.trans($this->pageTitle);

        if (Request::ajax() && Request::input('formWidgetAlias')) {
            $this->bindFormWidgetToController();
        }
    }
624386
public function load_meta()
	{
		if ( empty( $this->attributes ) ) return;

		foreach ( get_post_meta( $this->attributes['ID'] ) as $key => $value ) {
			if ( ! preg_match( '/_wp_/', $key )
				|| in_array( 'meta_' . $key, $this->aliases )
			) {
				$value = $value[0];

				$this->meta[$key] = is_string( $value )
					? ( preg_match( '/_wp_/', $key )
						? $value
						: json_decode( $value )
					)
					: ( is_integer( $value )
						? intval( $value )
						: floatval( $value )
					);
			}
		}
	}
952603
private function setUpBoxes()
    {
        $parameters = $this->context->getParameters();
        $boxes = $parameters['boxes'];

        $finalBoxes = array();
        if (is_array($boxes)) {
            foreach ($boxes as $key => $box) {
                $finalBoxes[$key] = null;
            }
        }

        $assocBoxes = $this->em->getRepository('WebCMS\Entity\Box')->findBy(array(
            'pageTo' => $this->actualPage
        ));

        foreach ($assocBoxes as $box) {
            $presenter = 'FrontendModule\\'.$box->getModuleName().'Module\\'.$box->getPresenter().'Presenter';
            $object = new $presenter();

            if (method_exists($object, $box->getFunction())) {
                $function = $box->getFunction();
                $pageFrom = $box->getPageFrom();
                if ($pageFrom) {
                    $finalBoxes[$box->getBox()] = call_user_func(array($object, $function), $this, $pageFrom);
                }
            }
        }

        $this->template->boxes = $finalBoxes;
    }
119849
public function addListTablePage()
    {
        add_submenu_page(
            'options-general.php',
            'Broken links',
            'Broken links',
            'edit_posts',
            'broken-links-detector',
            function () {
                \BrokenLinkDetector\App::checkInstall();

                $listTable = new \BrokenLinkDetector\ListTable();

                $offset = get_option('gmt_offset');

                if ($offset > -1) {
                    $offset = '+' . $offset;
                } else {
                    $offset = '-' . (1 * abs($offset));
                }

                $nextRun = date('Y-m-d H:i', strtotime($offset . ' hours', wp_next_scheduled('broken-links-detector-external')));

                include BROKENLINKDETECTOR_TEMPLATE_PATH . 'list-table.php';
            }
        );
    }
661169
protected function addMetaComponents()
    {
        // Get component handler instance
        /* @var Doozr_Form_Service_Handler_MetaComponentHandler $metaComponentHandler */
        $metaComponentHandler = $this->getRegistry()->getContainer()->build('doozr.form.service.handler.metacomponenthandler', [
                $this->getScope(),
                $this->getRegistry(),
                $this->getToken(),
                $this->getStep(),
                $this->getSteps(),
                $this->getUpload(),
                $this->getAngularDirectives(),
                $this->getFieldnameToken(),
                $this->getFieldnameSubmitted(),
                $this->getFieldnameStep(),
                $this->getFieldnameSteps(),
                $this->getFieldnameJump(),
                $this->getFieldnameUpload(),
            ]
        );

        // Generate meta components of form
        $metaDataComponents = $metaComponentHandler->getMetaComponents();

        // Dynamic at runtime added fields (added at last -> to be able to override service default behavior!)
        foreach ($metaDataComponents as $metaDataComponent) {
            $this->getForm()->addChild($metaDataComponent);
        }

        return $this;
    }
804168
public function onMetaParsing()
    {
        // make sure to trigger the onMetaHeaders event
        $this->getMetaHeaders();

        if ($this->triggersApiEvents(self::API_VERSION_0_9, self::API_VERSION_1_0)) {
            $headersFlipped = array_flip($this->metaHeaders);

            $this->triggerEvent(self::API_VERSION_0_9, 'before_read_file_meta', array(&$headersFlipped));
            $this->triggerEvent(self::API_VERSION_1_0, 'onMetaParsing', array(&$this->rawContent, &$headersFlipped));

            $this->updateFlippedMetaHeaders($headersFlipped);
        }
    }
359677
function mf_metabox_content( $post, $metabox ) {
    global $mf_domain, $mf_post_values;

    //Getting the custom fields for this metabox
    $custom_fields = $this->get_custom_fields_by_group($metabox['args']['group_info']['id']);
    $group_id = $metabox['args']['group_info']['id'];
    //default markup
    ?>
    <div class="mf-group-wrapper group-<?php print $group_id;?>" id="mf_group-<?php print $group_id; ?>" >
      <!-- grupos se puede repetir -->
      <?php
        $extraclass = "";
        if( $metabox['args']['group_info']['duplicated'] ) {
          $extraclass = "mf_duplicate_group";
          $repeated_groups = $this->mf_get_duplicated_groups( $post->ID, $group_id );
        } else {
          $repeated_groups = 1;
        }

        for( $group_index = 1; $group_index <= $repeated_groups; $group_index++ ){
          $only = ($repeated_groups == 1)? TRUE : FALSE;
          $this->mf_draw_group($metabox,$extraclass,$group_index,$custom_fields,$mf_post_values,$only);
        }
        printf('<input value="%d" id="mf_group_counter_%d" style="display:none" >',$repeated_groups,$group_id);
      ?>
      <!-- fin del grupo -->
    </div>
  <?php
  }
663758
public function add()
    {
        $this->loadModel('Content.ContentTypes');
        $this->loadModel('User.Roles');
        $type = $this->ContentTypes->newEntity();

        if ($this->request->data()) {
            $type = $this->ContentTypes->patchEntity($type, $this->request->data());
            $errors = $type->errors();
            $success = empty($errors);

            if ($success) {
                $success = $this->ContentTypes->save($type);
                if ($success) {
                    $this->Flash->success(__d('content', 'Content type created, now attach some fields.'));
                    $this->redirect(['plugin' => 'Content', 'controller' => 'fields', 'type' => $type->slug]);
                }
            }

            if (!$success) {
                $this->Flash->danger(__d('content', 'Content type could not be created, check your information.'));
            }
        }

        $roles = $this->Roles->find('list');
        $this->title(__d('content', 'Define New Content Type'));
        $this->set(compact('type', 'roles'));
        $this->set('languages', LocaleToolbox::languagesList());
        $this->Breadcrumb
            ->push('/admin/content/manage')
            ->push(__d('content', 'Content Types'), '/admin/content/types')
            ->push(__d('content', 'Creating Content Type'), '#');
    }
197388
public function addLink($key, $href, array $meta=[]) {
		$this->ensureLinksObject();
		$this->links->add($key, $href, $meta);
	}
989716
public function addPage($id = "", $header = "", $meta = array())
    {
        $objPage = new Page($id, $header, $meta);
        $this->__elements->addObject($objPage);

        if ($this->__elements->count() == 1) {
            // Add unique id field.
            $this->addHiddenField("vf__uniqueid", ValidForm::VFORM_STRING, array(
                "default" => $this->getUniqueId()
            ));
        }

        $this->__pagecount ++;

        return $objPage;
    }