|
|
楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////- C) s: Y) u3 A! @: {8 m) n
// Theme Option5 D5 }8 l. H z0 e8 G: H1 [
///////////////////////////////////////////////////////////////////////////////// o: Q4 S3 Q6 N" n
9 _: C, y& \( Y9 Q; {$themename = "Zenx";
2 m8 j a7 ]0 h4 ?% r2 |& e5 `8 N$shortname = str_replace(' ', '_', strtolower($themename));' A6 d2 z( t2 W2 ^5 E$ v
( T9 Q$ ^/ S- T/ R6 X a5 m9 O* N$ t4 afunction get_theme_option($option)
U1 ~- h. N# Q+ Q! \8 K{
4 J( n! ?0 U: T- B& ` global $shortname;
6 B* b( }7 J; H; { return stripslashes(get_option($shortname . '_' . $option));( @- Z% s( i4 J8 S
}* Y& y- k M: W2 D+ g% \
) [( j: c+ [- P
function get_theme_settings($option)
# M; A, c% F" h9 `4 H: o5 g& C{
* x$ t$ ?: j& C0 m8 H0 S3 V return stripslashes(get_option($option));
^: A2 i& C1 v, }/ x+ C}
) z! ?& c+ C3 R- [ C; U$wp_dropdown_rd_admin = $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent > -1 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC");
9 p& ~, o9 N, ^3 H- k. Q& X$wp_getcat = array();4 j# ^/ I8 @' U' c
foreach ($wp_dropdown_rd_admin as $category_list) {* J. a' _: E$ G6 O! V2 s; Y
$wp_getcat[$category_list->term_id] = $category_list->name;7 T9 D, T0 G# g6 u1 \5 l
}' U; N4 Y4 A9 G) v
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
6 Z0 _* S( g! }) w+ |+ x$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");1 x" N5 _* M' y7 r$ K
$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");
& @! C$ V- }& O, [4 Z# D( q) o! m0 {: W
$options = array (
+ c3 U. ?, {: p. I7 B; n9 Y' P' |2 H$ k$ \) ^% Q
1 \5 k5 e1 V4 Q+ P! g# V
array( "name" => "Blog Header Settings",
" N m( e8 [3 B8 U5 o F1 t) k "type" => "heading",
6 B# g1 E- k) S0 y% @% B ),! G! O; p0 T1 T! ~8 f
" Q L6 H( k+ |5 g+ j5 ]. y7 y9 T
array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",0 B/ @/ P6 P9 t& }4 L
"id" => $shortname."_header_logo_activate",( j* B1 p/ W4 t. M
"type" => "select",( k6 P& i4 o' A) V) S- |, Y9 n
"std" => "No",
$ W5 |) x& _- \6 Q7 Q, P! V "options" => array("No", "Yes")),
) f+ h1 M, K; l4 b* F8 e1 K4 [$ S( E5 R$ e0 R
array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
/ c; N3 i& D! \' B "id" => $shortname."_logo_url",
4 H5 V9 a% M4 _- t2 [8 B9 X7 B8 P "type" => "text",
3 v, o8 }/ g z) _- M "box" => "social",
! n$ B5 Z0 J( K3 ]* @/ C, m; b "std" => "",9 Y! o" C8 c9 G3 `
),
& o% N5 ?* _2 g% c( L
( t' P0 `4 q6 N& } array( "name" => "Insert Header Banner HTML Code (Header)
3 e( U, b) T& a& p7 z <br /><em>*Recommended Size 468 x 60</em>
2 u" ?& _ r' \$ v" D3 G <br /><em>*leave blank if not use</em>",7 v$ q. D5 W$ ~: R% m0 |6 x
"id" => $shortname."_header_banner",% C7 r% p7 f6 Y3 y8 `4 e; ?% w4 k
"type" => "textarea",9 G' D* U6 M; E; a
"std" => "",/ S* k. c- x& N! O* y
),
: d2 v! |/ q& ~( @+ G% ~& C( Y- {8 B7 _1 T8 X7 y! n
array( "name" => "</div></div>",: v/ U; G+ Z: i" y# M" q
"type" => "close",/ C6 x- v; J2 @6 T* N
),
! p X" T, v5 R% v3 Z. f
7 j) z: A y) s4 ^
5 s! _$ u: S2 C1 o* o0 Y4 V- C% X! T5 ?& j array( "name" => "Header Navigation Settings",8 q+ A' Y/ C1 v
"type" => "heading",
% T2 _. Q0 U2 s# I: c ),, ?6 K, S( ?. D5 j# h0 P
) R t, N" C- @, \0 n6 \. r6 E8 _ array( "name" => "Insert Page ID To Exclude On Header Navigation<br /># {: w5 Z% B6 K/ K
<em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />
$ ~- F. I+ W3 q5 K' ~ \3 W <em>*Enter the page post ID number only</em><br />' A; n5 z U8 b, I/ X) J! Y
<em>*separate by comma</em><br /># g, p: x# z0 c; `- y
<em>*Exclude pages which you don't want to show on the header navigation</em>",1 [* x0 \& \" B7 ?5 c8 w
"id" => $shortname."_header_page_navigation",$ K( O1 p( N/ n. q
"type" => "text",8 [' R `1 }$ j( t) v; q5 t
"std" => "",3 m% e$ i3 j e& {
),
' Z2 T9 v9 f: Z/ e- C/ r0 ]# r
array( "name" => "</div></div>",9 }1 S# r2 O- H& n2 k
"type" => "close",
6 N# R" M& N8 v A& Y& B. ] ),+ x3 S: @" b- T/ L, u9 \+ W
8 y: B6 u" X+ g0 I
5 m1 g! T0 S. h& j; m5 x array( "name" => "Post Auto Thumbnails Settings",
) ~. y5 x; m& l7 O "type" => "heading",8 N1 q* b: o. n; T
),( U# V9 e/ T2 ^
0 Z- I$ D+ ?( s& |1 X/ F. e; C
array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
& B3 Q+ j G( S# _ "id" => $shortname."_timthumb_activate",
6 {7 E/ `% w& F2 N2 I0 D1 I "type" => "select",
' G- P2 Q! Z1 k' V+ p+ f0 g5 Z "std" => "No",
6 m ^! W9 u1 Q' y& J "options" => array("No", "Yes")),/ ?2 g" Z8 T3 J6 S
4 B' J u0 ]' ~9 N9 Z! `* r7 S# n! b
array( "name" => "If Timthumb is enabled, Please choose its cropping method",
/ ?* }% ~3 m% k "id" => $shortname."_timthumb_cropping",
9 l- k3 g+ I) Y, f: ` "type" => "select",* t6 J- X# p& U) ^
"std" => "",
% V, ^3 h# f" j( W "options" => $crop_position),; }0 d4 ?- @2 x" G+ i* o/ p. C
U l) K; ?5 h8 v. O. z. E: U array( "name" => "Insert Width Of Thumbnail Image<br />* {6 r1 W6 w6 d; e/ {+ _
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
' O) ^" E; F& { I+ P0 l2 Q. Q# T <em>*Leave Blank To Use Default: 250</em><br />",
' p8 ]! {. g" q, @ "id" => $shortname."_thumb_width",5 U, _5 I& y! P0 U f" A
"type" => "text",1 D0 x+ l8 Y6 u7 R
"std" => "",: A. D) B7 ?6 p4 Y" V8 T6 B
),$ |+ o! }7 {4 y7 V& w: Y* f
+ I: L5 F1 R) s" b3 J6 R array( "name" => "Insert Height Of Thumbnail Image<br />
6 p0 o" Z( {" W& V; i2 j <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
0 Q5 G4 ?+ g3 q/ N+ { <em>*Leave Blank To Use Default: 200</em><br />",
. D4 Q1 {! V7 s8 H6 Q: L6 o3 @- R# r "id" => $shortname."_thumb_height",
8 g0 ]$ C; @; d3 W$ O& ^3 d, ~ "type" => "text",
1 a) i" d% z7 p4 @ "std" => "",
$ Q, i7 {0 S- B! s9 A! j ),* }0 p7 H* S' m. `6 c/ G$ p$ [, S7 T
. _- @1 k! Y4 H2 Q. q) t* h4 C' C0 X array( "name" => "</div></div>",
* S1 U7 i8 l- C& @ "type" => "close",
0 d0 b0 {8 ]/ `6 _0 `" ^ ),
M9 }: Q I# n& @* @: @: _, i9 @" d3 b& A' F( Q) q
array( "name" => "Featured Content Slider Settings",$ p$ o3 O. F T& _7 e2 a4 U x) @- U" d+ E
"type" => "heading",8 L, D# b7 y$ _! W7 Z) x
),/ s4 |9 m9 l" h+ s" `5 z) C
' c" o% _5 D4 x8 T+ X' N h8 ^
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",& y. X3 L' Z& c$ I
"id" => $shortname."_featured_activate"," O3 d4 U" {" p9 k: F/ m3 b2 w* z
"type" => "select",
$ K2 ~6 a, h8 E2 @" Q) g "std" => "No",
# _ a$ K) K* U3 t0 c$ C "options" => array("No", "Yes")),
9 q. d" |2 ^& G7 e
$ ^1 |5 `$ _7 e
7 e0 P' B/ L, R array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",- t: m1 {$ `3 q Z j% G
"id" => $shortname."_featured_category",0 Z8 t3 A+ E5 H
"type" => "select",
$ e0 n8 H6 G) X: j) D2 `8 Y' ~* S "std" => "Choose a category:",# |; L: e# I+ t2 V& ^+ R ^
"options" => $wp_getcat),
4 N3 @/ o1 y+ b/ S7 r! u$ Y# M/ p5 x% w7 Y+ J
array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",% X, R. X- k- ?7 F& }9 M% p
"id" => $shortname."_featured_number",0 R& X" I& o7 s" S; I
"type" => "select",
: F J- y- y+ V1 g/ z' z) o4 L "std" => "Number of post:",
+ m! n$ H' v) D. E$ l& P2 E$ P "options" => $number_entries),9 L( R% B6 e* V
8 W! I2 L" A! o; D1 V* D
array( "name" => "</div></div>",
) C- V! ~6 q1 Q/ ?5 F+ q3 K( W6 Q "type" => "close",
0 q! d6 }1 q2 i. _/ ^" B! Z ),5 f8 I/ k5 [; @; p9 b
2 {/ u8 g5 J2 s1 k0 D9 ] array( "name" => "Featured Category Settings",, M7 M- f U2 Z! l) v! [
"type" => "heading",
4 z* `% F- ~% T" } ),1 a, M7 r) E4 m0 A: B% p
* M. A! K" T, _/ Y array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>", c: M7 E( _! G0 G- [% A! F
"id" => $shortname."_featured_category_activate",
- H2 Q9 U: e; E7 F "type" => "select",, ^* M- E% B" d/ |/ R4 ?) P
"std" => "No",
& U# G0 x# \8 ?1 e! A5 [% e* E u "options" => array("No", "Yes")),
* a# T/ w5 r2 Y9 d + c5 A, e5 u- \" b* V1 u2 X
array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",6 P! |7 P \. k0 |9 M* x
"id" => $shortname."_featured_category_id1",
: V: |0 r5 d$ ]/ x "type" => "select",9 Q6 \7 F( o& E0 _
"std" => "Choose a category:",
8 @$ g' P) E- D- u "options" => $wp_getcat),7 t9 I7 ^( m {! r8 q7 X6 d8 k
; Z' a! n7 p2 q% b% @ array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",) A/ P: z" Y* |: U
"id" => $shortname."_featured_number1",5 a) G" @7 M! O. i
"type" => "select",& o, P0 @4 N1 T5 l
"std" => "Number of post:",1 r3 F2 c. O7 [" H
"options" => $number_entries),& ~) V# r# C" p
# u% i+ c: u- A* d4 z! [4 Z: }% O3 Q
array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",2 E5 ]% g. d4 t3 k9 ^4 W7 _
"id" => $shortname."_featured_category_id2",# S" i, r! ?! d# {3 K
"type" => "select",0 Q; X! }7 g! S! P' W
"std" => "Choose a category:",
y0 Z4 U$ T! }. Y$ d$ L5 N+ X, s "options" => $wp_getcat),! N7 r, i/ z' D% T- B3 w6 u2 I
$ `. n" X4 M% t array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",% S2 g- y1 ]) K% Z- x
"id" => $shortname."_featured_number2",
; s9 x. d8 T6 J8 m( f( L: N "type" => "select",
0 n8 W- X( L" T/ D) o" c; |" q) N "std" => "Number of post:",
; K3 v& [; D$ U$ X/ g& } "options" => $number_entries),
. h# ^8 {9 U4 a9 b0 F# w. P! W
( F, W+ E) V0 `- m! V; r9 ^
( Y: J- \0 T# t6 o5 f% y z9 D array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",6 l" ^9 A) [3 } b
"id" => $shortname."_featured_category_id3",4 O9 J& L' o1 _/ h( ~# {& l
"type" => "select",- [0 C# F% \# J- W
"std" => "Choose a category:",4 `; g. D0 S( z2 @# c6 |2 |
"options" => $wp_getcat),
@8 H8 z4 r5 j8 ? ! p' G+ U, s6 e" }
array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",2 m& I- ]- e" j& W1 K: [
"id" => $shortname."_featured_number3",/ f: @) g+ M$ q2 c
"type" => "select",' W3 Z8 H7 ~6 N! v; Y! q# S! _8 `
"std" => "Number of post:",
. p# I' q. u2 r! [* A "options" => $number_entries),$ k. C2 i( G7 f" n% d& ], Y: `5 J
3 H% u' @* i! i4 b3 @
( R7 @# a, O+ S& } array( "name" => "</div></div>",- Y8 n, `! d3 U$ _" r1 `
"type" => "close",- M- c% P4 a0 p% `0 t
),
6 g1 B) }5 \7 G t& ~+ M8 u- h2 R7 \& A8 e$ c N
8 f7 m# l* t7 i B3 C array( "name" => "Google Adsense & Analytics Settings",3 E) C6 D' I: Z: N1 {
"type" => "heading",, ^) K. W7 F+ X- h
),
7 V0 X3 ^! A G' R3 B% i& x4 l# K0 i8 ]5 a$ X
array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",
6 ?8 z( k, f* G( D) U& i! f "id" => $shortname."_adsense_loop_activate",
/ U4 Z9 ~4 v6 }+ y) d U "type" => "select",$ f& i1 }/ i6 B" U. v( W1 O1 o
"std" => "Disable",7 Q9 K6 L7 e. ?& f7 W
"options" => array("Disable", "Enable")),
% G; K0 o4 i/ ?8 z% x
, N. d+ Q9 X5 Z+ z+ f: J array( "name" => "Insert Google Adsense Code For Loops Here<br />
3 S7 f8 t. z% B5 M) |$ e <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
! b, {6 [5 x- r! M$ A "id" => $shortname."_adsense_loop",
8 r- ]1 e1 O. F. h "type" => "textarea",
! S" p$ g. ?' _: A" |0 W "std" => "",
4 O% R0 C2 H! q6 q4 v( q ),2 g, [) _- h$ E8 g; U
, h, o3 k/ m9 N7 U& U
array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",
( d( l8 ?+ V1 w8 u1 L "id" => $shortname."_adsense_single_activate",& J; _$ |- P+ d0 q2 H# T, a
"type" => "select",
5 w9 l, P5 u1 u2 ?7 w+ P) i "std" => "Disable",6 E2 h X* _/ L6 r& B# R
"options" => array("Disable", "Enable")),$ ]8 a9 G0 b0 w, G9 V8 D( F
3 w0 ?2 I* z5 h2 T4 }
array( "name" => "Insert Google Adsense Code For Single Page Here<br />
0 ?* v) O) H7 g" ?9 V$ r | <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
+ b6 J+ n; S1 F; i$ l+ w7 n "id" => $shortname."_adsense_single",
* {! S) D: a- M: d/ u/ v "type" => "textarea",/ L9 ~3 m! }' n3 i4 i! Q4 h
"std" => ""," L7 k6 a; D8 o2 y2 z. f
),
2 M+ ^6 Z0 V' M) Z7 w1 _
. I/ u" V- e: L/ x9 {7 w$ m' m8 o1 G
! a; O0 X/ e- V z array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
1 b: A, o( v, A4 s; z "id" => $shortname."_google_analytics",
+ V, Y' Q$ Q" _/ D "type" => "textarea",, p5 V: K% M+ g3 D1 A
"std" => "",
* f, c; w$ k, W6 ? ),
8 x$ S3 y, R$ m7 K; t/ Z
. z3 Z3 i0 }+ b/ f0 ? array( "name" => "</div></div>",# v! I+ n; y, e( t. o) z' m
"type" => "close",
2 U( N) D/ f& I. ^ ),
" D: M4 M9 ?3 v! M! |) E- m ! e" J5 h/ e1 Q
* h2 y! U C# e0 E. L array( "name" => "AddThis Social Bookmarking Settings",( e2 `* P/ j" }4 b: H& {/ G
"type" => "heading",7 X9 r! O3 P M5 f2 o6 ~5 Y+ r
),& N$ |6 s. D. `& K0 O _: z
# c$ ?" ?% d, x2 |$ y array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>
9 f5 Y' _1 }7 i, c <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",6 ~0 U3 [8 V- x% j9 ?1 k
"id" => $shortname."_addthis",1 ?) U+ E, U; O6 S: c
"type" => "text",
. b/ F/ S; T1 ]3 f* A# D' u "box" => "social",
3 M* {6 N* d9 z" V) Z; [$ Z "std" => "",$ c% V. P3 u: Y
),3 P0 ?, E: v8 q* r( u) I
% a+ E3 [' Z, |- [$ } array( "name" => "</div></div>",
% q1 @1 N! T& S) k+ E "type" => "close",
* M2 h3 j. L" ?0 t0 B& C, B# p$ Z ),
( ^8 g1 N- l7 @9 }: a- K 4 C3 l) b; {7 @& u0 Z
! s5 S6 |$ s# h4 L0 k
/ P, G$ F0 r5 N2 L9 g# w9 M array( "name" => "YouTube Video Settings",
! h7 P3 ?. ^0 ]% }" F3 M/ S "type" => "heading",
' U# P! b- @9 v- k+ u% x ),8 \( g6 M) D6 S
# v8 ?7 { C, c/ w/ F% u6 N
array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",0 B1 O3 q: n' G0 I, h
"id" => $shortname."_emvideo_activate",
4 e4 F7 A6 p3 ]/ m! K "type" => "select",
; b2 M- ?2 Q, |2 N2 B% n. k "std" => "No",/ G$ ^! |2 \- O% ]( Q
"options" => array("No", "Yes")),
* T1 {7 C" W' t/ W7 M+ [* P) V6 r0 X
array( "name" => "Insert YouTube Video Unique Code<br /><em>*You can find videos to embed on <a href=\"http://www.youtube.com\" target=\"_blank\">YouTube</a> site.</em><br /><em>i.e. Youtube - http://www.youtube.com/watch?v=<span class=\"redbold\">Hr0Wv5DJhuk</span></em><br /><em>*Only Insert The Red Bolded Code Inside Below Setting Box.</em>",
$ g" S! Y- o/ h6 J "id" => $shortname."_emvideo",
6 o( R/ p7 y8 L6 }" R "std" => "",; }- U/ M0 o7 m& T: q- S3 {
"type" => "text"),/ s: P8 m8 ]( H. l
' ]7 [7 F% X, D0 B array( "name" => "</div></div>",8 }" e) N5 M$ p7 K4 J4 i+ J
"type" => "close",) e" D9 c$ o: N
),0 v# N" W# A5 f$ W6 D; [$ K
; a! `$ N6 V% P/ R2 [5 d
array( "name" => "Twitter Settings",
, p: X4 l$ D$ S1 G# } "type" => "heading",
1 I( H* B( K* H8 A+ b/ |5 o2 H ),
9 o+ m4 b% w- p4 t8 ^5 u$ P* r6 b8 c) y6 o7 Z! ?+ h- Q
array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
4 [% H) K( \" D "id" => $shortname."_twitter_activate",# u f1 q& u( |4 J8 m, u
"type" => "select", n8 ]5 L! }2 {! v3 T% K: N
"std" => "No",' `5 y0 E% A# R+ q. {! Q) t* `6 z
"options" => array("No", "Yes")),
/ ^. n) i% g# q' }5 p) f4 n$ z. _' P. @/ j% {' s# A- Q
array( "name" => "Insert Your Twitter ID here* t) x3 S4 m( A
<br /><em>*leave blank if not necessary</em>
& ^% P- w- M$ I4 `( r4 l <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",+ b* O* r& d. Q, N9 z
"id" => $shortname."_twitter",
/ d' X% a% |$ @& n, f- A$ u, K "type" => "text",
6 y ~* m6 ^3 c: B$ V+ Z "box" => "social",$ `# y% C v' g- H4 ^/ g' d6 c( a/ O p
"std" => "",
2 I- o2 v/ d3 R8 ?' W2 J: U9 S. A4 l; f ),/ j+ ~" j/ L' y4 s' h! A8 P. |( \
4 w( Z3 m# }( d. N# s2 F
array( "name" => "Enter Twitter Feed Count here" w) o3 O- t6 L, J/ i7 K
<br /><em>*leave blank if not necessary</em>
# g7 o9 b% ^6 J8 y <br /><em>*Enter How Many Twitter Feed To Display</em>",7 L3 V0 k3 c: Q+ k Q# c& z
"id" => $shortname."_twitter_count",
) V- U: A0 J, u8 Y "type" => "text",
# I0 z1 L I1 S# a1 I& R "box" => "social",. }3 ]& Z; A/ G5 Q
"std" => "",
$ c8 u% A& @( N' h8 U0 W! c. I ),$ w2 i# |1 G3 v5 v
, O& R# q! t; E* b$ S& F5 I8 H. _* o array( "name" => "</div></div>",
1 T, o) f" K; l7 Q "type" => "close",, ^8 ^" `& l0 z
),
- C7 I0 W1 ^* z$ Z 9 M* J6 P( r" Y D3 O0 v; o
+ W) x0 b' U2 j" g; n+ ~, n% h4 T array( "name" => "125 x 125 Banners Advertisement Settings",
. s- U. D/ t4 @& U, ]) c/ Q+ N" y "type" => "heading",
' f* q! f4 E/ C2 E J% G ),
, u, g, S2 H4 y3 y
; d. ^) B- p- K( i+ c array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",! w9 N x9 ?0 I. F, J6 _7 G. l
"id" => $shortname."_sponsor_activate",
; d: {9 \* o" W "type" => "select",; |& P4 v" Z1 L- Y
"std" => "No",
% e* `# D2 y& Z "options" => array("No", "Yes")),
; W H0 x7 |2 `2 K% N' X. ` : R* V4 E! G3 k4 z2 s2 w5 W
, z/ F# ~, Y, B. {: ^1 k% G array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",* P# V* ^3 G8 R5 K
"id" => $shortname."_sponsor_banner_one",4 q9 b4 R6 {9 S2 s) {
"type" => "textarea",% d! Z% I! d% u& a
"std" => "",* v- Y! f% u6 i. s
), * N7 o. E0 d7 p# r0 ]
9 Q( k" k" v1 ~' ] array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",* p9 z$ G7 `& s
"id" => $shortname."_sponsor_banner_two",
: _/ X3 ^* |4 e+ x& l "type" => "textarea",
& I6 Z' l8 T3 p% J8 q: X2 H "std" => "",/ L3 S" C* q9 ?# M" W& h
),
- c' P" G% \) H" u' a8 E J8 s/ o4 f
array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
; I- {! k. \3 H6 H5 D- N1 Y0 A "id" => $shortname."_sponsor_banner_three",
$ o$ \' B4 k# f* K: f "type" => "textarea", \0 X7 f" R2 y) X8 ]
"std" => "",& Q$ \" R1 p1 [: k
)," Q9 c& C; C3 w3 l( c' J+ G
+ L7 R9 T( g: j" m g+ m$ M
array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",! U+ T% w( O; R3 l. F3 ^/ x
"id" => $shortname."_sponsor_banner_four",
) U3 @6 w7 `8 G5 {. T "type" => "textarea",
8 d+ K; B3 T* K, u ]1 n "std" => "",$ X' K9 S! L2 V8 z- b
),7 q+ V# q h: s" t1 j, C
; [( ]; t3 s o+ K4 t' p. E' \
array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
! I6 u1 Q9 \0 A9 V# d* N V* ^' s5 d "id" => $shortname."_sponsor_banner_five",
6 u0 b) a% G1 K- E2 k "type" => "textarea",4 N; m9 L- k2 u' D" e3 w
"std" => "",
+ A" S4 G4 h! {0 w1 h; K2 L+ x7 {& \ ),
. `& [5 @: Y. N& Y0 Y3 C
, M8 h/ Z' B# S9 ^- Z! d array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",4 ~* m; c5 }; n3 g9 _1 Q6 S
"id" => $shortname."_sponsor_banner_six",+ `1 M6 R" o/ Z2 z; l4 W2 N$ ?
"type" => "textarea",
5 |* f& W& i& i3 g `! O- b! I$ h "std" => "",2 @3 t: ^/ O8 f9 [
),2 Z. L T5 d4 A' k2 A- p3 n; Z
' s B/ b" y' H* n% F) I
array( "name" => "</div></div>",+ T2 u- X/ S- F$ @* {- ]9 d
"type" => "close",! j( Z3 R3 O8 }- u
),8 f1 W$ P5 H& }; A; P8 i
( A9 ]# H+ r1 N5 a' s6 B* W
5 o% B0 [/ Y+ E6 F
1 q r0 H3 T3 p( h5 M1 w: p5 z" t);2 I. S. |# ~: R- t
& J* d# n, I& j M; ?. lfunction mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {- a8 y& q1 p+ ~/ M- F/ {' J
& n7 f/ x* g; i4 N" C m
echo "<div id=\"admin-options\"> ";
+ o2 i! r% B( D7 y) }. _; }
- v% N W1 a C8 uglobal $themename, $shortname, $options;
0 i4 q+ B/ }; _/ O8 e. M5 |if ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';
$ ]' q5 `! P$ ~& q$ k. @; Pif ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';
/ l5 p; I0 [2 H( i8 E3 |?>; c* t; _& w3 C
9 \1 V4 \' M6 |! b7 Z<h4><?php echo "$themename"; ?> Theme Options</h4>; w8 u6 B* F1 [& H1 D _% ^
7 ]1 C" c Y B G7 g! T9 x# l) Q
<div class="annouce">$ _- T/ s K; U2 w
<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>, K! `9 u7 O3 `' ~& z, h6 p4 j/ D+ i
<p>Don't Forget to <a href="http://feedburner.google.com/fb/a/mailverify?uri=MagPress&loc=en_US" title="MagPress Newsletter" target="_blank" rel="nofollow"><b>Subscribe Our Free NewsLetter</b></a> In Order To Receive Theme's Updates and Fixes.</p>
* Q2 `6 u0 H) J( M5 I1 M</div>6 \' a7 K0 I% `2 _$ W g2 a# k
`6 K! u* v- p l
<form action="" method="post">
- \# k0 G+ J G" t5 e8 J1 Z5 Y6 L& G
<?php foreach ($options as $value) { ?>
' J% \* A1 m- w! m7 e
Z0 W9 d& p8 c/ k | ~! ~<?php switch ( $value['type'] ) { case 'heading': ?>
8 p; o9 P: H- O8 P
" b3 N( t7 r7 {- ?8 y. w<div class="get-option">) ^- _7 W( r# Q, c! h
4 g+ j+ {* X. w, q4 r* b" e<h2><?php echo $value['name']; ?></h2>
; C, u0 r9 ^1 w) ]5 f& g8 P- J' D" e2 L) D7 D
<div class="option-save">4 \- [* a8 [1 P% W
( T9 L- x) O" Z$ A" P
<?php! s; F: P& n$ V5 _; B0 P
break;$ Y4 M6 v- X& {; [" e
case 'text':
( P {8 L# f0 H0 @) i?>
, K0 O( q( {* F- u8 S" q" o, e5 \! _* H
<div class="description"><?php echo $value['name']; ?></div>
) l) F3 @ I x! ]. k. v8 [<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (
2 m. w$ Z" n! Q$ o2 Q' m' K7 _3 r$ p, e' `- G. h& i8 ]
get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>
; s" g! E4 M. t1 ]5 D% |, B. v& ?! l
<?php
1 U% P# v: h: q! G" o/ z! xbreak;
" R2 G4 g+ {7 `# c* J E7 icase 'select':/ U5 a! @% O3 {3 X/ I
?> |- Y4 K# O: w) s
# m/ v) f7 @( J S1 F( u
<div class="description"><?php echo $value['name']; ?></div>
: N: Y4 _0 {# k! u0 D2 l9 P) a- ]<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">2 Y0 X8 F" |, o' V/ R3 ?6 Q
<?php foreach ($value['options'] as $option) { ?>* d& o, U" m; |% x5 t* P% I
<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
2 {* ?" B# w8 S# z" C3 G: x<?php } ?>
+ n3 w- |5 y( h* h) ^3 K</select>% t( d: R% }. h1 r: g( J7 R8 Y* [1 r! J
</p>' t9 [3 l, Y% k. q
8 e/ r N% X) j( Z. A6 y<?php
f: O; `& ?% h3 J0 N; y+ ~; Zbreak;. p0 K0 r" {- l
case 'textarea':
/ X! R* G8 N5 ]- C( g/ K+ k7 u9 c; ?$valuex = $value['id'];8 d1 |% s& p0 u8 j& O
$valuey = stripslashes($valuex);% n+ Z, d; c0 w0 w
$video_code = get_settings($valuey);! Q8 q' s% r+ _! H! z
?>1 O/ j3 b4 }; K3 |0 Q0 f2 [' B
+ Y; R- M* K& k3 o1 ~$ D2 z<div class="description"><?php echo $value['name']; ?></div>* {: E2 C3 [3 f0 s7 t
<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
# Q5 Z% P1 {- |; n' b) Y+ d4 R$ g. d! j F
else { echo $value['std']; } ?></textarea></p>
' l7 h; ]" r2 O: D) J5 t, G5 O% T
7 G5 O3 E- |. d0 {- G' v<?php
' \6 E5 x3 g0 S/ E" Qbreak;
- U, x" t+ K g% Z7 ?3 s( zcase 'close':4 r7 x, }# a+ l* P4 `
?>
% i4 B4 {. v. b
9 z& b3 B# [& _( B5 `) N0 m/ q/ i<div class="clearfix"></div>. K5 i. w8 w; L2 {' v
</div><!-- OPTION SAVE END -->& z/ K! h# o, R% j B
, \2 L) ?2 ?3 I. i+ x
<div class="clearfix"></div>: T' `. v5 n, [. _, p
</div><!-- GET OPTION END -->1 V1 A4 W' b# K2 V) F. \9 i/ f
1 b, ^# Y1 }* l" k, y7 T' u<?php
" K* d2 q0 @) ~1 _' `6 nbreak;
3 `6 L$ Y g u4 m/ M! Adefault;
' i* D8 L$ V& x3 [3 T# x7 G7 N, V?>& l( v4 m- }3 g- K K
b' C3 T* m( `& h8 N J/ T: I0 t# b
" A& `5 b9 N9 W, i" ^<?php
% W8 d( Y Z: f9 {6 Ibreak; } ?>+ Q) }- c' z& a0 x' o: `9 T* x& v
0 z9 E b6 J& }<?php } ?>
9 k$ T e4 |. o- w5 R
& K8 V& v9 r4 X6 z0 y; z9 o% r<p class="save-p">, j& b! w, o% t
<input name="save" type="submit" class="sbutton" value="Save Options" />
& i' q4 ^ y" T! L<input type="hidden" name="action" value="save" />" {( Z' \' {: \
</p>
/ u$ A \4 `! {3 ]</form>
9 W; i! w, t& m1 w* o' r9 h) M" `
7 c' p, W, `8 r4 I8 X, M<form method="post">
: `! U- I* h. ?; l4 }, {/ @<p class="save-p"># q1 N, _7 ~$ o" ?% @6 D! j
<input name="reset" type="submit" class="sbutton" value="Reset Options" />( ^* H- C" P! s- H' D" y! h
<input type="hidden" name="action" value="reset" />3 l) E7 U. S( x/ a
</p>
. h* X' m$ h2 p9 P! i3 `9 X+ Z</form>7 {2 _5 T2 w# }+ L
! x+ a9 h$ ^, }( s1 r/ E</div><!-- ADMIN OPTIONS END -->
0 Y8 {6 _8 ~' s- | ~- i3 q1 a& w/ O3 }$ @8 L
<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }
# D$ w" M7 k4 d( \8 K. K2 z& z0 S/ p' ~
function mytheme_admin_register() {! M2 Z& q5 ]& I0 k) X
global $themename, $shortname, $options;" R4 D; d- q1 B* \6 u0 e0 M5 I; G
if ( $_GET['page'] == basename(__FILE__) ) {
$ X- L( z2 G# }6 F+ O5 j c s; zif ( 'save' == $_REQUEST['action'] ) {" m J. x* v( j" H
foreach ($options as $value) {# ?' o7 g5 x7 ~+ E
update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
; w6 z `* X& X9 P4 |+ v3 _foreach ($options as $value) {% f! P5 M8 H3 {; P* f
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }
+ `& L4 L# N/ ~! b: Q Zheader("Location: themes.php?page=functions.php&saved=true");; o$ P3 V+ x/ r# o* N7 W
die;2 Q3 R+ `9 |: V0 n7 q
} else if( 'reset' == $_REQUEST['action'] ) {
' m5 }3 o9 a' r- Mforeach ($options as $value) {+ K) a" f5 J( Q' p U, m, i
delete_option( $value['id'] ); }
6 q4 ?- N8 b: G) r4 R! H yheader("Location: themes.php?page=functions.php&reset=true");* M7 |9 {8 j5 A# B( ?
die;
# k) _2 T6 C% U: Q1 F3 f) q; X) p; X}* g3 Y5 D, k4 i) N, f
}2 T: R5 z2 F0 R; [1 w2 |
add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');
; S, @5 r0 R. ^1 Z, ~% n}5 b5 G1 D! X+ _) [! o
, q8 A4 J) v% `4 F: m; o
function mytheme_admin_head() { ?>
# A1 G9 \- k- g, D<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />7 z. O7 W& Y# ~, }) L- G
<?php }8 S6 g2 s5 \, k: h& A$ S
|
|