Plugin Directory

Changeset 3469408


Ignore:
Timestamp:
02/25/2026 11:51:09 AM (4 weeks ago)
Author:
babbardel
Message:

Add ABSPATH guards to all PHP files and prefix Select2 constants

Location:
pixtypes/trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • pixtypes/trunk/class-pixtypes.php

    r3469313 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23/**
    34 * PixTypes.
  • pixtypes/trunk/core/defaults.php

    r1744797 r3469408  
    1 <?php return array
     1<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
     3
     4return array
    25    (
    36        'cleanup' => array
  • pixtypes/trunk/features/metaboxes/cmb-field-select2-v2/cmb-field-select2.php

    r3469313 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23/*
    34Plugin Name: CMB Field Type: Select2
     
    1112
    1213// Useful global constants
    13 define( 'PW_SELECT2_v2_URL', plugin_dir_url( __FILE__ ) );
     14if ( ! defined( 'PIXTYPES_SELECT2_V2_URL' ) ) {
     15    define( 'PIXTYPES_SELECT2_V2_URL', plugin_dir_url( __FILE__ ) );
     16}
    1417
    1518/**
     
    1720 */
    1821function pw_select2_v2( $field, $meta ) {
    19     wp_enqueue_script( 'pw-select2-field-js', PW_SELECT2_v2_URL . 'js/select2/select2.full.min.js', array( 'jquery-ui-sortable' ), '4.0.4' );
    20     wp_enqueue_script( 'pw-select2-field-init', PW_SELECT2_v2_URL . 'js/select2-init.js', array( 'pw-select2-field-js' ), null );
    21     wp_enqueue_style( 'pw-select2-field-css', PW_SELECT2_v2_URL . 'js/select2/select2.css', array(), '4.0.4' );
    22     wp_enqueue_style( 'pw-select2-field-mods', PW_SELECT2_v2_URL . 'css/select2.css', array(), null );
     22    wp_enqueue_script( 'pw-select2-field-js', PIXTYPES_SELECT2_V2_URL . 'js/select2/select2.full.min.js', array( 'jquery-ui-sortable' ), '4.0.4' );
     23    wp_enqueue_script( 'pw-select2-field-init', PIXTYPES_SELECT2_V2_URL . 'js/select2-init.js', array( 'pw-select2-field-js' ), null );
     24    wp_enqueue_style( 'pw-select2-field-css', PIXTYPES_SELECT2_V2_URL . 'js/select2/select2.css', array(), '4.0.4' );
     25    wp_enqueue_style( 'pw-select2-field-mods', PIXTYPES_SELECT2_V2_URL . 'css/select2.css', array(), null );
    2326
    2427    call_user_func( $field['type'], $field, $meta );
  • pixtypes/trunk/features/metaboxes/cmb-field-select2/cmb-field-select2.php

    r3469313 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23/*
    34Plugin Name: CMB Field Type: Select2
     
    1112
    1213// Useful global constants
    13 define( 'PW_SELECT2_URL', plugin_dir_url( __FILE__ ) );
     14if ( ! defined( 'PIXTYPES_SELECT2_URL' ) ) {
     15    define( 'PIXTYPES_SELECT2_URL', plugin_dir_url( __FILE__ ) );
     16}
    1417
    1518/**
     
    1720 */
    1821function pw_select2( $field, $meta ) {
    19     wp_enqueue_script( 'pw-select2-field-js', PW_SELECT2_URL . 'js/select2/select2.min.js', array( 'jquery-ui-sortable' ), '3.5.1' );
    20     wp_enqueue_script( 'pw-select2-field-init', PW_SELECT2_URL . 'js/select2-init.js', array( 'pw-select2-field-js' ), null );
    21     wp_enqueue_style( 'pw-select2-field-css', PW_SELECT2_URL . 'js/select2/select2.css', array(), '3.5.1' );
    22     wp_enqueue_style( 'pw-select2-field-mods', PW_SELECT2_URL . 'css/select2.css', array(), null );
     22    wp_enqueue_script( 'pw-select2-field-js', PIXTYPES_SELECT2_URL . 'js/select2/select2.min.js', array( 'jquery-ui-sortable' ), '3.5.1' );
     23    wp_enqueue_script( 'pw-select2-field-init', PIXTYPES_SELECT2_URL . 'js/select2-init.js', array( 'pw-select2-field-js' ), null );
     24    wp_enqueue_style( 'pw-select2-field-css', PIXTYPES_SELECT2_URL . 'js/select2/select2.css', array(), '3.5.1' );
     25    wp_enqueue_style( 'pw-select2-field-mods', PIXTYPES_SELECT2_URL . 'css/select2.css', array(), null );
    2326
    2427    call_user_func( $field['type'], $field, $meta );
  • pixtypes/trunk/features/metaboxes/fields/gallery.php

    r3469313 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23/**
    34 * Wordpress gallery procesing
  • pixtypes/trunk/features/metaboxes/fields/gmap_pins.php

    r3469313 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23/**
    34 * Wordpress gmap pins procesing
  • pixtypes/trunk/features/metaboxes/fields/image.php

    r3469313 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23/**
    34 * Wordpress single image procesing
  • pixtypes/trunk/features/metaboxes/fields/pix_builder.php

    r3469313 r3469408  
     1<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
    12<div class="pix_builder_container hidden">
    23    <?php
  • pixtypes/trunk/features/metaboxes/fields/playlist.php

    r3469313 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23/**
    34 * Wordpress playlist procesing
  • pixtypes/trunk/features/metaboxes/fields/portfolio-gallery.php

    r3469313 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
     3
    24global $post;
    35
  • pixtypes/trunk/features/metaboxes/init.php

    r3469313 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23/*
    34Script Name:    Custom Metaboxes and Fields
  • pixtypes/trunk/features/metaboxes/metaboxes.php

    r3469313 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23/**
    34 * Include and setup custom metaboxes and fields.
  • pixtypes/trunk/pixtypes.php

    r3469313 r3469408  
    33 * Plugin Name: PixTypes
    44 * Plugin URI: https://wordpress.org/plugins/pixtypes/
    5  * Description: Custom post types and meta-boxes needed by your themes.
     5 * Description: Theme-driven post types, taxonomies & custom fields.
    66 * Version: 2.0.0
    77 * Author: Pixelgrade
  • pixtypes/trunk/plugin-defaults.php

    r1591155 r3469408  
    1 <?php return array
     1<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
     3
     4return array
    25(
    36
  • pixtypes/trunk/readme.txt

    r3469313 r3469408  
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 A WordPress plugin for managing custom post types and custom meta boxes from a theme.
     11Theme-driven post types, taxonomies &amp; custom fields.
    1212
    1313== Description ==
  • pixtypes/trunk/settings/hiddens.php

    r1591155 r3469408  
    1 <?php return array(
     1<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
     3
     4return array(
    25    'type'    => 'group',
    36    'options' => array(
  • pixtypes/trunk/settings/post_types.php

    r1744797 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
     3
    24// init display options with false
    35$display_option = array(
  • pixtypes/trunk/settings/taxonomies.php

    r1591155 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23
    34// init display options with false
  • pixtypes/trunk/views/admin.php

    r3469313 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23/**
    34 * Represents the view for the administration dashboard.
  • pixtypes/trunk/views/public.php

    r1115891 r3469408  
    11<?php
     2if ( ! defined( 'ABSPATH' ) ) exit;
    23/**
    34 * Represents the view for the public-facing component of the plugin.
Note: See TracChangeset for help on using the changeset viewer.