set metabox styles

@since  1.0.0
@see    \uix\ui\uix
@access public
18753
public function set_assets() {

		$this->assets['style']['metabox']   = $this->url . 'assets/css/metabox' . UIX_ASSET_DEBUG . '.css';
		$this->assets['script']['baldrick'] = [
			'src'  => $this->url . 'assets/js/jquery.baldrick' . UIX_ASSET_DEBUG . '.js',
			'deps' => [ 'jquery' ],
		];
		parent::set_assets();
	}
393504
protected function set_ajax_assets() {
		$this->assets = array(
			'script' => array(
				'baldrick' => array(
					'src'  => $this->url . 'assets/js/jquery.baldrick' . UIX_ASSET_DEBUG . '.js',
					'deps' => array( 'jquery' ),
				),
				'uix-ajax' => array(
					'src'  => $this->url . 'assets/js/ajax' . UIX_ASSET_DEBUG . '.js',
					'deps' => array( 'baldrick' ),
				),
			),
			'style'  => array(
				'uix-ajax' => $this->url . 'assets/css/ajax' . UIX_ASSET_DEBUG . '.css',
			),
		);
	}
1076310
protected function set_active_styles() {

		// Set active styles
		$styles = '.contextual-help-tabs .active {border-left: 6px solid ' . $this->base_color() . ' !important;}';

		$styles .= '#wpbody-content .wrap > h1 {box-shadow: 0 0 2px rgba(0, 2, 0, 0.1), 11px 0 0 ' . $this->base_color() . 'inset;}';

		$styles .= '#wpbody-content .wrap > h1 a.page-title-action:hover { background: ' . $this->base_color() . ';';
		$styles .= 'border-color: ' . $this->base_color() . ';}';

		$styles .= '#wpbody-content .wrap > h1 a.page-title-action:focus {';
		$styles .= 'box-shadow: 0 0 2px ' . $this->base_color() . ';';
		$styles .= 'border-color: ' . $this->base_color() . ';}';

		uix_share()->set_active_styles( $styles );
	}
1197278
protected function wizardAddImageStyle()
    {
        $this->validatePrompt('name', $this->text('Name'), 'image_style');
        $this->validatePromptList('actions', $this->text('Actions'), 'image_style');
        $this->validatePrompt('status', $this->text('Status'), 'image_style', 0);
        $this->setSubmittedList('actions');

        $this->validateComponent('image_style');
        $this->addImageStyle();
    }
1034534
protected function setStyle( $styleType, $styles )
    {
        // Get the cell style
        $style = $this->getCellStyle();

        // Apply style from array
        $style->applyFromArray( [
            $styleType => $styles,
        ] );

        return $this;
    }
1017773
public function _setActiveTheme()
    {
        if (empty($this->config['theme'])) {
            return;
        }

        if (!is_array($this->config['theme'])) {
            $template   = $this->config['theme'];
            $stylesheet = $this->config['theme'];
        } else {
            $template   = reset($this->config['theme']);
            $stylesheet = end($this->config['theme']);
        }

        $GLOBALS['wp_tests_options']['template']   = $template;
        $GLOBALS['wp_tests_options']['stylesheet'] = $stylesheet;

        codecept_debug('Set template to [' . $template . '] and stylesheet to [' . $stylesheet . ']');
    }
652538
public function registerStyles()
    {
        wp_register_style(
            'cuztom-jquery-ui',
            '//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/base/jquery-ui.css',
            false,
            self::$version,
            'screen'
        );

        wp_register_style(
            'cuztom',
            self::$url.'/assets/css/cuztom.min.css',
            false,
            self::$version,
            'screen'
        );

        // Do
        do_action('cuztom_register_styles');
    }
726393
protected function set_active_styles() {
		parent::set_active_styles();
		$style = '#control-' . $this->id() . '{border-color: ' . $this->base_color() . ';}';
		$style .= '#' . $this->id() . ' span.uix-control-label {color: ' . $this->base_color() . ';}';
		uix_share()->set_active_styles( $style );
	}
411943
function tabify_add_meta_boxes( $post_type )
	{
		// get acf's
		$acfs = apply_filters('acf/get_field_groups', array());
		
		if($acfs)
		{
			foreach($acfs as $acf)
			{
				// add meta box
				add_meta_box(
					'acf_' . $acf['id'], 
					$acf['title'], 
					array($this, 'dummy'), 
					$post_type
				);
				
			}
			// foreach($acfs as $acf)
		}
		// if($acfs)
	}
756989
public function postTypeMetaboxesDisplay()
    {
        // Check metaboxes
        if (empty($this->metaboxes)) {
            return;
        }

        // Defintions
        $slug = Request::getCurrentSlug();

        // Check slug
        if (empty($slug) || $slug !== $this->slug) {
            return;
        }

        // Get metaboxes
        foreach ($this->metaboxes as $metabox) {
            if (!$metabox) {
                continue;
            }

            // Get contents
            $id = (integer) $metabox->getModel()->getId();
            $title = (string) $metabox->getModel()->getTitle();
            $fields = (array) $metabox->getModel()->getFields();

            // Check fields
            if (empty($fields)) {
                continue;
            }

            // Title
            $title = empty($title) ? Translate::t('posttypehook.metabox') : $title;
            $id = empty($id) ? Helpers::urlize($title) : $id;

            // Update vars
            $identifier = $slug.'-meta-box-'.$id;

            // Add meta box
            $metabox->init($identifier, $slug);
        }
    }
753619
public function setStyleAttributeValue($attr_key, $attr_value): void
    {

        $style_array = $this->getStyleAttributeArray();
        $style_array[$attr_key] = $attr_value;

        $style_string = '';
        foreach ($style_array as $key => $value) {
            $style_string .= $key . ':' . $value . ';';
        }

        $this->setAttribute('style', $style_string);
    }
1303420
protected function setBreadcrumbEditImageStyle()
    {
        $breadcrumbs = array();

        $breadcrumbs[] = array(
            'url' => $this->url('admin'),
            'text' => $this->text('Dashboard')
        );

        $breadcrumbs[] = array(
            'url' => $this->url('admin/settings/imagestyle'),
            'text' => $this->text('Image styles')
        );

        $this->setBreadcrumbs($breadcrumbs);
    }
1161562
function SetStylesArray($arr)
	{
		$style = '';
		foreach (['B', 'I'] as $s) {
			if (isset($arr[$s])) {
				if ($arr[$s]) {
					$this->$s = true;
					$style .= $s;
				} else {
					$this->$s = false;
				}
			} elseif ($this->$s) {
				$style .= $s;
			}
		}
		$this->currentfontstyle = $style;
		$this->SetFont('', $style, 0, false);
	}
79986
protected function set_active_styles() {

		if ( ! empty( $this->struct['size'] ) ) {
			$str = '';
			foreach ( $this->struct['size'] as $fr ) {
				$str .= $fr . 'fr ';
			}
			$style = '.uix-grid.col-' . implode( '-', $this->struct['size'] ) . '{grid-template-columns:' . $str . ';}';
			$style .= '@media screen and (max-width: 600px){';
			$style .= '.uix-grid.col-' . implode( '-', $this->struct['size'] ) . '{grid-template-columns:1fr;}';
			$style .= '}';
			uix_share()->set_active_styles( $style );
		}
	}
38073
function mf_post_add_metaboxes() {
    global $post,$mf_post_values;

    //if the user are going to add a new link
    //the var $post is not defined and we do nothing
    if(!isset($post)) {
      return false;
    }

    $mf_post_values = $this->mf_get_post_values($post->ID);

    //Getting the post types
    $post_types = $this->mf_get_post_types( array(), 'names'  );

    foreach ( $post_types as $post_type ){
      if ( post_type_supports($post_type, 'page-attributes') && $post_type != 'page' ) {
        // If the post type has page-attributes we are going to add
        // the meta box for choice a template by hand
        // this is because wordpress don't let choice a template
        // for any non-page post type
        add_meta_box(
          'mf_template_attribute',
          __('Template'),
          array( &$this, 'mf_metabox_template' ),
          $post_type,
          'side',
          'default'
        );
      }

      if( !mf_custom_fields::has_fields($post_type) ) {
          continue;
      }

      //getting  the groups (each group is a metabox)
      $groups = $this->get_groups_by_post_type($post_type);

      //creating the metaboxes
      foreach( $groups as $group ) {
        if( $this->group_has_fields($group['id'] ) ) {
          add_meta_box(
            'mf_'.$group['id'],
            $group['label'],
            array( &$this, 'mf_metabox_content' ),
            $post_type,
            'normal',
            'default',
            array( 'group_info' => $group)
          );
        }
      }
    }
  }
1149732
protected function addPredefinedStyles()
    {
        $this->addStyle(
            'info',
            new ColorStyle('green', '', ['bold'])
        );

        $this->addStyle(
            'comment',
            new ColorStyle('yellow', '', ['bold'])
        );

        $this->addStyle(
            'question',
            new ColorStyle('black', 'cyan')
        );

        $this->addStyle(
            'error',
            new ColorStyle('white', 'red')
        );

        return $this;
    }
1130511
public function add_meta_boxes() {

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

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

		if ( ! function_exists( 'get_page_templates' ) ) {
			include_once ABSPATH . 'wp-admin/includes/theme.php';
		}

		$page_templates = apply_filters( 'pods_page_templates', get_page_templates() );

		$page_templates[ __( '-- Page Template --', 'pods' ) ] = '';

		$page_templates[ __( 'Custom (uses only Pod Page content)', 'pods' ) ] = '_custom';

		if ( ! in_array( 'pods.php', $page_templates, true ) && locate_template( array( 'pods.php', false ) ) ) {
			$page_templates[ __( 'Pods (Pods Default)', 'pods' ) ] = 'pods.php';
		}

		if ( ! in_array( 'page.php', $page_templates, true ) && locate_template( array( 'page.php', false ) ) ) {
			$page_templates[ __( 'Page (WP Default)', 'pods' ) ] = 'page.php';
		}

		if ( ! in_array( 'index.php', $page_templates, true ) && locate_template( array( 'index.php', false ) ) ) {
			$page_templates[ __( 'Index (WP Fallback)', 'pods' ) ] = 'index.php';
		}

		ksort( $page_templates );

		$page_templates = array_flip( $page_templates );

		$fields = array(
			array(
				'name'  => 'page_title',
				'label' => __( 'Page Title', 'pods' ),
				'type'  => 'text',
			),
			array(
				'name'          => 'code',
				'label'         => __( 'Page Code', 'pods' ),
				'type'          => 'code',
				'attributes'    => array(
					'id' => 'content',
				),
				'label_options' => array(
					'attributes' => array(
						'for' => 'content',
					),
				),
			),
			array(
				'name'  => 'precode',
				'label' => __( 'Page Precode', 'pods' ),
				'type'  => 'code',
				'help'  => __( 'Precode will run before your theme outputs the page. It is expected that this value will be a block of PHP. You must open the PHP tag here, as we do not open it for you by default.', 'pods' ),
			),
			array(
				'name'  => 'page_template',
				'label' => __( 'Page Template', 'pods' ),
				'type'  => 'pick',
				'data'  => $page_templates,
			),
		);

		pods_group_add( $pod, __( 'Page', 'pods' ), $fields, 'normal', 'high' );

		$associated_pods = array(
			0 => __( '-- Select a Pod --', 'pods' ),
		);

		$all_pods = pods_api()->load_pods( array( 'names' => true ) );

		if ( ! empty( $all_pods ) ) {
			foreach ( $all_pods as $pod_name => $pod_label ) {
				$associated_pods[ $pod_name ] = $pod_label . ' (' . $pod_name . ')';
			}
		} else {
			$associated_pods[0] = __( 'None Found', 'pods' );
		}

		$fields = array(
			array(
				'name'       => 'pod',
				'label'      => __( 'Associated Pod', 'pods' ),
				'default'    => 0,
				'type'       => 'pick',
				'data'       => $associated_pods,
				'dependency' => true,
			),
			array(
				'name'        => 'pod_slug',
				'label'       => __( 'Wildcard Slug', 'pods' ),
				'help'        => __( 'Setting the Wildcard Slug is an easy way to setup a detail page. You can use the special tag {@url.2} to match the *third* level of the URL of a Pod Page named "first/second/*" part of the pod page. This is functionally the same as using pods_v_sanitized( 2, "url" ) in PHP.', 'pods' ),
				'type'        => 'text',
				'excludes-on' => array( 'pod' => 0 ),
			),
		);

		pods_group_add( $pod, __( 'Pod Association', 'pods' ), $fields, 'normal', 'high' );

		$fields = array(
			array(
				'name'       => 'admin_only',
				'label'      => __( 'Restrict access to Admins?', 'pods' ),
				'default'    => 0,
				'type'       => 'boolean',
				'dependency' => true,
			),
			array(
				'name'       => 'restrict_role',
				'label'      => __( 'Restrict access by Role?', 'pods' ),
				'help'       => array(
					__( '<h6>Roles</h6> Roles are assigned to users to provide them access to specific functionality in WordPress. Please see the Roles and Capabilities component in Pods for an easy tool to add your own roles and edit existing ones.', 'pods' ),
					'http://codex.wordpress.org/Roles_and_Capabilities',
				),
				'default'    => 0,
				'type'       => 'boolean',
				'dependency' => true,
			),
			array(
				'name'              => 'roles_allowed',
				'label'             => __( 'Role(s) Allowed', 'pods' ),
				'type'              => 'pick',
				'pick_object'       => 'role',
				'pick_format_type'  => 'multi',
				'pick_format_multi' => 'autocomplete',
				'pick_ajax'         => false,
				'default'           => '',
				'depends-on'        => array(
					'restrict_role' => true,
				),
			),
			array(
				'name'       => 'restrict_capability',
				'label'      => __( 'Restrict access by Capability?', 'pods' ),
				'help'       => array(
					__( '<h6>Capabilities</h6> Capabilities denote access to specific functionality in WordPress, and are assigned to specific User Roles. Please see the Roles and Capabilities component in Pods for an easy tool to add your own capabilities and roles.', 'pods' ),
					'http://codex.wordpress.org/Roles_and_Capabilities',
				),
				'default'    => 0,
				'type'       => 'boolean',
				'dependency' => true,
			),
			array(
				'name'              => 'capability_allowed',
				'label'             => __( 'Capability Allowed', 'pods' ),
				'type'              => 'pick',
				'pick_object'       => 'capability',
				'pick_format_type'  => 'multi',
				'pick_format_multi' => 'autocomplete',
				'pick_ajax'         => false,
				'default'           => '',
				'depends-on'        => array(
					'restrict_capability' => true,
				),
			),
			array(
				'name'       => 'restrict_redirect',
				'label'      => __( 'Redirect if Restricted?', 'pods' ),
				'default'    => 0,
				'type'       => 'boolean',
				'dependency' => true,
			),
			array(
				'name'       => 'restrict_redirect_login',
				'label'      => __( 'Redirect to WP Login page', 'pods' ),
				'default'    => 0,
				'type'       => 'boolean',
				'dependency' => true,
				'depends-on' => array(
					'restrict_redirect' => true,
				),
			),
			array(
				'name'       => 'restrict_redirect_url',
				'label'      => __( 'Redirect to a Custom URL', 'pods' ),
				'default'    => '',
				'type'       => 'text',
				'depends-on' => array(
					'restrict_redirect'       => true,
					'restrict_redirect_login' => false,
				),
			),
		);

		pods_group_add( $pod, __( 'Restrict Access', 'pods' ), $fields, 'normal', 'high' );
	}